diff options
author | Michael Chan <mchan@broadcom.com> | 2007-06-05 11:33:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-08-04 09:10:22 -0700 |
commit | 50099883039e51de64f84938a3db114b4c0cb12f (patch) | |
tree | f95193a42acebde633ed6d3f082246237ac02771 | |
parent | eb5f1c29b4ba4533ccd13eed24b5a89257286225 (diff) | |
download | linux-stable-50099883039e51de64f84938a3db114b4c0cb12f.tar.gz linux-stable-50099883039e51de64f84938a3db114b4c0cb12f.tar.bz2 linux-stable-50099883039e51de64f84938a3db114b4c0cb12f.zip |
BNX2: Fix netdev watchdog on 5708.
There's a bug in the driver that only initializes half of the context
memory on the 5708. Surprisingly, this works most of the time except
for some occasional netdev watchdogs when sending a lot of 64-byte
packets. This fix is to add the missing code to initialize the 2nd
half of the context memory.
Update version to 1.5.8.2.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/bnx2.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5006c677113b..1137291ab179 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -54,8 +54,8 @@ #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.5.8.1" -#define DRV_MODULE_RELDATE "May 7, 2007" +#define DRV_MODULE_VERSION "1.5.8.2" +#define DRV_MODULE_RELDATE "June 5, 2007" #define RUN_AT(x) (jiffies + (x)) @@ -1550,6 +1550,7 @@ bnx2_init_context(struct bnx2 *bp) vcid = 96; while (vcid) { u32 vcid_addr, pcid_addr, offset; + int i; vcid--; @@ -1570,16 +1571,20 @@ bnx2_init_context(struct bnx2 *bp) pcid_addr = vcid_addr; } - REG_WR(bp, BNX2_CTX_VIRT_ADDR, 0x00); - REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); + for (i = 0; i < (CTX_SIZE / PHY_CTX_SIZE); i++) { + vcid_addr += (i << PHY_CTX_SHIFT); + pcid_addr += (i << PHY_CTX_SHIFT); - /* Zero out the context. */ - for (offset = 0; offset < PHY_CTX_SIZE; offset += 4) { - CTX_WR(bp, 0x00, offset, 0); - } + REG_WR(bp, BNX2_CTX_VIRT_ADDR, 0x00); + REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); - REG_WR(bp, BNX2_CTX_VIRT_ADDR, vcid_addr); - REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); + /* Zero out the context. */ + for (offset = 0; offset < PHY_CTX_SIZE; offset += 4) + CTX_WR(bp, 0x00, offset, 0); + + REG_WR(bp, BNX2_CTX_VIRT_ADDR, vcid_addr); + REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); + } } } |