* [PATCH 1/6] tg3: Call netif_carrier_off() during phy reset
@ 2006-04-28 23:35 Michael Chan
2006-04-30 1:55 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2006-04-28 23:35 UTC (permalink / raw)
To: davem; +Cc: netdev
Add netif_carrier_off() call during tg3_phy_reset(). This is needed
to properly track the netif_carrier state in cases where we do a
PHY reset with interrupts disabled. The SerDes code will not run
properly if the netif_carrier state is wrong.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 73e271e..a28accb 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -974,6 +974,8 @@ static int tg3_phy_reset_5703_4_5(struct
return err;
}
+static void tg3_link_report(struct tg3 *);
+
/* This will reset the tigon3 PHY if there is no valid
* link unless the FORCE argument is non-zero.
*/
@@ -987,6 +989,11 @@ static int tg3_phy_reset(struct tg3 *tp)
if (err != 0)
return -EBUSY;
+ if (netif_running(tp->dev) && netif_carrier_ok(tp->dev)) {
+ netif_carrier_off(tp->dev);
+ tg3_link_report(tp);
+ }
+
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/6] tg3: Call netif_carrier_off() during phy reset
2006-04-28 23:35 [PATCH 1/6] tg3: Call netif_carrier_off() during phy reset Michael Chan
@ 2006-04-30 1:55 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2006-04-30 1:55 UTC (permalink / raw)
To: mchan; +Cc: netdev
From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 28 Apr 2006 16:35:06 -0700
> Add netif_carrier_off() call during tg3_phy_reset(). This is needed
> to properly track the netif_carrier state in cases where we do a
> PHY reset with interrupts disabled. The SerDes code will not run
> properly if the netif_carrier state is wrong.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-30 1:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28 23:35 [PATCH 1/6] tg3: Call netif_carrier_off() during phy reset Michael Chan
2006-04-30 1:55 ` David S. 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).