From 2da231f40cfdb8611edf4dafb2e27fd279c20fe4 Mon Sep 17 00:00:00 2001 From: Chuck Ebbert Date: Thu, 8 Dec 2011 20:30:28 -0500 Subject: [PATCH] Fix wrong link speed on some sky2 network adapters (rhbz #757839) --- kernel.spec | 7 +++++ net-sky2-88e8059-fix-link-speed.patch | 42 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 net-sky2-88e8059-fix-link-speed.patch diff --git a/kernel.spec b/kernel.spec index eb879c9b0..0ec1019b8 100644 --- a/kernel.spec +++ b/kernel.spec @@ -696,6 +696,9 @@ Patch21220: mac80211_offchannel_rework_revert.patch Patch21225: pci-Rework-ASPM-disable-code.patch +#rhbz #757839 +Patch21230: net-sky2-88e8059-fix-link-speed.patch + %endif BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root @@ -1283,6 +1286,9 @@ ApplyPatch mac80211_offchannel_rework_revert.patch ApplyPatch pci-Rework-ASPM-disable-code.patch +#rhbz #757839 +ApplyPatch net-sky2-88e8059-fix-link-speed.patch + # END OF PATCH APPLICATIONS %endif @@ -1902,6 +1908,7 @@ fi %changelog * Thu Dec 08 2011 Chuck Ebbert 2.6.41.5-0.rc2.1 - Linux 3.1.5-rc2 (Fedora 2.6.41.5-rc2) +- Fix wrong link speed on some sky2 network adapters (rhbz #757839) * Wed Dec 07 2011 Chuck Ebbert - Linux 3.1.5-rc1 (Fedora 2.6.41.5-rc1) diff --git a/net-sky2-88e8059-fix-link-speed.patch b/net-sky2-88e8059-fix-link-speed.patch new file mode 100644 index 000000000..61e1c75df --- /dev/null +++ b/net-sky2-88e8059-fix-link-speed.patch @@ -0,0 +1,42 @@ +commit 27d240fdae2808d727ad9ce48ec029731a457524 +Author: stephen hemminger +Date: Fri Nov 4 12:17:17 2011 +0000 + + sky2: fix regression on Yukon Optima + + [ backport to 3.1 ] + + Changes to support other Optima types, introduced an accidental + regression that caused 88E8059 to come up in 10Mbit/sec. + + The Yukon Optima supports a reverse auto-negotiation feature that + was incorrectly setup, and not needed. The feature could be used to + allow wake-on-lan at higher speeds. But doing it correctly would require + other changes to initialization. + + Reported-by: Pavel Mateja + Signed-off-by: Stephen Hemminger + Signed-off-by: David S. Miller + +diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c +index cbd026f..fdc6c39 100644 +--- a/drivers/net/sky2.c ++++ b/drivers/net/sky2.c +@@ -366,17 +366,6 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) + gm_phy_write(hw, port, PHY_MARV_FE_SPEC_2, spec); + } + } else { +- if (hw->chip_id >= CHIP_ID_YUKON_OPT) { +- u16 ctrl2 = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL_2); +- +- /* enable PHY Reverse Auto-Negotiation */ +- ctrl2 |= 1u << 13; +- +- /* Write PHY changes (SW-reset must follow) */ +- gm_phy_write(hw, port, PHY_MARV_EXT_CTRL_2, ctrl2); +- } +- +- + /* disable energy detect */ + ctrl &= ~PHY_M_PC_EN_DET_MSK; +