Bug 7183

Summary: Resume from suspend-to-ram fails if a PCMCIA network card is inserted
Product: Power Management Reporter: Zarhan (zarhan)
Component: Hibernation/SuspendAssignee: Rafael J. Wysocki (rjwysocki)
Status: REJECTED INSUFFICIENT_DATA    
Severity: normal CC: acme, linux-pcmcia, protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.18 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 7216    

Description Zarhan 2006-09-22 07:33:40 UTC
Most recent kernel where this bug did not occur:2.6.16
Distribution:Gentoo
Hardware Environment:Toshiba Portege 3440CT
Software Environment:pcmciactl-013
Problem Description:
When suspending to ram (ACPI S3), resume does not work if a PCMCIA wireless
network card is inserted. The card I'm using is a Compaq WL110.

When resuming, the system stalls with the "Linu" show on screen. Wireless card
powers up (LEDs flash) but the LEDs indicate "uninitialized state", and the
system never wakes up.

If I take the PCMCIA card out of the socket, the system resumes normally. I can
then re-insert the card and it works fine.

DMESG output, where I first suspend-to-ram, then resume, and then yank the card
out (allowing the system to resume) and then finally put the card back in.

This also happened with 2.6.17-kernels. 2.6.16-series worked (and still works) fine.

Stopping tasks: ================================================================|
hostap_cs: CS_EVENT_PM_SUSPEND
printk: 163724 messages suppressed.
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
pnp: Device 00:0a disabled.
pnp: Device 00:09 disabled.
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Back to C!
ACPI: Transitioning device [FAN] to D3
ACPI: Transitioning device [FAN] to D3
PM: Writing back config space on device 0000:00:00.1 at offset f (was 2ff,
writing 20b)
ACPI: PCI Interrupt 0000:00:00.1[B] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:00:00.1 to 64
PM: Writing back config space on device 0000:00:02.0 at offset f (was efc01ff,
writing efc010b)
PM: Writing back config space on device 0000:00:04.0 at offset f (was ff0401ff,
writing ff04010b)
ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
PM: Writing back config space on device 0000:00:07.2 at offset f (was 4ff,
writing 40b)
usb usb1: root hub lost power or was reset
PM: Writing back config space on device 0000:00:0b.0 at offset 1 (was 4900003,
writing 4900007)
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
PM: Writing back config space on device 0000:00:0b.1 at offset 1 (was 4900003,
writing 4900007)
ACPI: PCI Interrupt 0000:00:0b.1[B] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
pnp: Failed to activate device 00:05.
pnp: Failed to activate device 00:06.
pnp: Device 00:09 activated.
pnp: Device 00:0a activated.
hostap_cs: CS_EVENT_PM_RESUME
wifi0: card already removed or not configured during shutdown
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
printk: 4058 messages suppressed.
wifi0: Interrupt, but dev not OK
printk: 365979 messages suppressed.
wifi0: Interrupt, but dev not OK
prism2_hw_init: initialized in 5852 ms
wifi0: prism2_enable_aux_port - timeout - reg=0xffff
wifi0: prism2_enable_aux_port - timeout - reg=0xffff
wifi0: valid PDA not found
SWSUPPORT0 write/read failed: FFFF != 8A32
hostap_cs: Initialization failed
Restarting tasks...<5>pccard: card ejected from slot 1
wifi0: card already removed or not configured during shutdown
 done
wifi0: card already removed or not configured during shutdown
pccard: PCMCIA card inserted into slot 1
pcmcia: registering new device pcmcia1.0
hostap_cs: setting Vcc=33 (constant)
Checking CFTABLE_ENTRY 0x01 (default 0x01)
IO window settings: cfg->io.nwin=1 dflt.io.nwin=1
io->flags = 0x0046, io.base=0x0000, len=64
hostap_cs: Registered netdevice wifi0
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
hostap_cs: index 0x01: , irq 11, io 0x0100-0x013f
prism2_hw_init: initialized in 109 ms
wifi0: NIC: id=0x8002 v1.0.1
wifi0: PRI: id=0x15 v0.3.0
wifi0: STA: id=0x1f v1.7.1
wifi0: registered netdevice wlan0

Steps to reproduce:
Insert hostap-cs-driver using PCMCIA wireless network card into PCMCIA socket
Suspend computer (echo mem > /sys/power/state)
Resume computer.
Comment 1 Zarhan 2006-09-22 07:38:26 UTC
Oh, and note: This also happens if attempting to suspend to disk - in this case
it does not even get to suspend properly (stalls at the portion where system
wakes up some devices to write the pages to swap partition - yanking the card
works there as well)
Comment 2 Pavel Machek 2006-10-08 13:31:44 UTC
Does rmmoding driver for your pcmcia card before suspend help?
Comment 3 Zarhan 2006-10-09 06:54:16 UTC
I cannot unload the module directly, 

# lsmod
Module                  Size  Used by
hostap_cs              63380  3
hostap                117956  1 hostap_cs
pcmcia                 29560  1 hostap_cs
yenta_socket           28012  4
rsrc_nonstatic         13376  1 yenta_socket
pcmcia_core            40656  4 hostap_cs,pcmcia,yenta_socket,rsrc_nonstatic
# rmmod hostap_cs
ERROR: Module hostap_cs is in use

Saying "pcmciactl eject" before suspending makes things work. When resuming the
card is reinitialized again.

I'm also able to repeat the issue by simply using "pcmciactl suspend" followed
by "pcmciactl resume". When I press enter on the resume command, system freezes
- Physically ejecting the card and the system becomes responsive again. Dmesg
output is pretty much idetical to the one I pasted earlier.

# pccardctl suspend
# dmesg -c
hostap_cs: CS_EVENT_PM_SUSPEND
printk: 284717 messages suppressed.
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
wifi0: Interrupt, but dev not OK
printk: 4 messages suppressed.
wifi0: Interrupt, but dev not OK
# pccardctl resume
# dmesg
printk: 13 messages suppressed.
wifi0: Interrupt, but dev not OK
printk: 7 messages suppressed.
wifi0: Interrupt, but dev not OK
printk: 14 messages suppressed.
wifi0: Interrupt, but dev not OK
printk: 13 messages suppressed.
wifi0: Interrupt, but dev not OK
printk: 6 messages suppressed.
wifi0: Interrupt, but dev not OK
hostap_cs: CS_EVENT_PM_RESUME
wifi0: card already removed or not configured during shutdown
printk: 237713 messages suppressed.
wifi0: Interrupt, but dev not OK
prism2_hw_init: initialized in 5405 ms
wifi0: prism2_enable_aux_port - timeout - reg=0xffff
wifi0: prism2_enable_aux_port - timeout - reg=0xffff
wifi0: valid PDA not found
SWSUPPORT0 write/read failed: FFFF != 8A32
hostap_cs: Initialization failed
pccard: card ejected from slot 1
wifi0: card already removed or not configured during shutdown
wifi0: card already removed or not configured during shutdown
Comment 4 Rafael J. Wysocki 2007-05-30 10:49:11 UTC
Is the bug still present in 2.6.22-rc3 and/or in the latest -git ?
Comment 5 Natalie Protasevich 2007-07-06 09:33:26 UTC
Zarhan,
Have you tested with current kernel.org (2.6.22+), is the problem still there?
Thanks.
Comment 6 Rafael J. Wysocki 2007-08-09 09:20:54 UTC
Rejecting due to the lack of response from the reporter.