Bug 8667

Summary: sky2 crash when return from resume to ram
Product: Power Management Reporter: Renato S. Yamane (renatoyamane)
Component: Hibernation/SuspendAssignee: Stephen Hemminger (stephen)
Status: CLOSED CODE_FIX    
Severity: normal CC: bugzilla-kernel, f.wenzel, kernel, lenb, rjwysocki, stephen
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.21.1 Subsystem:
Regression: No Bisected commit-id:
Attachments: Fix transmit state on resume

Description Renato S. Yamane 2007-06-24 14:51:53 UTC
Distribution: Debian Etch
Hardware Environment: Laptop Toshiba M45-S355

Problem Description:
Suspend to ram work fine in my Toshiba M45-S355, but when laptop return (from RAM), my network connection crash, and I need unload and load again my sky2 module.

My NIC is:
Marvell Technology Group Ltd. 88E8036 PCI-E Fast Ethernet Controller (rev 10)

Rafael J. Wysocki (from LKML) recommend open this issue on this category (Power Management).

kernel: sky2 eth1: disabling interface
kernel: sky2 eth1: enabling interface
kernel: sky2 eth1: ram buffer 4K
kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
kernel: uhci_hcd 0000:00:1d.3: remove, state 4
kernel: usb usb4: USB disconnect, address 1
kernel: uhci_hcd 0000:00:1d.3: USB bus 4 deregistered
kernel: ACPI: PCI interrupt for device 0000:00:1d.3 disabled
kernel: uhci_hcd 0000:00:1d.2: remove, state 4
kernel: usb usb3: USB disconnect, address 1
kernel: uhci_hcd 0000:00:1d.2: USB bus 3 deregistered
kernel: ACPI: PCI interrupt for device 0000:00:1d.2 disabled
kernel: uhci_hcd 0000:00:1d.1: remove, state 4
kernel: usb usb2: USB disconnect, address 1
kernel: uhci_hcd 0000:00:1d.1: USB bus 2 deregistered
kernel: ACPI: PCI interrupt for device 0000:00:1d.1 disabled
kernel: uhci_hcd 0000:00:1d.0: remove, state 1
kernel: usb usb1: USB disconnect, address 1
kernel: usb 1-1: USB disconnect, address 4
kernel: uhci_hcd 0000:00:1d.0: USB bus 1 deregistered
kernel: ACPI: PCI interrupt for device 0000:00:1d.0 disabled
kernel: Stopping tasks ... done.
kernel: Suspending console(s)
kernel: sky2 eth1: Link is up at 100 Mbps, full duplex, flow control both
kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
kernel: ACPI: PCI interrupt for device 0000:05:06.4 disabled
kernel: ACPI: PCI interrupt for device 0000:05:06.3 disabled
kernel: eth2: Going into suspend...
kernel: ACPI: PCI interrupt for device 0000:05:04.0 disabled
kernel: sky2 eth1: disabling interface
kernel: ACPI: PCI interrupt for device 0000:00:1f.2 disabled
kernel: ACPI: PCI interrupt for device 0000:00:1e.3 disabled
kernel: ACPI: PCI interrupt for device 0000:00:1e.2 disabled
kernel: ACPI: PCI interrupt for device 0000:00:1d.7 disabled
kernel: Intel machine check architecture supported.
kernel: Intel machine check reporting enabled on CPU#0.
kernel: ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
kernel: ACPI: PCI Interrupt 0000:00:1c.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
kernel: ACPI: PCI Interrupt 0000:00:1c.1[B] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
kernel: PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)
kernel: ACPI: PCI Interrupt 0000:00:1d.7[A] -> Link [LNKH] -> GSI 10 (level, low) -> IRQ 10
kernel: ACPI: PCI Interrupt 0000:00:1e.2[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
kernel: ACPI: PCI Interrupt 0000:00:1e.3[B] -> Link [LNKE] -> GSI 5 (level, low) -> IRQ 5
kernel: ACPI: PCI Interrupt 0000:00:1f.2[B] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
kernel: sky2 eth1: enabling interface
kernel: sky2 eth1: ram buffer 4K
kernel: eth2: Coming out of suspend...
kernel: PCI: Enabling device 0000:05:04.0 (0000 -> 0002)
kernel: ACPI: PCI Interrupt 0000:05:04.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
kernel: ACPI: PCI Interrupt 0000:05:06.2[C] -> Link [LNKG] -> GSI 6 (level, low) -> IRQ 6
kernel: ACPI: PCI Interrupt 0000:05:06.3[D] -> Link [LNKE] -> GSI 5 (level, low) -> IRQ 5
kernel: ACPI: PCI Interrupt 0000:05:06.4[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
kernel: ata1.00: configured for UDMA/100
kernel: SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)
kernel: sda: Write Protect is off
kernel: SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
kernel: sky2 eth1: Link is up at 100 Mbps, full duplex, flow control both
kernel: ata2.00: configured for UDMA/33
kernel: Restarting tasks ... done.
kernel: ipw2200: Radio Frequency Kill Switch is On:
kernel: Kill switch must be turned off for wireless networking to work.
kernel: ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[11] MMIO=[b8000000-b80007ff]  Max Packet=[2048]  IR/IT contexts=[4/8]
kernel: eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)
kernel: USB Universal Host Controller Interface driver v3.0
kernel: ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [LNKH] -> GSI 10 (level, low) -> IRQ 10
kernel: uhci_hcd 0000:00:1d.0: UHCI Host Controller
kernel: uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
kernel: uhci_hcd 0000:00:1d.0: irq 10, io base 0x00001200
kernel: usb usb1: configuration #1 chosen from 1 choice
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 2 ports detected
kernel: ACPI: PCI Interrupt 0000:00:1d.1[B] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
kernel: uhci_hcd 0000:00:1d.1: UHCI Host Controller
kernel: uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
kernel: uhci_hcd 0000:00:1d.1: irq 11, io base 0x00001220
kernel: usb usb2: configuration #1 chosen from 1 choice
kernel: hub 2-0:1.0: USB hub found
kernel: hub 2-0:1.0: 2 ports detected
kernel: ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
kernel: uhci_hcd 0000:00:1d.2: UHCI Host Controller
kernel: uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
kernel: uhci_hcd 0000:00:1d.2: irq 11, io base 0x00001240
kernel: usb usb3: configuration #1 chosen from 1 choice
kernel: hub 3-0:1.0: USB hub found
kernel: hub 3-0:1.0: 2 ports detected
kernel: ACPI: PCI Interrupt 0000:00:1d.3[D] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
kernel: uhci_hcd 0000:00:1d.3: UHCI Host Controller
kernel: uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
kernel: uhci_hcd 0000:00:1d.3: irq 11, io base 0x00001260
kernel: usb usb4: configuration #1 chosen from 1 choice
kernel: hub 4-0:1.0: USB hub found
kernel: hub 4-0:1.0: 2 ports detected
kernel: usb 1-1: new low speed USB device using uhci_hcd and address 2
kernel: sky2 eth1: disabling interface
kernel: sky2 eth1: enabling interface
kernel: sky2 eth1: ram buffer 4K
kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
kernel: usb 1-1: configuration #1 chosen from 1 choice
kernel: input: Microsoft Microsoft 3-Button Mouse with IntelliEye? as /class/input/input8
kernel: input: USB HID v1.00 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye?] on usb-0000:00:1d.0-1
kernel: ADDRCONF(NETDEV_UP): eth2: link is not ready
kernel: sky2 eth1: Link is up at 100 Mbps, full duplex, flow control both
kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth1 for sub-path eth1.dbus.get.host_name
dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth1 for sub-path eth1.dbus.get.domain_name
dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth1 for sub-path eth1.dbus.get.nis_domain
dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth1 for sub-path eth1.dbus.get.nis_servers
gconfd (yamane-5230): starting (versão 2.16.1), pid 5230 user 'yamane'
gconfd (yamane-5230): Address "xml:readonly:/etc/gconf/gconf.xml.mandatory" resolved from a config source with only read permissions in position 0
gconfd (yamane-5230): Address "xml:readwrite:/home/yamane/.gconf" resolved from a config source with write permissions in positiono 1
gconfd (yamane-5230): Address "xml:readonly:/etc/gconf/gconf.xml.defaults" resolved from a config source with only read permissions in position 2
gconfd (yamane-5230): Address "xml:readonly:/var/lib/gconf/debian.defaults" resolved from a config source with only read permissions in position 3
gconfd (yamane-5230): Address "xml:readonly:/var/lib/gconf/defaults" resolved from a config source with only read permissions in position 4
Comment 1 Stephen Hemminger 2007-07-02 19:07:06 UTC
Are you setting/using Wake On Lan?
Comment 2 Michael Karcher 2007-08-12 06:35:39 UTC
Problem reproduced here with a vanilla 2.6.23-rc1 from git (commit 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f). It has been tracked down to a confused UDP checksum engine. After Suspend-To-RAM, outgoing UDP packets (e.g. nameserver queries) get a wrong checksum. I can ping other computers in the local LAN by their IP address, but not by name. It suddenly starts working again after establishing a tcp connection. Trying to connect to a closed port (SYN/RST) does not help. ifconfig eth0 down/up does not help, reloading the module does help.

Of course, disabling TX checksumming helps.

Hardware: Fujitsu/Siemens S7110 laptop, Chip: PCI 11ab:4363 (rev 12), driver calls it  Yukon-EC Ultra (0xb4) rev 2. Linux is running in x86-64 mode. 
Comment 3 Renato S. Yamane 2007-09-08 15:21:57 UTC
No, I'm not using wake-on-lan.
I think that Michael do a good comment, so I change status to "assigned".

Best regards,
Renato
Comment 4 Stephen Hemminger 2007-09-27 12:38:31 UTC
*** Bug 9089 has been marked as a duplicate of this bug. ***
Comment 5 Stephen Hemminger 2007-09-27 12:39:50 UTC
Created attachment 12968 [details]
Fix transmit state on resume

This patch is submitted after 2.6.23-rc8 and should fix the problem
Comment 6 Renato S. Yamane 2007-09-30 12:13:54 UTC
OK, this patch work fine on 2.6.22.9 too.
Thanks!
Comment 7 Fabian Wenzel 2007-11-19 14:03:36 UTC
On Ubuntu Gutsy (2.6.22) running on my AOpen i915GMm-HFS, I had to revert the patch from the kernel in order for sky2 to wake up from suspend to RAM correctly. With the patch applied, I get the following messages when resuming:

Nov 19 20:11:01 sokrates kernel: [ 5184.036000] sky2 0000:04:00.0: v1.18 addr 0xd0020000 irq 18 Yukon-EC (0xb6) rev 1
Nov 19 20:11:02 sokrates kernel: [ 5184.156000] sky2 eth0: enabling interface
Nov 19 20:11:02 sokrates kernel: [ 5184.160000] ADDRCONF(NETDEV_UP): eth0: link is not ready
Nov 19 20:11:02 sokrates kernel: [ 5184.160000] sky2 eth0: addr [...follows...]

But nothing follows those lines regarding sky2. After reverting, things appear to be normal again:

Nov 19 22:50:09 sokrates kernel: [  290.788000] sky2 0000:04:00.0: v1.18 addr 0xd0020000 irq 18 Yukon-EC (0xb6) rev 1
Nov 19 22:50:09 sokrates kernel: [  290.804000] sky2 eth0: addr  [...follows...] 
Nov 19 22:50:09 sokrates kernel: [  290.816000] sky2 eth0: enabling interface
Nov 19 22:50:09 sokrates kernel: [  290.820000] ADDRCONF(NETDEV_UP): eth0: link is not ready
Nov 19 22:50:11 sokrates kernel: [  292.676000] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx

Maybe there is a clash w.r.t. different revisions of the chipset?
Comment 8 Stephen Hemminger 2007-11-19 14:57:41 UTC
On Mon, 19 Nov 2007 14:03:37 -0800 (PST)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=8667
> 
> 
> f.wenzel@gmx.net changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |f.wenzel@gmx.net
> 
> 
> 
> 
> ------- Comment #7 from f.wenzel@gmx.net  2007-11-19 14:03 -------
> On Ubuntu Gutsy (2.6.22) running on my AOpen i915GMm-HFS, I had to revert the
> patch from the kernel in order for sky2 to wake up from suspend to RAM
> correctly. With the patch applied, I get the following messages when
> resuming:
> 
> Nov 19 20:11:01 sokrates kernel: [ 5184.036000] sky2 0000:04:00.0: v1.18 addr
> 0xd0020000 irq 18 Yukon-EC (0xb6) rev 1
> Nov 19 20:11:02 sokrates kernel: [ 5184.156000] sky2 eth0: enabling interface
> Nov 19 20:11:02 sokrates kernel: [ 5184.160000] ADDRCONF(NETDEV_UP): eth0:
> link
> is not ready
> Nov 19 20:11:02 sokrates kernel: [ 5184.160000] sky2 eth0: addr
> [...follows...]
> 
> But nothing follows those lines regarding sky2. After reverting, things
> appear
> to be normal again:
> 
> Nov 19 22:50:09 sokrates kernel: [  290.788000] sky2 0000:04:00.0: v1.18 addr
> 0xd0020000 irq 18 Yukon-EC (0xb6) rev 1
> Nov 19 22:50:09 sokrates kernel: [  290.804000] sky2 eth0: addr 
> [...follows...] 
> Nov 19 22:50:09 sokrates kernel: [  290.816000] sky2 eth0: enabling interface
> Nov 19 22:50:09 sokrates kernel: [  290.820000] ADDRCONF(NETDEV_UP): eth0:
> link
> is not ready
> Nov 19 22:50:11 sokrates kernel: [  292.676000] sky2 eth0: Link is up at 100
> Mbps, full duplex, flow control rx
> 
> Maybe there is a clash w.r.t. different revisions of the chipset?
> 
> 

By default Ubuntu unloads the device drivers on suspend, so it doesn't
really use the normal suspend/resume code path. Did you change that?
Comment 9 Len Brown 2009-04-02 04:47:06 UTC
commit 88f5f0cad396be594d6d55cb2d0cd69e8df9ab16
Author: Stephen Hemminger <shemminger@linux-foundation.org>
Date:   Thu Sep 27 12:38:12 2007 -0700

    sky2: fix transmit state on resume


shipped in 2.6.23-rc9

closed.