tg3: Enable phy APD for 5717 and later asic revs
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 24 Nov 2010 08:31:53 +0000 (08:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Nov 2010 19:06:20 +0000 (11:06 -0800)
This patch enables the gphy autopowerdown feature in the phy for all
new devices that support it.

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

index 3079e1f540fd2080272da5b65a58b6e33c75253b..afb79db5327eeab0b9d9e9e787d8c09d23d0a28a 100644 (file)
@@ -12431,8 +12431,9 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
                if (cfg2 & (1 << 18))
                        tp->phy_flags |= TG3_PHYFLG_SERDES_PREEMPHASIS;
 
-               if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
-                     GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX)) &&
+               if (((tp->tg3_flags3 & TG3_FLG3_5717_PLUS) ||
+                   ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
+                     GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX))) &&
                    (cfg2 & NIC_SRAM_DATA_CFG_2_APD_EN))
                        tp->phy_flags |= TG3_PHYFLG_ENABLE_APD;