Hello Community,
I'm a long time user of Linux, but only just recently began exploring how devices are managed under the hood. I'm hoping this question will be a learning experience.
Whenever I insert a PC Card (e.g. SD card adapter, CF card adapter, ATA flash card, etc) into the PC Card slot on my laptop I get the following error:
Code:
>dmesg
...
[ 529.852792] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
[ 529.852809] pcmcia_socket pcmcia_socket0: cs: memory probe 0xe4d30000-0xe576ffff:
[ 529.862125] excluding 0xe4fc0000-0xe5063fff
[ 529.880120] pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 18)
[ 529.906778] pata_pcmcia: probe of 0.0 failed with error -12
I have a fresh install of Debian 12, kernel version 6.1.0-13-amd64. I get the same message with a fresh install of Fedora 38 on the same laptop. In order to rule out the possibility that the PCMCIA hardware is bad, I installed Windows 10 and official drivers on the same laptop, and the hardware works fine - all PC Cards work as intended. My goal is to get the PC Card slot to work in Linux.
Here is some relevant information about my system:
Code:
>lspci -vvv
...
04:00.0 CardBus bridge: Ricoh Co Ltd CardBus bridge (rev 02)
Subsystem: Dell Latitude E6510
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 18
IOMMU group: 19
Region 0: Memory at e5940000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=04, secondary=05, subordinate=08, sec-latency=176
Memory window 0: e3100000-e44fffff (prefetchable)
Memory window 1: e4800000-e4bfffff
I/O window 0: 00002000-00003fff
I/O window 1: 00000000-00000003
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset- 16bInt+ PostWrite+
16-bit legacy interface ports at 0001
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [98] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME+
Capabilities: [80] Express (v1) PCI-Express to PCI/PCI-X Bridge, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- AttnBtn+ AttnInd+ PwrInd+ RBE+ SlotPowerLimit 10W
DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ BrConfRtry-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr+ FatalErr- UnsupReq+ AuxPwr- TransPend-
LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Kernel driver in use: yenta_cardbus
Kernel modules: yenta_socket
The second line from lspcmcia always appear the same regardless of the PC Card inserted. (Note: I know from a different laptop with the same Linux kernel that the driver should be pata_pcmcia if it's working. Debian and Fedora do support PCMCIA out of the box on certain laptops.)
Code:
>lspcmcia
...
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:04:00.0)
Socket 0 Device 0: [-- no driver --] (bus ID: 0.0)
The system is detecting the PC Cards that I'm inserting. But the devices are not showing up in /dev. Instead I always get the error in dmesg, "pata_pcmcia: probe of 0.0 failed with error -12".
Code:
>pccardctl ident 0
...
product info: "STI
", "Flash 8.0.0
", "", ""
manfid: 0x014d, 0x0100
function: 4 (fixed disk)
Code:
>lsmod | grep pcmcia
...
pata_pcmcia 20480 0
pcmcia 77824 1 pata_pcmcia
pcmcia_rsrc 24576 1 yenta_socket
pcmcia_core 36864 3 pcmcia,pcmcia_rsrc,yenta_socket
libata 401408 3 libahci,ahci,pata_pcmcia
I've tried modifying /etc/pcmcia/config.opts with memory ranges and I/O port ranges that I know worked while I had Windows 10 installed on the same laptop. But from dmesg and lspci -vvv it appears this file is ignored because the assigned memory window is always outside the ranges that I specify.
I've also tried modifying GRUB with the parameter pci=assign-busses, because in an old post on another forum someone mentioned that in their case "...The BIOS-provided PCI bus numbering didn't leave any space for the CardBus bus on the other side of the bridge to receive a bus number." To be honest, I don't know what this means and the solution worked for them but didn't work for me.
Is there anything else I can try? I appreciate your time and experience.
Thank you in advance.