diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-06-17 17:44:20 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 00:34:25 -0400 |
commit | 6921368f64c59b2a1d4659a958c69458c94d8b75 (patch) | |
tree | 61b2c7b08ffa56d33ff5b0899b8074d09692b701 /drivers/net | |
parent | d439d4b7ac24b341a40a98995f6a6d3ef586eaf7 (diff) | |
download | op-kernel-dev-6921368f64c59b2a1d4659a958c69458c94d8b75.zip op-kernel-dev-6921368f64c59b2a1d4659a958c69458c94d8b75.tar.gz |
[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>
Diffstat (limited to 'drivers/net')
-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 d59f75b..f680c87 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) { adapter->hw.autoneg = 0; + /* Fiber NICs only allow 1000 gbps Full duplex */ + if((adapter->hw.media_type == e1000_media_type_fiber) && + spddplx != (SPEED_1000 + DUPLEX_FULL)) { + DPRINTK(PROBE, ERR, "Unsupported Speed/Duplex configuration\n"); + return -EINVAL; + } + switch(spddplx) { case SPEED_10 + DUPLEX_HALF: adapter->hw.forced_speed_duplex = e1000_10_half; |