* [PATCH net] tg3: Don't turn off led on 5719 serdes port 0
@ 2013-08-31 0:01 Nithin Nayak Sujir
2013-09-04 2:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nithin Nayak Sujir @ 2013-08-31 0:01 UTC (permalink / raw)
To: davem; +Cc: netdev, Nithin Sujir, Michael Chan
From: Nithin Sujir <nsujir@broadcom.com>
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>
---
drivers/net/ethernet/broadcom/tg3.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 2e55ee2..5701f3d 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -3030,6 +3030,19 @@ static bool tg3_phy_power_bug(struct tg3 *tp)
return false;
}
+static bool tg3_phy_led_bug(struct tg3 *tp)
+{
+ switch (tg3_asic_rev(tp)) {
+ case ASIC_REV_5719:
+ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
+ !tp->pci_fn)
+ return true;
+ return false;
+ }
+
+ return false;
+}
+
static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power)
{
u32 val;
@@ -3077,8 +3090,9 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power)
}
return;
} else if (do_low_power) {
- tg3_writephy(tp, MII_TG3_EXT_CTRL,
- MII_TG3_EXT_CTRL_FORCE_LED_OFF);
+ if (!tg3_phy_led_bug(tp))
+ tg3_writephy(tp, MII_TG3_EXT_CTRL,
+ MII_TG3_EXT_CTRL_FORCE_LED_OFF);
val = MII_TG3_AUXCTL_PCTL_100TX_LPWR |
MII_TG3_AUXCTL_PCTL_SPR_ISOLATE |
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] tg3: Don't turn off led on 5719 serdes port 0
2013-08-31 0:01 [PATCH net] tg3: Don't turn off led on 5719 serdes port 0 Nithin Nayak Sujir
@ 2013-09-04 2:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-09-04 2:24 UTC (permalink / raw)
To: nsujir; +Cc: netdev, mchan
From: "Nithin Nayak Sujir" <nsujir@broadcom.com>
Date: Fri, 30 Aug 2013 17:01:36 -0700
> From: Nithin Sujir <nsujir@broadcom.com>
>
> 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>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-04 2:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-31 0:01 [PATCH net] tg3: Don't turn off led on 5719 serdes port 0 Nithin Nayak Sujir
2013-09-04 2:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).