* [PATCH 1/4][TG3]: Assign tp->link_config.orig_* values.
@ 2006-12-16 6:48 Michael Chan
2006-12-18 1:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2006-12-16 6:48 UTC (permalink / raw)
To: davem, netdev
[TG3]: Assign tp->link_config.orig_* values.
tp->link_config.orig_* values must be assigned during
tg3_set_settings() because these values will be used to setup the
link speed during tg3_open(). Without these assignments, the link
speed settings will be all messed by if tg3_set_settings() is called
when the device is down.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 571320a..d01538e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7981,6 +7981,10 @@ static int tg3_set_settings(struct net_d
tp->link_config.duplex = cmd->duplex;
}
+ tp->link_config.orig_speed = tp->link_config.speed;
+ tp->link_config.orig_duplex = tp->link_config.duplex;
+ tp->link_config.orig_autoneg = tp->link_config.autoneg;
+
if (netif_running(dev))
tg3_setup_phy(tp, 1);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/4][TG3]: Assign tp->link_config.orig_* values.
2006-12-16 6:48 [PATCH 1/4][TG3]: Assign tp->link_config.orig_* values Michael Chan
@ 2006-12-18 1:07 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-12-18 1:07 UTC (permalink / raw)
To: mchan; +Cc: netdev
From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 15 Dec 2006 22:48:22 -0800
> [TG3]: Assign tp->link_config.orig_* values.
>
> tp->link_config.orig_* values must be assigned during
> tg3_set_settings() because these values will be used to setup the
> link speed during tg3_open(). Without these assignments, the link
> speed settings will be all messed by if tg3_set_settings() is called
> when the device is down.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Good catch, patch applied, thanks Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-18 1:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-16 6:48 [PATCH 1/4][TG3]: Assign tp->link_config.orig_* values Michael Chan
2006-12-18 1:07 ` 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).