]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TG3]: Assign tp->link_config.orig_* values.
authorMichael Chan <mchan@broadcom.com>
Mon, 18 Dec 2006 01:06:46 +0000 (17:06 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 18 Dec 2006 05:59:19 +0000 (21:59 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index 23bad21b5c8766a1da29d05feff397e58b99ad02..e47a9c1f35cb0564021191ebab878195a5d20822 100644 (file)
@@ -7974,6 +7974,10 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
                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);