Bug 5600

Summary: suspend to disk and suspend to RAM regression with NEC PCMCIA controller
Product: Drivers Reporter: Martin Steigerwald (Martin)
Component: USBAssignee: David Brownell (dbrownell)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, greg
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.14.2 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    
Attachments: output of lspci.vv
config of the kernel that triggers the problem (2.6.14.2)
config of the kernel before that doesn't have the problem (2.6.13.4)

Description Martin Steigerwald 2005-11-13 04:27:28 UTC
Most recent kernel where this bug did not occur:   
no newer version tested  
  
Distribution:   
Debian Etch/Sid  
  
Hardware Environment:   
IBM ThinkPad T23, Pentium 3, 384 MB RAM, Mercury  USB 2.0 PCMCIA controller 
(NEC chip).  
  
-> lspci  
0000:00:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 
04)  
0000:00:01.0 PCI bridge: Intel Corporation 82830 830 Chipset AGP Bridge (rev 
04)  
0000:00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #1) (rev 
02)  
0000:00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #2) (rev 
02)  
0000:00:1d.2 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #3) (rev 
02)  
0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)  
0000:00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)  
0000:00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 (rev 02)  
0000:00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)  
0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 
Audio Controller  
(rev 02)  
0000:01:00.0 VGA compatible controller: S3 Inc. SuperSavage IX/C SDR (rev 05)  
0000:02:00.0 CardBus bridge: Texas Instruments PCI1420  
0000:02:00.1 CardBus bridge: Texas Instruments PCI1420  
0000:02:02.0 Communication controller: Agere Systems WinModem 56k (rev 01)  
0000:02:08.0 Ethernet controller: Intel Corporation 82801CAM (ICH3) PRO/100 VE 
(LOM) Ethernet  
Controller (rev 42)  
0000:03:00.0 USB Controller: NEC Corporation USB (rev 43)  
0000:03:00.1 USB Controller: NEC Corporation USB (rev 43)  
0000:03:00.2 USB Controller: NEC Corporation USB 2.0 (rev 04)  
  
(lspci -vv as attachment)  
  
Software Environment:   
-> cat /proc/acpi/info  
version:                 20050902  
  
Problem Description:  
Neither suspend to disk nor suspend to RAM works when PCMCIA USB controller is 
plugged in *and* ehci_hcd is loaded. It worked correctly with 2.6.13.4. Both 
plain vanilla kernels. I attach kernel configurations for both of them to the 
bug report. 
 
Suspend to disk simply doesn't work. Machine is not brought to sleep and is 
still usable.  
 
Suspend to RAM blanks the screen, doesn't switch the machine off completly, 
but also doesn't unblank the screen anymore. I waited a minute or so and then 
switched the machine off trusting modern journalling filesystems. This has 
potential for data loss, so feel free to raise the bug priority when you find 
it approbiate. 
  
Suspend to disk gives in syslog:  
Nov 13 12:40:34 deepdance kernel: Stopping tasks:  
================================================================|  
Nov 13 12:40:35 deepdance kernel: Freeing memory... done (34965 pages freed)  
Nov 13 12:40:35 deepdance kernel: ACPI: PCI interrupt for device 0000:03:00.2 
disabled  
Nov 13 12:40:35 deepdance kernel: Could not suspend device 0000:03:00.2: error 
-22  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: port 1 resume error 
-19  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-32)  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: port 2 resume error 
-19  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-32)  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: port 3 resume error 
-19  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-32)  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: port 4 resume error 
-19  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-32)  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: port 5 resume error 
-19  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-32)  
Nov 13 12:40:35 deepdance kernel: Some devices failed to suspend  
Nov 13 12:40:35 deepdance kernel: Restarting tasks...<3>hub 6-0:1.0: 
over-current change on port 1  
Nov 13 12:40:35 deepdance kernel: done  
Nov 13 12:40:35 deepdance kernel: ehci_hcd 0000:03:00.2: HC died; cleaning up  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19)  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: connect-debounce failed, port 1 
disabled  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: cannot disable port 1 (err = 
-19)  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19)  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19)  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19)  
Nov 13 12:40:35 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19)  
 
And on the second attempt: 
Nov 13 12:43:29 deepdance kernel: Stopping tasks: 
================================================================| 
Nov 13 12:43:29 deepdance kernel: Freeing memory... done (10618 pages freed) 
Nov 13 12:43:29 deepdance kernel: Badness in usb_hcd_pci_suspend at 
drivers/usb/core/hcd-pci.c:276 
Nov 13 12:43:29 deepdance kernel: [<d8878701>] usb_hcd_pci_suspend+0x71/0x190 
[usbcore] 
Nov 13 12:43:29 deepdance kernel: [<c02c19fd>] suspend_device+0xed/0x100 
Nov 13 12:43:29 deepdance kernel: [<c02c1ab7>] device_suspend+0xa7/0x1a0 
Nov 13 12:43:29 deepdance kernel: [<c0139670>] pm_suspend_disk+0x20/0xb0 
Nov 13 12:43:29 deepdance kernel: [<c0137318>] enter_state+0x58/0x80 
Nov 13 12:43:29 deepdance kernel: [<c0137498>] state_store+0xa8/0xc3 
Nov 13 12:43:29 deepdance kernel: [<c01a17d7>] flush_write_buffer+0x37/0x40 
Nov 13 12:43:29 deepdance kernel: [<c01a183b>] sysfs_write_file+0x5b/0x90 
Nov 13 12:43:29 deepdance kernel: [<c015d5b5>] vfs_write+0xb5/0x190 
Nov 13 12:43:29 deepdance kernel: [<c015d75b>] sys_write+0x4b/0x80 
Nov 13 12:43:29 deepdance kernel: [<c0103271>] syscall_call+0x7/0xb 
Nov 13 12:43:29 deepdance kernel: Could not suspend device 0000:03:00.2: error 
-22 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19) 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19) 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19) 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19) 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: hub_port_status failed (err = 
-19) 
Nov 13 12:43:29 deepdance kernel: hub 6-0:1.0: activate --> -19 
Nov 13 12:43:29 deepdance kernel: Some devices failed to suspend 
Nov 13 12:43:29 deepdance kernel: Restarting tasks... done 
Nov 13 12:43:29 deepdance ifplugd(eth0)[4690]: SIGUSR2: Daemon resumed (#1) 
Nov 13 12:43:30 deepdance kernel: ehci_hcd 0000:03:00.2: HC died; cleaning up 
Nov 13 12:44:33 deepdance kernel: ohci_hcd 0000:03:00.0: HC died; cleaning up 
Nov 13 12:44:33 deepdance kernel: ohci_hcd 0000:03:00.1: HC died; cleaning up 
Nov 13 12:44:33 deepdance kernel: ohci_hcd 0000:03:00.0: remove, state 0 
 
Suspend to RAM does not yield any visible trace in syslog. 
 
Suspend to disk as well as suspend to RAM work correctly 
1) when I remove the NEC USB controller before 
2) do modprobe -r ehci_hcd before 
3) I use my previous 2.6.13.4 kernel 
  
  
Steps to reproduce:  
1) have similar hardware 
2) have Linux with similar kernel (kernel config attached) 
3) do suspend to disk or suspend to RAM as follows: 
 
suspend to disk: 
echo platform > /sys/power/disk; echo disk > /sys/power/state 
 
suspend to RAM: 
echo mem > /sys/power/state 
 
(I also tried with my suspend and hibernate script which disable ALSA and some 
more stuff) 
 
4) remove the NEC PCMCIA controller prior to trying suspend to disk and 
suspend to RAM 
 
5) try with modprobe ehci_hcd -r 
 
Here is a complete list of modules loaded by hotplug usually: 
-> lsmod 
Module                  Size  Used by 
ehci_hcd               30696  0 
appletalk              31380  2 
ipx                    25036  2 
p8022                   1504  1 ipx 
psnap                   2692  2 appletalk,ipx 
llc                     5620  2 p8022,psnap 
pcmcia                 33156  4 
binfmt_misc             9288  1 
ipv6                  253056  8 
parport_pc             38148  1 
lp                      9992  0 
parport                33480  2 parport_pc,lp 
fan                     3172  0 
button                  4752  0 
ac                      3268  0 
battery                 7492  0 
ibm_acpi               24000  0 
firmware_class          7904  1 pcmcia 
nls_cp850               4544  2 
nls_iso8859_15          4288  3 
savage                 34944  0 
drm                    67028  1 savage 
usblp                  11168  0 
usb_storage            66240  0 
ntfs                  201424  1 
vfat                   11360  2 
msdos                   8768  0 
fat                    47868  2 vfat,msdos 
reiserfs              266448  1 
udf                    88356  0 
smbfs                  64632  0 
sg                     31296  0 
scsi_mod               88136  2 usb_storage,sg 
speedstep_ich           3852  0 
speedstep_lib           3040  1 speedstep_ich 
cpufreq_ondemand        5148  0 
cpufreq_userspace       3484  1 
nvram                   7880  1 
ohci_hcd               20036  0 
usbhid                 36480  0 
e100                   33568  0 
mii                     4544  1 e100 
evdev                   7552  0 
yenta_socket           24844  5 
rsrc_nonstatic         11904  1 yenta_socket 
pcmcia_core            36816  3 pcmcia,yenta_socket,rsrc_nonstatic 
snd_intel8x0           30816  5 
snd_ac97_codec         95228  1 snd_intel8x0 
snd_ac97_bus            1760  1 snd_ac97_codec 
snd_pcm_oss            50528  0 
snd_mixer_oss          17440  1 snd_pcm_oss 
ide_cd                 39236  0 
intel_agp              20892  1 
snd_pcm                84136  5 snd_intel8x0,snd_ac97_codec,snd_pcm_oss 
snd_timer              22052  3 snd_pcm 
snd                    48388  12 
snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer 
agpgart                29416  2 drm,intel_agp 
hw_random               4244  0 
uhci_hcd               31216  0 
usbcore               114944  7 
ehci_hcd,usblp,usb_storage,ohci_hcd,usbhid,uhci_hcd 
snd_page_alloc          8488  2 snd_intel8x0,snd_pcm 
cdrom                  38304  1 ide_cd 
 
BTW even when I remove ehci_hcd prior to suspend to disk I seem to get some 
messages I didn't have with 2.6.13.4: 
 
hub 4-0:1.0: hub_port_status failed 
hub 5-0:1.0: hub_port_status failed 
 
usb 4: resume from parent 2-1, still 0 (or something like that) 
usb 5: resume from  
 
Nov 13 12:45:30 deepdance kernel: usbhid 2-2:1.0: PM: resume from 2, parent 
2-2 still 1 
 
also for usb 4 and usb 5 
 
And I have this in syslog, but I do not know anymore which action it belongs 
to: 
 
Nov 13 12:46:06 deepdance kernel: uhci_hcd 0000:00:1d.2: host system error, 
PCI problems? 
Nov 13 12:46:06 deepdance kernel: uhci_hcd 0000:00:1d.2: host controller 
process error, something bad happened! 
 
(could be just after some failed suspend to disk attempts) 
 
Tell me when you need anything more or I should do further tests.  
 
Regards, 
Martin Steigerwald
Comment 1 Martin Steigerwald 2005-11-13 04:29:22 UTC
Created attachment 6551 [details]
output of lspci.vv
Comment 2 Martin Steigerwald 2005-11-13 04:30:15 UTC
Created attachment 6552 [details]
config of the kernel that triggers the problem (2.6.14.2)
Comment 3 Martin Steigerwald 2005-11-13 04:31:11 UTC
Created attachment 6553 [details]
config of the kernel before that doesn't have the problem (2.6.13.4)
Comment 4 Shaohua 2005-11-13 21:29:26 UTC
As there are many USB related error message, I'd suppose it's a USB 
suspend/resume bug.
Comment 5 Dominik Brodowski 2006-01-10 09:21:47 UTC
Could you re-check the status of this bug with 2.6.15, and possibly also with a
recent "git" snapshot?
Comment 6 Martin Steigerwald 2006-02-17 15:13:03 UTC
Hello, 

suspend to disk with sws1 works nicely with 2.6.15.4 + NEC USB controller 
again. 

I can't tell anything new about suspend to RAM as this doesn't work at all with 
2.6.15.4 (neither when initiated by my own suspend.sh script which does "echo 
mem > /sys/power/state" nor when initiated with hibernate with suspend-to-ram 
config file which likely does the same;-). It just hangs on resume. I will file 
a different bug report about this. 

I will mark the bug as resolved. Should I find that suspend to RAM (when it is 
working again) should not work with plugged in NEC USB controller I will reopen 
the bug.

Regards, 
Martin Steigerwald