* [PATCH 01/05] r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
@ 2007-11-08 23:08 ` Francois Romieu
2007-11-08 23:09 ` [PATCH 02/05] r8169: do not enable the TBI for the 8168 and the 81x0 Francois Romieu
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-11-08 23:08 UTC (permalink / raw)
To: jgarzik
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
drivers/net/r8169.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b94fa7e..702334e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -171,6 +171,8 @@ static struct pci_device_id rtl8169_pci_tbl[] = {
{ PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 },
{ PCI_VENDOR_ID_LINKSYS, 0x1032,
PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
+ { 0x0001, 0x8168,
+ PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
{0,},
};
--
1.5.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 02/05] r8169: do not enable the TBI for the 8168 and the 81x0
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
2007-11-08 23:08 ` [PATCH 01/05] r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard Francois Romieu
@ 2007-11-08 23:09 ` Francois Romieu
2007-11-08 23:10 ` [PATCH 03/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly) Francois Romieu
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-11-08 23:09 UTC (permalink / raw)
To: jgarzik
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
The 8168c and the 8100e choke on it. I have not seen an indication
nor received a report that the TBI is being actively used on the
remaining 8168b and 8110. Let's disable it for now until someone
complains.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Matthias Winkler <m.winkler@unicon-ka.de>
Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
drivers/net/r8169.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 702334e..9dbab3f 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1741,7 +1741,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp->features |= rtl_try_msi(pdev, ioaddr, cfg);
RTL_W8(Cfg9346, Cfg9346_Lock);
- if (RTL_R8(PHYstatus) & TBI_Enable) {
+ if ((tp->mac_version <= RTL_GIGA_MAC_VER_06) &&
+ (RTL_R8(PHYstatus) & TBI_Enable)) {
tp->set_speed = rtl8169_set_speed_tbi;
tp->get_settings = rtl8169_gset_tbi;
tp->phy_reset_enable = rtl8169_tbi_reset_enable;
--
1.5.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 03/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
2007-11-08 23:08 ` [PATCH 01/05] r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard Francois Romieu
2007-11-08 23:09 ` [PATCH 02/05] r8169: do not enable the TBI for the 8168 and the 81x0 Francois Romieu
@ 2007-11-08 23:10 ` Francois Romieu
2007-11-08 23:11 ` [PATCH 04/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita) Francois Romieu
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-11-08 23:10 UTC (permalink / raw)
To: jgarzik
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)
A real power-off is needed to recover the card.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
---
drivers/net/r8169.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 9dbab3f..a37cf82 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1328,6 +1328,7 @@ static void rtl_hw_phy_config(struct net_device *dev)
break;
case RTL_GIGA_MAC_VER_11:
case RTL_GIGA_MAC_VER_12:
+ break;
case RTL_GIGA_MAC_VER_17:
rtl8168b_hw_phy_config(ioaddr);
break;
--
1.5.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 04/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
` (2 preceding siblings ...)
2007-11-08 23:10 ` [PATCH 03/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly) Francois Romieu
@ 2007-11-08 23:11 ` Francois Romieu
2007-11-08 23:12 ` [PATCH 05/05] r8169: prevent bit sign expansion error in mdio_write Francois Romieu
2007-11-10 5:33 ` [PATCH 00/05] pull request for 'upstream-jeff' branch Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-11-08 23:11 UTC (permalink / raw)
To: jgarzik
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
RTL_GIGA_MAC_VER_17 breaks as well.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
drivers/net/r8169.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a37cf82..f9ba2e4 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1247,16 +1247,6 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
-static void rtl8168b_hw_phy_config(void __iomem *ioaddr)
-{
- struct phy_reg phy_reg_init[] = {
- { 0x1f, 0x0000 },
- { 0x10, 0xf41b },
- { 0x1f, 0x0000 }
- };
-
- rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
-}
static void rtl8168cp_hw_phy_config(void __iomem *ioaddr)
{
@@ -1326,12 +1316,6 @@ static void rtl_hw_phy_config(struct net_device *dev)
case RTL_GIGA_MAC_VER_04:
rtl8169sb_hw_phy_config(ioaddr);
break;
- case RTL_GIGA_MAC_VER_11:
- case RTL_GIGA_MAC_VER_12:
- break;
- case RTL_GIGA_MAC_VER_17:
- rtl8168b_hw_phy_config(ioaddr);
- break;
case RTL_GIGA_MAC_VER_18:
rtl8168cp_hw_phy_config(ioaddr);
break;
--
1.5.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 05/05] r8169: prevent bit sign expansion error in mdio_write
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
` (3 preceding siblings ...)
2007-11-08 23:11 ` [PATCH 04/05] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita) Francois Romieu
@ 2007-11-08 23:12 ` Francois Romieu
2007-11-10 5:33 ` [PATCH 00/05] pull request for 'upstream-jeff' branch Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-11-08 23:12 UTC (permalink / raw)
To: jgarzik
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
Oops.
The current code does not like being given an u16 with the highest
bit set as an argument to mdio_write. Let's enforce a correct range of
values for both the register address and value (resp. 5 and 16 bits).
The callers are currently left as-is.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
drivers/net/r8169.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index f9ba2e4..1f647b9 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -470,7 +470,7 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
{
int i;
- RTL_W32(PHYAR, 0x80000000 | (reg_addr & 0xFF) << 16 | value);
+ RTL_W32(PHYAR, 0x80000000 | (reg_addr & 0x1f) << 16 | (value & 0xffff));
for (i = 20; i > 0; i--) {
/*
@@ -487,7 +487,7 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
{
int i, value = -1;
- RTL_W32(PHYAR, 0x0 | (reg_addr & 0xFF) << 16);
+ RTL_W32(PHYAR, 0x0 | (reg_addr & 0x1f) << 16);
for (i = 20; i > 0; i--) {
/*
@@ -495,7 +495,7 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
* the specified MII register.
*/
if (RTL_R32(PHYAR) & 0x80000000) {
- value = (int) (RTL_R32(PHYAR) & 0xFFFF);
+ value = RTL_R32(PHYAR) & 0xffff;
break;
}
udelay(25);
--
1.5.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 00/05] pull request for 'upstream-jeff' branch
2007-11-08 23:07 [PATCH 00/05] pull request for 'upstream-jeff' branch Francois Romieu
` (4 preceding siblings ...)
2007-11-08 23:12 ` [PATCH 05/05] r8169: prevent bit sign expansion error in mdio_write Francois Romieu
@ 2007-11-10 5:33 ` Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2007-11-10 5:33 UTC (permalink / raw)
To: Francois Romieu
Cc: netdev, Andrew Morton, Mark Lord, Ciaran McCreesh, Josh Logan,
cecco, Hans-Jurgen Koch, David Gundersen, Will Trives,
Alexander Y. Fomichev, Rolf Eike Beer, Daniel Drake,
Lennert Buytenhek, Philip Craig, Edward Hsu
Francois Romieu wrote:
> Please pull from branch 'upstream-jeff' in repository
>
> git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git upstream-jeff
>
> to get the changes below.
>
> They should make things better for people who have experienced the 8168b
> regression since 2.6.24-rc1.
>
> Distance from 'master' (f2511f13daaf00fdd206bee7b108f75923a613c6)
> -----------------------------------------------------------------
>
> 407b35429151dd1d7a64cbef9f4bc59dac2efe5d
> d981c1de3b81edf50fe59f0e1298668919117b14
> 9d891d0bb0a14bc8184eee45323cb010db4d0db4
> 69b4d070ea49bd7f589776ea471a6988345eeee5
> db1470271c581050dcacc6ed681b9166d30bdba0
>
> Diffstat
> --------
>
> drivers/net/r8169.c | 26 +++++++-------------------
> 1 files changed, 7 insertions(+), 19 deletions(-)
>
> Shortlog
> --------
>
> Ciaran McCreesh (1):
> r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard
>
> Francois Romieu (2):
> r8169: do not enable the TBI for the 8168 and the 81x0
> r8169: prevent bit sign expansion error in mdio_write
>
> Mark Lord (2):
> r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)
> r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)
>
pulled
^ permalink raw reply [flat|nested] 7+ messages in thread