aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorCarolyn Wyborny <carolyn.wyborny@intel.com>2010-10-12 18:27:02 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-14 13:49:44 -0400
commitcd2638a86c7b90e77ce623c09de2a26177f2a5c1 (patch)
tree53393f089bdacbdb054ce7c4d85252c1c4ac0e4b /drivers/net/igb/igb_main.c
parent5d5b7c39cfdc459c079ed75b65a537f40ffb82da (diff)
igb: add check for fiber/serdes devices to igb_set_spd_dplx;
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 55edcb74abf4..5b04eff2fd23 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -6115,6 +6115,13 @@ int igb_set_spd_dplx(struct igb_adapter *adapter, u16 spddplx)
6115 6115
6116 mac->autoneg = 0; 6116 mac->autoneg = 0;
6117 6117
6118 /* Fiber NIC's only allow 1000 Gbps Full duplex */
6119 if ((adapter->hw.phy.media_type == e1000_media_type_internal_serdes) &&
6120 spddplx != (SPEED_1000 + DUPLEX_FULL)) {
6121 dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration\n");
6122 return -EINVAL;
6123 }
6124
6118 switch (spddplx) { 6125 switch (spddplx) {
6119 case SPEED_10 + DUPLEX_HALF: 6126 case SPEED_10 + DUPLEX_HALF:
6120 mac->forced_speed_duplex = ADVERTISE_10_HALF; 6127 mac->forced_speed_duplex = ADVERTISE_10_HALF;