Skip to contentSkip to conversation

: Assign tp->link_config.orig_* values.

PATCH Applied Michael Chan 2 participants 2 messages Dec 16, 2006 – Dec 18, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 : Assign tp->link_config.orig_* values.

[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.

drivers/net/tg3.c +4 -0
index 571320a..d01538e 100644
@@ -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);
 
maintainer
#1 lore raw

From: "Michael Chan" <[email protected]>
Date: Fri, 15 Dec 2006 22:48:22 -0800

Quoted 9 lines

[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.

Good catch, patch applied, thanks Michael.