All of lore.kernel.org
 help / color / mirror / Atom feed
* r8169 hangs machine on kernel boot (bisected)
@ 2011-02-16 22:34 Alexander Wuerstlein
  2011-02-18  5:44 ` hayeswang
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Wuerstlein @ 2011-02-16 22:34 UTC (permalink / raw)
  To: franois romieu; +Cc: Hayes, David S. Miller, linux-kernel

Hello,

I've just tried to boot a new computer featuring a Realtek r8168 onboard
(lspci calls it Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI
Express Gigabit Ethernet controller [10ec:8168] (rev 04), see [1])
network chip with kernel 2.6.38-rc5 and current git. Both hang on boot
just after USB device initialization and just before the kernel usually
does DHCP. The previous 2.6.37 didn't hang on boot, but showed strange
behaviour (only 10MBit half duplex on autonegotiation, tons of errors on
the switch interface[2]) which is why I tried the newer kernel in hopes
that there would be fixes.

I bisected the hang-before-dhcp bug down to commit 'r8169: magic.'
(b646d90053f887c1bc243191e693a9b02d09f2c2, also see [1]). Since the
commit really does its description justice and looks like some weird
hardware magic, I'd like to ask the wizards on how to proceed with
fixing it.



Ciao,

Alexander Wuerstlein.

[1] Kernel .config, lspci, bisect log:
    http://wwwcip.cs.fau.de/~snalwuer/kernel-r8169/
[2] the Realtek-supplied r8168 doesn't show those problems
[3] feel free to criticise my Cc:, I wasn't quite sure...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: r8169 hangs machine on kernel boot (bisected)
  2011-02-16 22:34 r8169 hangs machine on kernel boot (bisected) Alexander Wuerstlein
@ 2011-02-18  5:44 ` hayeswang
  2011-02-18 17:30   ` Alexander Wuerstlein
  0 siblings, 1 reply; 7+ messages in thread
From: hayeswang @ 2011-02-18  5:44 UTC (permalink / raw)
  To: 'Alexander Wuerstlein'
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

Hello,

I have try the 8168DP and it wouldn't hang. I think I need more information.
Could you give the information about the motherboard and the version of BIOS.
Besides, please use the realtek driver, and dump the MAC information by using
"ethtool -d eth0". These are helpful to find out what happens. Thanks.
 
Best Regards,
Hayes


-----Original Message-----
From: Alexander Wuerstlein [mailto:arw@arw.name] 
Sent: Thursday, February 17, 2011 6:35 AM
To: franois romieu
Cc: Hayeswang; David S. Miller; linux-kernel@vger.kernel.org
Subject: r8169 hangs machine on kernel boot (bisected)

Hello,

I've just tried to boot a new computer featuring a Realtek r8168 onboard (lspci
calls it Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit
Ethernet controller [10ec:8168] (rev 04), see [1]) network chip with kernel
2.6.38-rc5 and current git. Both hang on boot just after USB device
initialization and just before the kernel usually does DHCP. The previous 2.6.37
didn't hang on boot, but showed strange behaviour (only 10MBit half duplex on
autonegotiation, tons of errors on the switch interface[2]) which is why I tried
the newer kernel in hopes that there would be fixes.

I bisected the hang-before-dhcp bug down to commit 'r8169: magic.'
(b646d90053f887c1bc243191e693a9b02d09f2c2, also see [1]). Since the commit
really does its description justice and looks like some weird hardware magic,
I'd like to ask the wizards on how to proceed with fixing it.



Ciao,

Alexander Wuerstlein.

[1] Kernel .config, lspci, bisect log:
    http://wwwcip.cs.fau.de/~snalwuer/kernel-r8169/
[2] the Realtek-supplied r8168 doesn't show those problems [3] feel free to
criticise my Cc:, I wasn't quite sure...


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: r8169 hangs machine on kernel boot (bisected)
  2011-02-18  5:44 ` hayeswang
@ 2011-02-18 17:30   ` Alexander Wuerstlein
  2011-02-21  2:05     ` hayeswang
  2011-02-22 12:30     ` hayeswang
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Wuerstlein @ 2011-02-18 17:30 UTC (permalink / raw)
  To: hayeswang
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

Hello,

On 11-02-18 15:01, hayeswang <hayeswang@realtek.com> wrote:
> Hello,
> > I've just tried to boot a new computer featuring a Realtek r8168 onboard (lspci
> > calls it Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit
> > Ethernet controller [10ec:8168] (rev 04), see [1]) network chip with kernel
> > 2.6.38-rc5 and current git. Both hang on boot just after USB device
> > initialization and just before the kernel usually does DHCP. The previous 2.6.37
> > didn't hang on boot, but showed strange behaviour (only 10MBit half duplex on
> > autonegotiation, tons of errors on the switch interface[2]) which is why I tried
> > the newer kernel in hopes that there would be fixes.
> > 
> > I bisected the hang-before-dhcp bug down to commit 'r8169: magic.'
> > (b646d90053f887c1bc243191e693a9b02d09f2c2, also see [1]). Since the commit
> > really does its description justice and looks like some weird hardware magic,
> > I'd like to ask the wizards on how to proceed with fixing it.
> 
> I have try the 8168DP and it wouldn't hang. I think I need more information.
> Could you give the information about the motherboard and the version of BIOS.
> Besides, please use the realtek driver, and dump the MAC information by using
> "ethtool -d eth0". These are helpful to find out what happens. Thanks.

I'm sorry that it took me so long to answer, I've had some problems
booting the machine today since the PXE-Client didn't get any DHCP
requests through. I'm not sure if its related, the problem cleared up
after I opened up the machine to get the motherboard data and stuff.

Long story short, new files 'bios', 'hardware' and 'ethtool-d' in
http://wwwcip.cs.fau.de/~snalwuer/kernel-r8169
Bios revision is the latest available from Fujitsu for that hardware.
Hardware numbers and serials are accurate, but the inscriptions on the
chips I suspected to be PHYs were very hard to read, so expect errors.
The 'ethtool-d' is especially curious, since it consists of only
'FF'-bytes. The ethtool register dump was taken on a 2.6.37 with r8168
as a module.

fujitsu.com also has some (limited, end-user-focused) hardware
documentation if you enter the serial number 'YL7E003277' on
http://ts.fujitsu.com/support/downloads.html

If you need any further information, don't hesitate to ask.



Ciao,

Alexander Wuerstlein.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: r8169 hangs machine on kernel boot (bisected)
  2011-02-18 17:30   ` Alexander Wuerstlein
@ 2011-02-21  2:05     ` hayeswang
  2011-02-22 12:30     ` hayeswang
  1 sibling, 0 replies; 7+ messages in thread
From: hayeswang @ 2011-02-21  2:05 UTC (permalink / raw)
  To: 'Alexander Wuerstlein'
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

 Hello,

> From: Alexander Wuerstlein [mailto:arw@arw.name] 
> Sent: Saturday, February 19, 2011 1:30 AM
> To: Hayeswang
> Cc: 'David S. Miller'; linux-kernel@vger.kernel.org; 'franois romieu'
> Subject: Re: r8169 hangs machine on kernel boot (bisected)
> 
> Hello,
> 
> On 11-02-18 15:01, hayeswang <hayeswang@realtek.com> wrote:
> > Hello,
> > > I've just tried to boot a new computer featuring a Realtek r8168 
> > > onboard (lspci calls it Realtek Semiconductor Co., Ltd. 
> > > RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] 
> > > (rev 04), see [1]) network chip with kernel
> > > 2.6.38-rc5 and current git. Both hang on boot just after 
> USB device 
> > > initialization and just before the kernel usually does DHCP. The 
> > > previous 2.6.37 didn't hang on boot, but showed strange behaviour 
> > > (only 10MBit half duplex on autonegotiation, tons of 
> errors on the 
> > > switch interface[2]) which is why I tried the newer 
> kernel in hopes that there would be fixes.
> > > 
> > > I bisected the hang-before-dhcp bug down to commit 'r8169: magic.'
> > > (b646d90053f887c1bc243191e693a9b02d09f2c2, also see [1]). 
> Since the 
> > > commit really does its description justice and looks like 
> some weird 
> > > hardware magic, I'd like to ask the wizards on how to 
> proceed with fixing it.
> > 
> > I have try the 8168DP and it wouldn't hang. I think I need 
> more information.
> > Could you give the information about the motherboard and 
> the version of BIOS.
> > Besides, please use the realtek driver, and dump the MAC 
> information 
> > by using "ethtool -d eth0". These are helpful to find out 
> what happens. Thanks.
> 
> I'm sorry that it took me so long to answer, I've had some 
> problems booting the machine today since the PXE-Client 
> didn't get any DHCP requests through. I'm not sure if its 
> related, the problem cleared up after I opened up the machine 
> to get the motherboard data and stuff.
> 
> Long story short, new files 'bios', 'hardware' and 'ethtool-d' in
> http://wwwcip.cs.fau.de/~snalwuer/kernel-r8169
> Bios revision is the latest available from Fujitsu for that hardware.
> Hardware numbers and serials are accurate, but the 
> inscriptions on the chips I suspected to be PHYs were very 
> hard to read, so expect errors.
> The 'ethtool-d' is especially curious, since it consists of 
> only 'FF'-bytes. The ethtool register dump was taken on a 
> 2.6.37 with r8168 as a module.

Thanks the information you provide. I would send the information to the related
people. However, the FF value of all registers is curious. I would try to
reproduce the issue first.

> 
> fujitsu.com also has some (limited, end-user-focused) 
> hardware documentation if you enter the serial number 
> 'YL7E003277' on http://ts.fujitsu.com/support/downloads.html
> 
> If you need any further information, don't hesitate to ask.
> 

 
Best Regards,
Hayes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: r8169 hangs machine on kernel boot (bisected)
  2011-02-18 17:30   ` Alexander Wuerstlein
  2011-02-21  2:05     ` hayeswang
@ 2011-02-22 12:30     ` hayeswang
  2011-02-22 14:38       ` Alexander Wuerstlein
  2011-02-23 22:10       ` Alexander Wuerstlein
  1 sibling, 2 replies; 7+ messages in thread
From: hayeswang @ 2011-02-22 12:30 UTC (permalink / raw)
  To: 'Alexander Wuerstlein'
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

[-- Attachment #1: Type: text/plain, Size: 2879 bytes --]

Hello,

please use the patch of the attatched file to check if it fix the issue. Thanks.
 
Best Regards,
Hayes
 

> -----Original Message-----
> From: Alexander Wuerstlein [mailto:arw@arw.name] 
> Sent: Saturday, February 19, 2011 1:30 AM
> To: Hayeswang
> Cc: 'David S. Miller'; linux-kernel@vger.kernel.org; 'franois romieu'
> Subject: Re: r8169 hangs machine on kernel boot (bisected)
> 
> Hello,
> 
> On 11-02-18 15:01, hayeswang <hayeswang@realtek.com> wrote:
> > Hello,
> > > I've just tried to boot a new computer featuring a Realtek r8168 
> > > onboard (lspci calls it Realtek Semiconductor Co., Ltd. 
> > > RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] 
> > > (rev 04), see [1]) network chip with kernel
> > > 2.6.38-rc5 and current git. Both hang on boot just after 
> USB device 
> > > initialization and just before the kernel usually does DHCP. The 
> > > previous 2.6.37 didn't hang on boot, but showed strange behaviour 
> > > (only 10MBit half duplex on autonegotiation, tons of 
> errors on the 
> > > switch interface[2]) which is why I tried the newer 
> kernel in hopes that there would be fixes.
> > > 
> > > I bisected the hang-before-dhcp bug down to commit 'r8169: magic.'
> > > (b646d90053f887c1bc243191e693a9b02d09f2c2, also see [1]). 
> Since the 
> > > commit really does its description justice and looks like 
> some weird 
> > > hardware magic, I'd like to ask the wizards on how to 
> proceed with fixing it.
> > 
> > I have try the 8168DP and it wouldn't hang. I think I need 
> more information.
> > Could you give the information about the motherboard and 
> the version of BIOS.
> > Besides, please use the realtek driver, and dump the MAC 
> information 
> > by using "ethtool -d eth0". These are helpful to find out 
> what happens. Thanks.
> 
> I'm sorry that it took me so long to answer, I've had some 
> problems booting the machine today since the PXE-Client 
> didn't get any DHCP requests through. I'm not sure if its 
> related, the problem cleared up after I opened up the machine 
> to get the motherboard data and stuff.
> 
> Long story short, new files 'bios', 'hardware' and 'ethtool-d' in
> http://wwwcip.cs.fau.de/~snalwuer/kernel-r8169
> Bios revision is the latest available from Fujitsu for that hardware.
> Hardware numbers and serials are accurate, but the 
> inscriptions on the chips I suspected to be PHYs were very 
> hard to read, so expect errors.
> The 'ethtool-d' is especially curious, since it consists of 
> only 'FF'-bytes. The ethtool register dump was taken on a 
> 2.6.37 with r8168 as a module.
> 
> fujitsu.com also has some (limited, end-user-focused) 
> hardware documentation if you enter the serial number 
> 'YL7E003277' on http://ts.fujitsu.com/support/downloads.html
> 
> If you need any further information, don't hesitate to ask.
> 
> 
> 
> Ciao,
> 
> Alexander Wuerstlein.

[-- Attachment #2: 0002-net-r8169-fix-the-wrong-parameter-of-point-address.patch --]
[-- Type: application/octet-stream, Size: 1193 bytes --]

>From cb72287585ed3c8ca87ac03634b31bf8df6bf58f Mon Sep 17 00:00:00 2001
From: Hayes Wang <hayeswang@realtek.com>
Date: Tue, 22 Feb 2011 17:06:21 +0800
Subject: [PATCH 2/3] net/r8169: fix the wrong parameter of point address

Correct the parameter of rtl8168_oob_notify. It results in the
wrong point address and influences RTL8168DP.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/r8169.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 3630dd7..336ba94 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -617,8 +617,9 @@ static void ocp_write(struct rtl8169_private *tp, u8 mask, u16 reg, u32 data)
 	}
 }
 
-static void rtl8168_oob_notify(void __iomem *ioaddr, u8 cmd)
+static void rtl8168_oob_notify(struct rtl8169_private *tp, u8 cmd)
 {
+	void __iomem *ioaddr = tp->mmio_addr;
 	int i;
 
 	RTL_W8(ERIDR, cmd);
@@ -630,7 +631,7 @@ static void rtl8168_oob_notify(void __iomem *ioaddr, u8 cmd)
 			break;
 	}
 
-	ocp_write(ioaddr, 0x1, 0x30, 0x00000001);
+	ocp_write(tp, 0x1, 0x30, 0x00000001);
 }
 
 #define OOB_CMD_RESET		0x00
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: r8169 hangs machine on kernel boot (bisected)
  2011-02-22 12:30     ` hayeswang
@ 2011-02-22 14:38       ` Alexander Wuerstlein
  2011-02-23 22:10       ` Alexander Wuerstlein
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Wuerstlein @ 2011-02-22 14:38 UTC (permalink / raw)
  To: hayeswang
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

On 11-02-22 13:31, hayeswang <hayeswang@realtek.com> wrote:
> Hello,
> 
> please use the patch of the attatched file to check if it fix the issue. Thanks.

Yes, the patch you sent applied to a kernel from git (rev ee715087024b)
fixes the issue. I'll also test applying on -rc6 later and report.

Thanks alot for your help!


Ciao,

Alexander Wuerstlein.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: r8169 hangs machine on kernel boot (bisected)
  2011-02-22 12:30     ` hayeswang
  2011-02-22 14:38       ` Alexander Wuerstlein
@ 2011-02-23 22:10       ` Alexander Wuerstlein
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Wuerstlein @ 2011-02-23 22:10 UTC (permalink / raw)
  To: hayeswang
  Cc: 'David S. Miller', linux-kernel, 'franois romieu'

On 11-02-22 13:31, hayeswang <hayeswang@realtek.com> wrote:
> Hello,
> 
> please use the patch of the attatched file to check if it fix the issue. Thanks.

I also just tested with 2.6.38-rc5 (in addition to the test with current
git which I mailed about yesterday) and can also confirm, that your
patch fixes the issue with 2.6.38-rc5.


Thanks again.




Ciao,

Alexander Wuerstlein.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-23 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 22:34 r8169 hangs machine on kernel boot (bisected) Alexander Wuerstlein
2011-02-18  5:44 ` hayeswang
2011-02-18 17:30   ` Alexander Wuerstlein
2011-02-21  2:05     ` hayeswang
2011-02-22 12:30     ` hayeswang
2011-02-22 14:38       ` Alexander Wuerstlein
2011-02-23 22:10       ` Alexander Wuerstlein

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.