Skip to content

Commit

Permalink
[TG3]: Assign tp->link_config.orig_* values.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 18, 2006
1 parent 9b54d5c commit 24fcad6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 24fcad6

Please sign in to comment.