Re: 2.6.27.19 + 28.7: network timeouts for r8169 and 8139too

From: Francois Romieu
Date: Sun Mar 22 2009 - 17:10:25 EST


Rui Santos <rsantos@xxxxxxxxxxxx> :
[...]
> I Finally ended up the big bisect operation. The commit responsible for
> this issue is commit
> b726e493e8dc13537d1d7f8cd66bcd28516606c3
> labeled
> 'r8169: sync existing 8168 device hardware start sequences with vendor
> driver'

Thanks a lot for the bisect.

> With that patch removed, I was able to get a sustained 40MB/s+ on a
> 20GB ftp transfer. I wasn't able to do it with the specified patch applied.
> Just as a side note, I was never able to reproduce it on a 100MBit
> connection, only on a full 1GBit one...
>
> However this patch will not reverse on the current kernel.
>
> What do you think the next step should be ?
> As usual, if you need any testing, please do let me know.

Can you see if one of the attached patches or a combination of them
makes a difference for the current (-git) kernel ?

--
Ueimor
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 43fedb9..c23a448 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2620,15 +2620,6 @@ static void rtl_hw_start_8168c_1(void __iomem *ioaddr, struct pci_dev *pdev)

static void rtl_hw_start_8168c_2(void __iomem *ioaddr, struct pci_dev *pdev)
{
- static struct ephy_info e_info_8168c_2[] = {
- { 0x01, 0, 0x0001 },
- { 0x03, 0x0400, 0x0220 }
- };
-
- rtl_csi_access_enable(ioaddr);
-
- rtl_ephy_init(ioaddr, e_info_8168c_2, ARRAY_SIZE(e_info_8168c_2));
-
__rtl_hw_start_8168cp(ioaddr, pdev);
}

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 43fedb9..f56d20e 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2546,15 +2546,7 @@ static void rtl_hw_start_8168bef(void __iomem *ioaddr, struct pci_dev *pdev)

static void __rtl_hw_start_8168cp(void __iomem *ioaddr, struct pci_dev *pdev)
{
- RTL_W8(Config1, RTL_R8(Config1) | Speed_down);
-
- RTL_W8(Config3, RTL_R8(Config3) & ~Beacon_en);
-
rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
-
- rtl_disable_clock_request(pdev);
-
- RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) & ~R8168_CPCMD_QUIRK_MASK);
}

static void rtl_hw_start_8168cp_1(void __iomem *ioaddr, struct pci_dev *pdev)