diff options
author | Michael Chan <mchan@broadcom.com> | 2005-10-26 18:49:51 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 16:07:30 -0400 |
commit | 37ff238d68683d42e7363eee3303773906c336d9 (patch) | |
tree | 45a016abbed939ee11427941b7036f6cfeca20d3 /drivers | |
parent | 28fbef78a420acdea20570d31f3bdcbfa0cac0d2 (diff) |
[PATCH] tg3: update version and minor fixes
Update version and reldate and add more sanity checking to
tg3_set_settings().
Signed-off-by: Gary Zambrano <zambrano@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 479be21425fb..551c9449322d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -67,8 +67,8 @@ | |||
67 | 67 | ||
68 | #define DRV_MODULE_NAME "tg3" | 68 | #define DRV_MODULE_NAME "tg3" |
69 | #define PFX DRV_MODULE_NAME ": " | 69 | #define PFX DRV_MODULE_NAME ": " |
70 | #define DRV_MODULE_VERSION "3.42" | 70 | #define DRV_MODULE_VERSION "3.43" |
71 | #define DRV_MODULE_RELDATE "Oct 3, 2005" | 71 | #define DRV_MODULE_RELDATE "Oct 24, 2005" |
72 | 72 | ||
73 | #define TG3_DEF_MAC_MODE 0 | 73 | #define TG3_DEF_MAC_MODE 0 |
74 | #define TG3_DEF_RX_MODE 0 | 74 | #define TG3_DEF_RX_MODE 0 |
@@ -7279,7 +7279,7 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
7279 | { | 7279 | { |
7280 | struct tg3 *tp = netdev_priv(dev); | 7280 | struct tg3 *tp = netdev_priv(dev); |
7281 | 7281 | ||
7282 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { | 7282 | if (tp->tg3_flags2 & TG3_FLG2_ANY_SERDES) { |
7283 | /* These are the only valid advertisement bits allowed. */ | 7283 | /* These are the only valid advertisement bits allowed. */ |
7284 | if (cmd->autoneg == AUTONEG_ENABLE && | 7284 | if (cmd->autoneg == AUTONEG_ENABLE && |
7285 | (cmd->advertising & ~(ADVERTISED_1000baseT_Half | | 7285 | (cmd->advertising & ~(ADVERTISED_1000baseT_Half | |
@@ -7287,7 +7287,17 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
7287 | ADVERTISED_Autoneg | | 7287 | ADVERTISED_Autoneg | |
7288 | ADVERTISED_FIBRE))) | 7288 | ADVERTISED_FIBRE))) |
7289 | return -EINVAL; | 7289 | return -EINVAL; |
7290 | } | 7290 | /* Fiber can only do SPEED_1000. */ |
7291 | else if ((cmd->autoneg != AUTONEG_ENABLE) && | ||
7292 | (cmd->speed != SPEED_1000)) | ||
7293 | return -EINVAL; | ||
7294 | /* Copper cannot force SPEED_1000. */ | ||
7295 | } else if ((cmd->autoneg != AUTONEG_ENABLE) && | ||
7296 | (cmd->speed == SPEED_1000)) | ||
7297 | return -EINVAL; | ||
7298 | else if ((cmd->speed == SPEED_1000) && | ||
7299 | (tp->tg3_flags2 & TG3_FLAG_10_100_ONLY)) | ||
7300 | return -EINVAL; | ||
7291 | 7301 | ||
7292 | tg3_full_lock(tp, 0); | 7302 | tg3_full_lock(tp, 0); |
7293 | 7303 | ||