ref: 0afd20e4c409ea8b05916654783150c87dfa0c33
parent: ace62a81f4252c53e0f49a805aeaee691e42ea1a
author: mia soweli <inbox@tachibana-labs.org>
date: Thu Jun 1 11:35:18 EDT 2023
etherbcm: support the 57765 series the 57765 series of cards have the same max frame length field in the rx rcb as the 5717 series, but without the change in nic address. tested on the BCM5762, thanks grimmware.
--- a/sys/src/9/pc/etherbcm.c
+++ b/sys/src/9/pc/etherbcm.c
@@ -246,6 +246,8 @@
BCM5761e = 0x1680,
BCM5761 = 0x1681,
BCM5764M = 0x1684,
+ BCM57766 = 0x1686,
+ BCM5762 = 0x1687,
BCM57760 = 0x1690,
BCM57788 = 0x1691,
BCM57780 = 0x1692,
@@ -616,19 +618,28 @@
csr32(ctlr, ReceiveBDHostAddr + 0) = pa >> 32;
csr32(ctlr, ReceiveBDHostAddr + 4) = pa;
switch(ctlr->pdev->did) {
- case BCM5717:
- case BCM5718:
- case BCM5719:
- case BCM5720:
- /* 5717 series have a different receive bd nic addr,
- * and a max frame length field in bits 2 to 15. */
- csr32(ctlr, ReceiveBDFlags) = RecvProdRingLen << 16 | 1536 << 2;
- csr32(ctlr, ReceiveBDNIC) = 0x40000;
- break;
+ case BCM5717:
+ case BCM5718:
+ case BCM5719:
+ case BCM5720:
+ /* 5717 series have a different receive bd nic addr,
+ * and a max frame length field in bits 2 to 15. */
+ csr32(ctlr, ReceiveBDFlags) = RecvProdRingLen << 16 | 1536 << 2;
+ csr32(ctlr, ReceiveBDNIC) = 0x40000;
+ break;
- default:
- csr32(ctlr, ReceiveBDFlags) = RecvProdRingLen << 16;
- csr32(ctlr, ReceiveBDNIC) = 0x6000;
+ case BCM5762:
+ case BCM57765:
+ case BCM57766:
+ /* 57765 series have the max frame length field,
+ * but not the different receive bd addr */
+ csr32(ctlr, ReceiveBDFlags) = RecvProdRingLen << 16 | 1536 << 2;
+ csr32(ctlr, ReceiveBDNIC) = 0x6000;
+ break;
+
+ default:
+ csr32(ctlr, ReceiveBDFlags) = RecvProdRingLen << 16;
+ csr32(ctlr, ReceiveBDNIC) = 0x6000;
}
csr32(ctlr, ReceiveBDRepl) = 25;
@@ -800,6 +811,8 @@
case BCM5761e:
case BCM5761:
case BCM5764M:
+ case BCM57766:
+ case BCM5762:
case BCM57760:
case BCM57788:
case BCM57780: