projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d5b7c3
)
igb: add check for fiber/serdes devices to igb_set_spd_dplx;
author
Carolyn Wyborny
<
[email protected]
>
Tue, 12 Oct 2010 22:27:02 +0000
(22:27 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 14 Oct 2010 17:49:44 +0000
(10:49 -0700)
Signed-off-by: Carolyn Wyborny <
[email protected]
>
Tested-by: Emil Tantilov <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/igb/igb_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/igb/igb_main.c
b/drivers/net/igb/igb_main.c
index 55edcb74abf44c53e16287e0bea6dfd630605ef4..5b04eff2fd23458eee1ef7b7098194db754ab573 100644
(file)
--- 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;