From: Matt Carlson Date: Mon, 2 Apr 2012 09:01:40 +0000 (+0000) Subject: tg3: Fix 5717 serdes powerdown problem X-Git-Tag: v2.6.39-400.9.0~338^2~152 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fb594988224419ee820837eff57ec4685cf2e310;p=users%2Fjedix%2Flinux-maple.git tg3: Fix 5717 serdes powerdown problem If port 0 of a 5717 serdes device powers down, it hides the phy from port 1. This patch works around the problem by keeping port 0's phy powered up. (cherry picked from commit 085f1afc56619bda424941412fdeaff1e32c21dc) Signed-off-by: Matt Carlson Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index eb639b245c63..cb0db80b1c9f 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -2783,7 +2783,9 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5780 && - (tp->phy_flags & TG3_PHYFLG_MII_SERDES))) + (tp->phy_flags & TG3_PHYFLG_MII_SERDES)) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && + !tp->pci_fn)) return; if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5784_AX ||