tg3: Restrict ASPM workaround devlist
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 2 Aug 2010 11:26:00 +0000 (11:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Aug 2010 22:46:29 +0000 (15:46 -0700)
The ASPM workaround setting obtained from NVRAM only works with devices
older than 5717.  This patch enforces the restriction.

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

index 38979f24e5411a45a0b3a700695dce01febeeda9..7c2c81ab48384a4bb9cbe8e482fac5d21cba52c1 100644 (file)
@@ -12188,7 +12188,9 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
                    (cfg2 & NIC_SRAM_DATA_CFG_2_APD_EN))
                        tp->tg3_flags3 |= TG3_FLG3_PHY_ENABLE_APD;
 
-               if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
+               if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
+                   GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 &&
+                   !(tp->tg3_flags3 & TG3_FLG3_5717_PLUS)) {
                        u32 cfg3;
 
                        tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &cfg3);