Bug 4501
Summary: | PCMCIA Card not powered on - CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) | ||
---|---|---|---|
Product: | Drivers | Reporter: | Hadmut Danisch (hadmut) |
Component: | PCMCIA | Assignee: | Dominik Brodowski (linux) |
Status: | CLOSED DUPLICATE | ||
Severity: | normal | CC: | drazzib-ml, laforge |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.11.7 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
pci-fix.patch
cardbus-signedness cardbus-fixup-bridge Patch for fixing the "cs: pcmcia_socket0: unable to apply power" |
Description
Hadmut Danisch
2005-04-15 11:42:59 UTC
same problem on same notebook here! Today i tested this nice notebook with the new SuSE9.3 LIVE-DVD"! there the pcmcia slot works!!!!! =? what did they diffrent? patches? please answer: flo@mianos.de Here is output of lspci -vv: root@laptop cpufreq # lspci -vv 0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- Latency: 0 Capabilities: [e0] #09 [2109] 0000:00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) (prog-if 00 [VGA]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin A routed to IRQ 10 Region 0: Memory at fbe80000 (32-bit, non-prefetchable) Region 1: I/O ports at dc00 [size=8] Region 2: Memory at d0000000 (32-bit, prefetchable) [size=256M] Region 3: Memory at fbe40000 (32-bit, non-prefetchable) [size=256K] Capabilities: [d0] Power Management version 2 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Region 0: Memory at fbd80000 (32-bit, non-prefetchable) Capabilities: [d0] Power Management version 2 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04) (prog-if 00 [UHCI]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin A routed to IRQ 11 Region 4: I/O ports at d880 [size=32] 0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 04) (prog-if 00 [UHCI]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin B routed to IRQ 5 Region 4: I/O ports at d800 [size=32] 0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 04) (prog-if 00 [UHCI]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin C routed to IRQ 7 Region 4: I/O ports at d480 [size=32] 0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 04) (prog-if 00 [UHCI]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin D routed to IRQ 10 Region 4: I/O ports at d400 [size=32] 0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d4) (prog-if 01 [Subtractive decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Bus: primary=00, secondary=01, subordinate=03, sec-latency=32 I/O behind bridge: 0000e000-0000efff Memory behind bridge: fbf00000-fbffffff BridgeCtl: Parity- SERR+ NoISA+ VGA- MAbort- >Reset- FastB2B- Capabilities: [50] #0d [0000] 0000:00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 04) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin A routed to IRQ 4 Region 0: I/O ports at d000 Region 1: I/O ports at cc00 [size=64] Region 2: Memory at fbe3bc00 (32-bit, non-prefetchable) [size=512] Region 3: Memory at fbe3b800 (32-bit, non-prefetchable) [size=256] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 04) (prog-if 00 [Generic]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Interrupt: pin B routed to IRQ 6 Region 0: I/O ports at c800 Region 1: I/O ports at c480 [size=128] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 0000:00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 04) (prog-if 8a [Master SecP PriP]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0 Interrupt: pin A routed to IRQ 7 Region 0: I/O ports at <unassigned> Region 1: I/O ports at <unassigned> Region 2: I/O ports at <unassigned> Region 3: I/O ports at <unassigned> Region 4: I/O ports at ffa0 [size=16] 0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Interrupt: pin B routed to IRQ 4 Region 4: I/O ports at 0400 [size=32] 0000:01:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 64 (8000ns min, 16000ns max) Interrupt: pin A routed to IRQ 5 Region 0: I/O ports at e800 [size=fbfe0000] Region 1: Memory at fbfffc00 (32-bit, non-prefetchable) [size=256] Expansion ROM at 00010000 [disabled] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 0000:01:04.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 168 Interrupt: pin A routed to IRQ 5 Region 0: Memory at 1e001000 (32-bit, non-prefetchable) Bus: primary=01, secondary=02, subordinate=05, sec-latency=176 Memory window 0: 1e400000-1e7ff000 (prefetchable) Memory window 1: 1e800000-1ebff000 I/O window 0: 00004000-000040ff I/O window 1: 00004400-000044ff BridgeCtl: Parity+ SERR+ ISA- VGA- MAbort- >Reset- 16bInt+ PostWrite+ 16-bit legacy interface ports at 0001 0000:01:04.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 168 Interrupt: pin B routed to IRQ 6 Region 0: Memory at 1e000000 (32-bit, non-prefetchable) Bus: primary=01, secondary=06, subordinate=09, sec-latency=176 Memory window 0: 1ec00000-1efff000 (prefetchable) Memory window 1: 1f000000-1f3ff000 I/O window 0: 00004800-000048ff I/O window 1: 00004c00-00004cff BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset- 16bInt- PostWrite+ 16-bit legacy interface ports at 0001 0000:01:04.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04) (prog-if 10 [OHCI]) Subsystem: Micro-Star International Co., Ltd.: Unknown device 0121 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 64 (500ns min, 1000ns max) Interrupt: pin C routed to IRQ 5 Region 0: Memory at fbfff000 (32-bit, non-prefetchable) Capabilities: [dc] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=2 PME- 0000:01:09.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05) Subsystem: Intel Corporation: Unknown device 2701 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 64 (750ns min, 6000ns max), cache line size 08 Interrupt: pin A routed to IRQ 4 Region 0: Memory at fbffe000 (32-bit, non-prefetchable) Capabilities: [dc] Power Management version 2 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=1 PME- root@laptop cpufreq here is out put with inserted card in the first and only slot: root@laptop cpufreq # cardctl status Socket 0: no card Socket 1: 3.3V CardBus card function 0: [ready] root@laptop cpufreq # but in dmesg nothing happens!! socket 0 is for the integrated sd/mmc/memory-stick slot in this notebook! Confirmed, SuSE 9.3 live-dvd makes the pcmcia-slot run on my machine as well. But dmesg reports a acpi kernel backtrace. I do suspekt that it has anything to do with ACPI, so let's start searching for the differences. OK, booting the Suse kernel directly from hard disk is not possible since it expects to load the IDE drivers from initrd. initrd insists on searching for the CDROM. I was too lazy to modify the initrd and simply tried to compile a 2.6.11.7 with the configuration from the suse kernel (except for setting PIIX to static): It doesn't make any difference. still doesn't run the PCMCIA slot and still needs the pci=noacpi kernel parameter. The Suse config contains some veriables (e.g. CONFIG_ACPI_INITRD) which are not supported by the plain kernel. So some patches were applied, which seem to solve the problem. Now my kernel (pcmcia not working) has interrupts 145: 0 IO-APIC-level yenta, uhci_hcd 153: 3 IO-APIC-level yenta while the suse kernel had 5: 122 XT-PIC uhci_hcd, yenta, ohci1394, eth0 6: 82 XT-PIC yenta, eth2 I bet it is an ACPI problem. Hi, with some help from other people we found patches solving the problem: When applying the three patches pci-fix.patch cardbus-signedness cardbus-fixup-bridge the pcmcia slot works. I don't know where these patches originate from, I received them by e-mail. I'll attach them to this bug report. However, this opens another problem: The PCMCIA slot works, but when inserting an SD-Card into the SD-Card-Slot driven by the same chip, the pcmcia daemon goes into an endless loop, consuming full cpu. But this might be a different bug. I'll submit a new one as soon as I tested this a little bit. Created attachment 4971 [details]
pci-fix.patch
Created attachment 4972 [details]
cardbus-signedness
Created attachment 4973 [details]
cardbus-fixup-bridge
This report is a little confusing. - You initially report a problem with a "PC-Card", but later start a talking about a cardbus card. PC-Cards are crufty old 16-bit things and Cardbus is modern 32-bit. Please clafify. - You mention the need for pci=noacpi as if this fixes something, but it's not clear what problem pci=noacpi actually fixes. Can you please clarify that? Thanks for the detailed work, btw - I'll ask Linus and Greg to take a look at this once we have the above info. I meant a modern 32-bit card. And I always thought those crufty old 16-bit things were called "PCMCIA-Cards", while the term "PC-Card" was invented for those modern 32-bit cards. The term "PC-Card" did not exist in the old days of those 16-bit cards. The visible difference between PCMCIA Card and PC-Card is that PC-Cards have a nubbed contact plate and the connector is thicker on one side to avoid plugging a PC-Card into a PCMCIA slot. The need for pci=noacpi turned out to be independent of the card problem. I used a kernel with my default configuration, which I use for several different computers (including modern P4), but this kernel ran on the MSI notebook with this option only. Therefore I guessed that the card problem is somehow related to ACPI. Meanwhile someone else sent me a kernel configuration for which this pci=noacpi option is not needed, but since the configuration heavily differs from mine I did not yet figure out, what exactly makes the difference. But it has no effect on the cardbus problem, so this was a wrong guess of mine. I received a mail this morning from another user of the same machine who told me that the pci-fix.patch is not needed to solve the cardbus problem. So it is the cardbus-signedness and the cardbus-fixup-bridge patches which solve the problem. Unfortunately I have no idea where they came from. regards Hadmut The pci-fix.patch is invalid -- it's done differently in -mm already (pci-pci-transparent-bridge-handling-improvements-yenta_socket.patch). Other two look good, thanks. Does cardbus-signedness actually fix anything? Let's look more closely at this. - PCI_BASE_ADDRESS_MEM_MASK is defined in linux/pci.h as ~0x0fUL - an unsigned long constant. - pci_size() takes an unsigned long third argument - which is compatible with what is being passed. - pci_size() uses this in a logical expression with a u32, and a u32 result. For any 32-bit unsigned long, this patch makes no changes what so ever. For any 64-bit unsigned long, this patch doesn't change the expected outcome of this code because 64-bit & 32-bit == 32-bit. If it is the case (which I don't think) that this existing code is buggy, then the code following the usage of pci_size() is also buggy - it's doing the same as above, except putting the result in a 64-bit (in the 64-bit unsigned long case). Therefore, I recommend against this particular patch. Created attachment 5059 [details]
Patch for fixing the "cs: pcmcia_socket0: unable to apply power"
Hi,
I am using a VIA EPIA MEII-6000 motherboard with a Linux Kernel 2.6.8
The chipset of the cardbus is a "Ricoh Co Ltd RL5c476 II (rev 80)"
When I tried to plug a PCMCIA card in my slot I've found a message "cs:
pcmcia_socket0: unable to apply power" (I am using a Debian Sarge coming with a
2.6.8-2 kernel)
I have tried the patch (see attachment) on the "drivers/pcmcia/yenta_socket.c"
file in the kernel source and it solved my problem
Guys, is all this now fixed up in 2.6.12-rc5? If not, does that final patch need to be applied? If so, could someone please email it at me asap? Thanks. Hi, I just compiled 2.6.12-rc5. Does not work. I'll try the patch now. regards Hadmut ...and with the patch (cardbus-fixup-bridge) it works. so it still requires the patch (at least with my notebook) regards Hadmut cardbus-fixup-bridge is potentially dangerous since we have no idea how the bus numbers have been allocated. The ideal fix is for Linux to renumber the busses itself. Try: pci=assign-busses I can confirm this bug with 2.6.12-final on another re-branded MSI notebook called "TARGA Traveller 826T" (it's a Turion64 based notebook with ATI chipset and Ricoh Cardbus bridge). I didn't yet try the patch, but "pci=assign-busses" fully resolved the problem. 0000:00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5951 0000:00:02.0 PCI bridge: ATI Technologies Inc: Unknown device 5a34 0000:00:13.0 USB Controller: ATI Technologies Inc: Unknown device 4374 0000:00:13.1 USB Controller: ATI Technologies Inc: Unknown device 4375 0000:00:13.2 USB Controller: ATI Technologies Inc: Unknown device 4373 0000:00:14.0 SMBus: ATI Technologies Inc: Unknown device 4372 (rev 10) 0000:00:14.1 IDE interface: ATI Technologies Inc: Unknown device 4376 0000:00:14.3 ISA bridge: ATI Technologies Inc: Unknown device 4377 0000:00:14.4 PCI bridge: ATI Technologies Inc: Unknown device 4371 0000:00:14.5 Multimedia audio controller: ATI Technologies Inc: Unknown device 4370 (rev 01) 0000:00:14.6 Modem: ATI Technologies Inc: Unknown device 4378 (rev 01) 0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge 0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge 0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge 0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge 0000:01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5653 0000:02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 0000:02:04.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) 0000:02:04.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) 0000:02:04.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04) 0000:02:09.0 Network controller: Intel Corp.: Unknown device 4223 (rev 05) FYI: http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/pci/pci-fix-routing-in-parent-bridge.patch is queued by Greg KH to be merged upstream. Once this is in, the bug can be closed as resolved. Actually, the cardbus-fixup-bridge is already covered elsewhere. Merge. *** This bug has been marked as a duplicate of 2944 *** |