mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
linux: add network related upstream patches, backported from 3.8.7
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
5bd4e7e1bb
commit
1db6430a0c
69
packages/linux/patches/3.7.10/linux-990.21-r8169-fix_auto_speed_down_issue.patch
vendored
Normal file
69
packages/linux/patches/3.7.10/linux-990.21-r8169-fix_auto_speed_down_issue.patch
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
From 77e2cc382c06a8be48f80e769991e9a4b36a03ce Mon Sep 17 00:00:00 2001
|
||||
From: hayeswang <hayeswang@realtek.com>
|
||||
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 <hayeswang@realtek.com>
|
||||
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
|
||||
---
|
||||
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
|
@ -0,0 +1,42 @@
|
||||
From 19a993879bb86c801995f55702ab6beaa5485f5e Mon Sep 17 00:00:00 2001
|
||||
From: Tim Gardner <tim.gardner@canonical.com>
|
||||
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 <tim.gardner@canonical.com>
|
||||
Cc: Ivo van Doorn <IvDoorn@gmail.com>
|
||||
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
|
||||
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
Cc: "John W. Linville" <linville@tuxdriver.com>
|
||||
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 <linville@tuxdriver.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
---
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user