From: Carolyn Wyborny Date: Tue, 12 Oct 2010 22:27:02 +0000 (+0000) Subject: igb: add check for fiber/serdes devices to igb_set_spd_dplx; X-Git-Tag: MMI-PSA29.97-13-9~21994^2~144 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd2638a86c7b90e77ce623c09de2a26177f2a5c1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git igb: add check for fiber/serdes devices to igb_set_spd_dplx; Signed-off-by: Carolyn Wyborny Tested-by: Emil Tantilov Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- 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) mac->autoneg = 0; + /* Fiber NIC's only allow 1000 Gbps Full duplex */ + if ((adapter->hw.phy.media_type == e1000_media_type_internal_serdes) && + spddplx != (SPEED_1000 + DUPLEX_FULL)) { + dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration\n"); + return -EINVAL; + } + switch (spddplx) { case SPEED_10 + DUPLEX_HALF: mac->forced_speed_duplex = ADVERTISE_10_HALF;