]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tg3: Fix 57765 A0 bootcode race condition
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 12 Feb 2010 14:47:08 +0000 (14:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2010 01:05:53 +0000 (17:05 -0800)
On A0 revision of 57765 asic rev devices, the bootcode will perform some
hardware operations, after the magic signature is presented, that will
collide with setup operations performed by the driver.  The best way to
avoid the contention is to have the driver delay an additional 10
milliseconds.  B0 revisions of the chip will make this workaround
unnecessary.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
drivers/net/tg3.h

index c140e1bf6e029b72491901d3f263d742cb253958..2c5e1b7e1088c5f88190b1362c09b95b45773c0a 100644 (file)
@@ -6721,6 +6721,13 @@ static int tg3_poll_fw(struct tg3 *tp)
                       tp->dev->name);
        }
 
+       if (tp->pci_chip_rev_id == CHIPREV_ID_57765_A0) {
+               /* The 57765 A0 needs a little more
+                * time to do some important work.
+                */
+               mdelay(10);
+       }
+
        return 0;
 }
 
index cc8bf7d6823ad0ee58965bf967b4fce444428b48..46db4ad46bbc2e978ef9b4a901817c2755d201b6 100644 (file)
 #define  CHIPREV_ID_57780_A0            0x57780000
 #define  CHIPREV_ID_57780_A1            0x57780001
 #define  CHIPREV_ID_5717_A0             0x05717000
+#define  CHIPREV_ID_57765_A0            0x57785000
 #define  GET_ASIC_REV(CHIP_REV_ID)     ((CHIP_REV_ID) >> 12)
 #define   ASIC_REV_5700                         0x07
 #define   ASIC_REV_5701                         0x00