Comment 24 for bug 773524

Daniel Manrique (roadmr) wrote :

Hello,

So I compiled and tried the updated module.

I tried outright replacing the existing sdhci-pci module and rebooting, to see how it behaves under that circumstance. When I do that, I don't get the "Ricoh E823 MMC detected, slowing down the bus" string, and so the reader doesn't work (old behavior where it says "error -110 whilst initialising").

I then rebooted, removed the module and reinserted it, and I get this in dmesg:

[ 361.638355] sdhci-pci 0000:01:00.0: PCI INT A disabled
[ 365.436461] sdhci-pci 0000:01:00.0: SDHCI controller found [1180:e823] (rev 4)
[ 365.436551] sdhci-pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 365.436560] Ricoh E823 MMC detected, slowing down the bus
[ 365.436895] sdhci-pci 0000:01:00.0: setting latency timer to 64
[ 365.436912] mmc0: no vmmc regulator found
[ 365.437051] Registered led device: mmc0::
[ 365.437237] mmc0: SDHCI controller on PCI [0000:01:00.0] using DMA

So at least it's recognizing the reader and (hopefully) issuing the PCI commands.

However I get this when I insert the card:

[ 1261.775828] mmc0: card lacks mandatory switch function, performance might suffer.
[ 1261.775966] mmc0: error -110 whilst initialising SD card
[ 1271.755658] mmc0: Timeout waiting for hardware interrupt.
[ 1271.755664] sdhci: =========== REGISTER DUMP (mmc0)===========
[ 1271.755671] sdhci: Sys addr: 0x00000000 | Version: 0x00000502
[ 1271.755677] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 1271.755682] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 1271.755688] sdhci: Present: 0x01f70001 | Host ctl: 0x00000001
[ 1271.755693] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
[ 1271.755699] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
[ 1271.755705] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
[ 1271.755710] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
[ 1271.755716] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 1271.755721] sdhci: Caps: 0x21e832b2 | Caps_1: 0x00008073
[ 1271.755727] sdhci: Cmd: 0x00000102 | Max curr: 0x00000040
[ 1271.755729] sdhci: ===========================================
[ 1271.889153] mmc0: card lacks mandatory switch function, performance might suffer.
[ 1271.889293] mmc0: error -110 whilst initialising SD card
[ 1281.876704] mmc0: Timeout waiting for hardware interrupt.
[ 1281.876712] sdhci: =========== REGISTER DUMP (mmc0)===========
[ 1281.876718] sdhci: Sys addr: 0x00000000 | Version: 0x00000502
[ 1281.876723] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 1281.876729] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 1281.876734] sdhci: Present: 0x01f70001 | Host ctl: 0x00000001
[ 1281.876739] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
[ 1281.876744] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
[ 1281.876749] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
[ 1281.876755] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
[ 1281.876761] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 1281.876767] sdhci: Caps: 0x21e832b2 | Caps_1: 0x00008073
[ 1281.876772] sdhci: Cmd: 0x00000102 | Max curr: 0x00000040
[ 1281.876774] sdhci: ===========================================

I then tried going back to the original module, as shipped with the kernel. I reboot, then remove that module and insert the test module. I get the same result as above, and the card doesn't work :(

Just to double-check that the setpci commands from comment #13 are good, I rebooted again with the original module, unloaded sdhci and sdhci_pci, ran the commands and reloaded these two modules (originals). I don't get any errors and the cards get recognized and mounted without problems.

Maybe I'm doing something wrong, if so please let me know, also let me know if I should test something else.

Thanks!