From: Matt Carlson Date: Wed, 24 Nov 2010 08:31:53 +0000 (+0000) Subject: tg3: Enable phy APD for 5717 and later asic revs X-Git-Tag: v2.6.38-rc1~476^2~466 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e1e3291d4727e14c8f0f48df561afb1a5c26ffe;p=platform%2Fkernel%2Flinux-3.10.git tg3: Enable phy APD for 5717 and later asic revs This patch enables the gphy autopowerdown feature in the phy for all new devices that support it. Signed-off-by: Matt Carlson Reviewed-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 3079e1f..afb79db 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -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;