diff --git a/packages/linux/patches/3.7.10/linux-990.21-r8169-fix_auto_speed_down_issue.patch b/packages/linux/patches/3.7.10/linux-990.21-r8169-fix_auto_speed_down_issue.patch new file mode 100644 index 0000000000..e446952277 --- /dev/null +++ b/packages/linux/patches/3.7.10/linux-990.21-r8169-fix_auto_speed_down_issue.patch @@ -0,0 +1,69 @@ +From 77e2cc382c06a8be48f80e769991e9a4b36a03ce Mon Sep 17 00:00:00 2001 +From: hayeswang +Date: Sun, 31 Mar 2013 17:02:04 +0000 +Subject: r8169: fix auto speed down issue + +commit e2409d83434d77874b461b78af6a19cd6e6a1280 upstream. + +It would cause no link after suspending or shutdowning when the +nic changes the speed to 10M and connects to a link partner which +forces the speed to 100M. + +Check the link partner ability to determine which speed to set. + +Signed-off-by: Hayes Wang +Acked-by: Francois Romieu +Signed-off-by: David S. Miller +Signed-off-by: Jonghwan Choi +Signed-off-by: Greg Kroah-Hartman + + +--- +diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c +index 998974f..2d849da 100644 +--- a/drivers/net/ethernet/realtek/r8169.c ++++ b/drivers/net/ethernet/realtek/r8169.c +@@ -3819,6 +3819,30 @@ static void rtl_init_mdio_ops(struct rtl8169_private *tp) + } + } + ++static void rtl_speed_down(struct rtl8169_private *tp) ++{ ++ u32 adv; ++ int lpa; ++ ++ rtl_writephy(tp, 0x1f, 0x0000); ++ lpa = rtl_readphy(tp, MII_LPA); ++ ++ if (lpa & (LPA_10HALF | LPA_10FULL)) ++ adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full; ++ else if (lpa & (LPA_100HALF | LPA_100FULL)) ++ adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full; ++ else ++ adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ++ (tp->mii.supports_gmii ? ++ ADVERTISED_1000baseT_Half | ++ ADVERTISED_1000baseT_Full : 0); ++ ++ rtl8169_set_speed(tp->dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FULL, ++ adv); ++} ++ + static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) + { + void __iomem *ioaddr = tp->mmio_addr; +@@ -3849,9 +3873,7 @@ static bool rtl_wol_pll_power_down(struct rtl8169_private *tp) + if (!(__rtl8169_get_wol(tp) & WAKE_ANY)) + return false; + +- rtl_writephy(tp, 0x1f, 0x0000); +- rtl_writephy(tp, MII_BMCR, 0x0000); +- ++ rtl_speed_down(tp); + rtl_wol_suspend_quirk(tp); + + return true; +-- +cgit v0.9.1 diff --git a/packages/linux/patches/3.7.10/linux-990.22-rt2x00-rt2x00pci_regbusy_read-only_print_register_access_failure_once.patch b/packages/linux/patches/3.7.10/linux-990.22-rt2x00-rt2x00pci_regbusy_read-only_print_register_access_failure_once.patch new file mode 100644 index 0000000000..87fa27802a --- /dev/null +++ b/packages/linux/patches/3.7.10/linux-990.22-rt2x00-rt2x00pci_regbusy_read-only_print_register_access_failure_once.patch @@ -0,0 +1,42 @@ +From 19a993879bb86c801995f55702ab6beaa5485f5e Mon Sep 17 00:00:00 2001 +From: Tim Gardner +Date: Mon, 18 Feb 2013 19:56:28 +0000 +Subject: rt2x00: rt2x00pci_regbusy_read() - only print register access failure once + +commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream. + +BugLink: http://bugs.launchpad.net/bugs/1128840 + +It appears that when this register read fails it never recovers, so +I think there is no need to repeat the same error message ad infinitum. + +Signed-off-by: Tim Gardner +Cc: Ivo van Doorn +Cc: Gertjan van Wingerde +Cc: Helmut Schaa +Cc: "John W. Linville" +Cc: linux-wireless@vger.kernel.org +Cc: users@rt2x00.serialmonkey.com +Cc: netdev@vger.kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- +diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c +index a0c8cae..b1c673e 100644 +--- a/drivers/net/wireless/rt2x00/rt2x00pci.c ++++ b/drivers/net/wireless/rt2x00/rt2x00pci.c +@@ -52,8 +52,8 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev, + udelay(REGISTER_BUSY_DELAY); + } + +- ERROR(rt2x00dev, "Indirect register access failed: " +- "offset=0x%.08x, value=0x%.08x\n", offset, *reg); ++ printk_once(KERN_ERR "%s() Indirect register access failed: " ++ "offset=0x%.08x, value=0x%.08x\n", __func__, offset, *reg); + *reg = ~0; + + return 0; +-- +cgit v0.9.1