diff options
author | Nithin Sujir <nsujir@broadcom.com> | 2013-08-30 20:01:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-14 09:54:56 -0400 |
commit | 84a38c47c2bbcb361caa1631c92eaf5916e178d6 (patch) | |
tree | bc8f3c3d662d5a7dad1d4693b32eb1788a6411ab /drivers/net | |
parent | 2aae409672a9ec6078702b2fe92bd41ecf05d826 (diff) |
tg3: Don't turn off led on 5719 serdes port 0
[ Upstream commit 989038e217e94161862a959e82f9a1ecf8dda152 ]
Turning off led on port 0 of the 5719 serdes causes all other ports to
lose power and stop functioning. Add tg3_phy_led_bug() function to check
for this condition. We use a switch() in tg3_phy_led_bug() for
consistency with the tg3_phy_power_bug() function.
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a13463e8a2c3..0877a052e3ee 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -3003,6 +3003,19 @@ static bool tg3_phy_power_bug(struct tg3 *tp) | |||
3003 | return false; | 3003 | return false; |
3004 | } | 3004 | } |
3005 | 3005 | ||
3006 | static bool tg3_phy_led_bug(struct tg3 *tp) | ||
3007 | { | ||
3008 | switch (tg3_asic_rev(tp)) { | ||
3009 | case ASIC_REV_5719: | ||
3010 | if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && | ||
3011 | !tp->pci_fn) | ||
3012 | return true; | ||
3013 | return false; | ||
3014 | } | ||
3015 | |||
3016 | return false; | ||
3017 | } | ||
3018 | |||
3006 | static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) | 3019 | static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) |
3007 | { | 3020 | { |
3008 | u32 val; | 3021 | u32 val; |
@@ -3050,8 +3063,9 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) | |||
3050 | } | 3063 | } |
3051 | return; | 3064 | return; |
3052 | } else if (do_low_power) { | 3065 | } else if (do_low_power) { |
3053 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 3066 | if (!tg3_phy_led_bug(tp)) |
3054 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 3067 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
3068 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | ||
3055 | 3069 | ||
3056 | val = MII_TG3_AUXCTL_PCTL_100TX_LPWR | | 3070 | val = MII_TG3_AUXCTL_PCTL_100TX_LPWR | |
3057 | MII_TG3_AUXCTL_PCTL_SPR_ISOLATE | | 3071 | MII_TG3_AUXCTL_PCTL_SPR_ISOLATE | |