Currently the e1000 driver only supplies the active link speed / duplex when a link-beat is present to ethtool. This patch adds support for supplying the configured speed / duplex when auto-negotiation is disabled and no link-beat is present.
Signed-off-by: Martin Josefsson <[EMAIL PROTECTED]>
--- linux-2.6.15-rc1-git6.orig/drivers/net/e1000/e1000_ethtool.c
2005-11-18 20:06:57.000000000 +0100
+++ linux-2.6.15-rc1-git6/drivers/net/e1000/e1000_ethtool.c 2005-11-18
20:07:46.000000000 +0100
@@ -168,8 +168,32 @@ e1000_get_settings(struct net_device *ne
else
ecmd->duplex = DUPLEX_HALF;
} else {
- ecmd->speed = -1;
- ecmd->duplex = -1;
+ if (hw->autoneg == 1) {
+ ecmd->speed = -1;
+ ecmd->duplex = -1;
+ } else {
+ switch(adapter->hw.forced_speed_duplex) {
+ case e1000_10_half:
+ ecmd->speed = SPEED_10;
+ ecmd->duplex = DUPLEX_HALF;
+ break;
+ case e1000_10_full:
+ ecmd->speed = SPEED_10;
+ ecmd->duplex = DUPLEX_FULL;
+ break;
+ case e1000_100_half:
+ ecmd->speed = SPEED_100;
+ ecmd->duplex = DUPLEX_HALF;
+ break;
+ case e1000_100_full:
+ ecmd->speed = SPEED_100;
+ ecmd->duplex = DUPLEX_FULL;
+ break;
+ default:
+ ecmd->speed = -1;
+ ecmd->duplex = -1;
+ }
+ }
}
ecmd->autoneg = ((hw->media_type == e1000_media_type_fiber) ||
signature.asc
Description: This is a digitally signed message part
