diff options
author | Andy Gospodarek <andy@greyhouse.net> | 2007-10-08 04:08:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:50 -0400 |
commit | 405d8e5cbbe5aca20cc745046b70831bfc5e4a8f (patch) | |
tree | e699efc9a0368333bf509f24b5d112d64bab95fa | |
parent | 630e499724bda4ecb62b1f6652656e886f04197f (diff) |
[TG3]: Fix ethtool autonegotiate flags.
I recently noticed that when calling:
# ethtool -s eth0 autoneg on
on a 5722 (though I'm sure it's not specific to that card) that
subsequent checks of the cards status looked like this:
# ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: No <---- This seems odd?!?
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes
I noticed that the following commit:
commit 3600d918d870456ea8e7bb9d47f327de5c20f3d6
Author: Michael Chan <mchan@broadcom.com>
Date: Thu Dec 7 00:21:48 2006 -0800
[TG3]: Allow partial speed advertisement.
Honor the advertisement bitmask from ethtool. We used to always
advertise the full capability when autoneg was set to on.
changed things around so that ethtool speed settings were strictly
followed. Unfortunately ethtool doesn't seem to set ADVERTISED_Autoneg
in the advertising field (and maybe it shouldn't have to). I'd vote
that it should be fixed there, but it should also be added here just in
case someone using ethtool ioctls in their own application gets what
they want.
Adding that flag in tg3_set_settings seemed like the most logical place
since the driver works fine on boot. This is just an issue when
re-enabling autonegotiation, so we should probably nip it there.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tg3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b1e5660baf4a..1e0c9e0dc394 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -8101,7 +8101,8 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
8101 | 8101 | ||
8102 | tp->link_config.autoneg = cmd->autoneg; | 8102 | tp->link_config.autoneg = cmd->autoneg; |
8103 | if (cmd->autoneg == AUTONEG_ENABLE) { | 8103 | if (cmd->autoneg == AUTONEG_ENABLE) { |
8104 | tp->link_config.advertising = cmd->advertising; | 8104 | tp->link_config.advertising = (cmd->advertising | |
8105 | ADVERTISED_Autoneg); | ||
8105 | tp->link_config.speed = SPEED_INVALID; | 8106 | tp->link_config.speed = SPEED_INVALID; |
8106 | tp->link_config.duplex = DUPLEX_INVALID; | 8107 | tp->link_config.duplex = DUPLEX_INVALID; |
8107 | } else { | 8108 | } else { |