diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-06-17 20:44:20 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 00:34:25 -0400 |
commit | 6921368f64c59b2a1d4659a958c69458c94d8b75 (patch) | |
tree | 61b2c7b08ffa56d33ff5b0899b8074d09692b701 | |
parent | d439d4b7ac24b341a40a98995f6a6d3ef586eaf7 (diff) |
[PATCH] e1000: Ethtool set speed/duplex validates parameters for consistency
Ethtool set speed/duplex validates parameters for consistency
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index d59f75b7bf16..f680c87254ba 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3617,6 +3617,13 @@ e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx) | |||
3617 | { | 3617 | { |
3618 | adapter->hw.autoneg = 0; | 3618 | adapter->hw.autoneg = 0; |
3619 | 3619 | ||
3620 | /* Fiber NICs only allow 1000 gbps Full duplex */ | ||
3621 | if((adapter->hw.media_type == e1000_media_type_fiber) && | ||
3622 | spddplx != (SPEED_1000 + DUPLEX_FULL)) { | ||
3623 | DPRINTK(PROBE, ERR, "Unsupported Speed/Duplex configuration\n"); | ||
3624 | return -EINVAL; | ||
3625 | } | ||
3626 | |||
3620 | switch(spddplx) { | 3627 | switch(spddplx) { |
3621 | case SPEED_10 + DUPLEX_HALF: | 3628 | case SPEED_10 + DUPLEX_HALF: |
3622 | adapter->hw.forced_speed_duplex = e1000_10_half; | 3629 | adapter->hw.forced_speed_duplex = e1000_10_half; |