[ipxe-devel] [PATCH 2/3] [tg3] Use BDINFO DMA flag for some cards
Cody Cutler
ccutler at cs.utah.edu
Tue Aug 14 17:54:52 UTC 2012
BCM5720 cannot receive any packets without this patch. We must use a
maxlen smaller than what is used in Linux or we crash while receiving
large files.
Tested on BCM5720 and BCM5754
---
src/drivers/net/tg3/tg3_hw.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/drivers/net/tg3/tg3_hw.c b/src/drivers/net/tg3/tg3_hw.c
index 4aa186a..7875dd4 100644
--- a/src/drivers/net/tg3/tg3_hw.c
+++ b/src/drivers/net/tg3/tg3_hw.c
@@ -2145,7 +2145,14 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
tw32(RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS,
BDINFO_FLAGS_DISABLED);
- val = TG3_RX_STD_MAX_SIZE_5700 << BDINFO_FLAGS_MAXLEN_SHIFT;
+ if (tg3_flag(tp, 57765_PLUS)) {
+ /* 5717's size crashes - use smaller size */
+ //val = TG3_RX_STD_MAX_SIZE_5717;
+ val = TG3_RX_STD_MAX_SIZE_5700;
+ val <<= BDINFO_FLAGS_MAXLEN_SHIFT;
+ val |= (TG3_RX_STD_DMA_SZ << 2);
+ } else
+ val = TG3_RX_STD_MAX_SIZE_5700 << BDINFO_FLAGS_MAXLEN_SHIFT;
tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, val);
--
1.7.6
More information about the ipxe-devel
mailing list