Bug 8262
Summary: | PCMCIA: socket *** DANGER *** unable to remove socket power | ||
---|---|---|---|
Product: | Drivers | Reporter: | Nils Neumann (nils.neumann) |
Component: | PCMCIA | Assignee: | Dominik Brodowski (linux) |
Status: | CLOSED CODE_FIX | ||
Severity: | high | CC: | akpm, daniel.ritz, greg, kristen.c.accardi, lenb, protasnb |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.20.4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | testpatch: wait 100ms before power down check |
Description
Nils Neumann
2007-03-26 00:50:54 UTC
Reply-To: pcmcia@arm.linux.org.uk On Mon, Mar 26, 2007 at 12:50:55AM -0700, bugme-daemon@bugzilla.kernel.org wrote: > The command "pccardctl eject" gives the following warning: > > kernel: PCMCIA: socket f793c428: *** DANGER *** unable to remove socket power > > It seems that this warning is wrong, because the pcmcia-card is offline. (LED > is off.) FYI, the warning is generated when the status from the PCMCIA bridge indicates that the power is still applied to the socket, despite the socket being instructed to power itself off. IOW, something is interfering with the CPU's ability to communicate with the PCMCIA bridge. I'll let those more into this issue make further suggestions. same problem with 2.6.21 (only as information, because there are no patches between 2.6.20->2.6.21 regarding this error) Nils, Can you confirm the problem is still there in latest kernels (2.6.22+)? Thanks. I test kernel 2.6.22-rc7 and the problem is still there. ... and the same problem with final 2.6.22 (It seems to be another bug, but an active pcmcia-card prevents power state C3/C4.) Relation between bug "*** DANGER *** unable to remove socket power" and power state C3/C4. 1.) inserting pcmcia card 2.) initialize the driver (I use the option module for umts.) 3.) the pcmcia card prevents power state C3/C4 (high power consumption!) 4a.) remove the card without "pccardctl eject" (not a nice solution, because the card is powered) -> everything works fine, also CPU power state C3/C4 can be used -- or -- 4b.) remove the card with "pccardctl eject" -> "*** DANGER *** unable ...." and the CPU power state C3/C4 is unuseable, also after physical removing the card. Looks like a pcmcia core problem. I'll assign it to Dominik - hopefully he will find time to look at it when he gets back on deck. please post the relevant parts from dmesg as well as the output of this command after you got the power warning: cat /sys/devices/pci0000\:00/*/yenta_registers Here are the outputs from dmesg/yenta_registers before/after the warning: # outputs after inserting the card # -------------------------------- # dmesg ohci_hcd 0000:07:00.1: OHCI Host Controller ohci_hcd 0000:07:00.1: new USB bus registered, assigned bus number 6 ohci_hcd 0000:07:00.1: irq 11, io mem 0xc8001000 usb usb6: configuration #1 chosen from 1 choice hub 6-0:1.0: USB hub found hub 6-0:1.0: 2 ports detected usb 5-1: new full speed USB device using ohci_hcd and address 2 usb 5-1: device descriptor read/64, error -62 usb 5-1: device descriptor read/64, error -62 usb 5-1: new full speed USB device using ohci_hcd and address 3 usb 5-1: device descriptor read/64, error -62 usb 5-1: device descriptor read/64, error -62 usb 5-1: new full speed USB device using ohci_hcd and address 4 usb 5-1: device not accepting address 4, error -62 usb 5-1: new full speed USB device using ohci_hcd and address 6 usb 5-1: configuration #1 chosen from 1 choice drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port) option 5-1:1.0: GSM modem (1-port) converter detected usb 5-1: GSM modem (1-port) converter now attached to ttyUSB0 option 5-1:1.1: GSM modem (1-port) converter detected usb 5-1: GSM modem (1-port) converter now attached to ttyUSB1 usbcore: registered new interface driver option drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1 # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.0/yenta_registers CB registers: 00: 00000000 00000006 30000086 00000000 10: 00000000 00000000 00000000 00000000 20: 00000000 ExCA registers: 00: 84 00 00 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.1/yenta_registers CB registers: 00: 00000000 00000006 30000968 00000000 10: 00000033 00000000 00000000 00000000 20: 03000000 ExCA registers: 00: 84 7e 19 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 # outputs after the power warning (pccardctl eject) # ------------------------------------------------- # dmesg pccard: card ejected from slot 1 ohci_hcd 0000:07:00.0: remove, state 1 usb usb5: USB disconnect, address 1 usb 5-1: USB disconnect, address 6 ohci_hcd 0000:07:00.0: HC died; cleaning up ohci_hcd 0000:07:00.1: HC died; cleaning up option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 option 5-1:1.0: device disconnected option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 option 5-1:1.1: device disconnected ohci_hcd 0000:07:00.0: USB bus 5 deregistered ACPI: PCI interrupt for device 0000:07:00.0 disabled ohci_hcd 0000:07:00.1: remove, state 0 usb usb6: USB disconnect, address 1 ohci_hcd 0000:07:00.1: USB bus 6 deregistered ACPI: PCI interrupt for device 0000:07:00.1 disabled PCMCIA: socket f7503840: *** DANGER *** unable to remove socket power # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.0/yenta_registers CB registers: 00: 00000000 00000006 30000086 00000000 10: 00000000 00000000 00000000 00000000 20: 00000000 ExCA registers: 00: 84 00 00 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.1/yenta_registers CB registers: 00: 00000000 00000006 30000920 00000000 10: 00000000 00000000 00000000 00000000 20: 02000000 ExCA registers: 00: 84 0c 00 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 # output after physical removing the card # --------------------------------------- # dmesg nothing more # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.0/yenta_registers CB registers: 00: 00000000 00000006 30000086 00000000 10: 00000000 00000000 00000000 00000000 20: 00000000 ExCA registers: 00: 84 00 00 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.1/yenta_registers CB registers: 00: 00000000 00000006 30000126 00000000 10: 00000000 00000000 00000000 00000000 20: 00000000 ExCA registers: 00: 84 00 00 50 00 08 00 00 - 00 00 01 00 00 00 01 00 10: 00 00 00 00 00 00 c0 00 - 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 the registers show that no power is applied after the warning, so the warning is wrong: # cat /sys/devices/pci0000:00/0000:00:1e.0/0000\:02\:00.1/yenta_registers CB registers: 00: 00000000 00000006 30000920 00000000 ^^^ = 3V, CB card, dataloss, no power applied for the C3/C4 problem i'd suggest to build a tickless kernel (CONFIG_NO_HZ) and use powertop (http://www.linuxpowertop.org/) to figure out what keeps the CPU busy Created attachment 12195 [details]
testpatch: wait 100ms before power down check
- remove pointless shutdown_delay
- give socket 100ms to powerdown before checking state
The testpatch is working fine: # dmesg after pccardctl eject ohci_hcd 0000:07:00.1: remove, state 4 usb usb6: USB disconnect, address 1 ohci_hcd 0000:07:00.1: USB bus 6 deregistered ACPI: PCI interrupt for device 0000:07:00.1 disabled I use also powertop and a tickless kernel. My computer is nearly always in C4 state. After inserting the pcmcia-card it is furthermore in C4 state, but then I connect to the umts network and C3/C4 doesn't work. Powertop shows no information about the problem. The number of interrupts is the same. I think this bug is solved, but it would be nice if anyone has an idea why the C3/C4 is prevented. Thank you for the patch! Merged pcmcia-give-socket-time-to-power-down.patch into -mm. It's fixed since kernel 2.6.22.2, the C3/C4 problem is not regarding this bug report, because it seems to be a problem with the usb-subsystem. |