Score:0

SDHCI Driver Fails on First Load and Succeeds on Subsequent Reload

bd flag

I have a RHEL 6 system with kernel 2.6.32 that is currently exhibiting problems with the sdhci driver.

When I first load the sdhci_pci kernel module (after loading the sdhci module) when an SD card is inserted, I observe a large number of I/O errors and the device is not enumerated.

Oct 13 02:52:57 localhost kernel: sdhci: Secure Digital Host Controller Interface driver
Oct 13 02:52:57 localhost kernel: sdhci: Copyright(c) Pierre Ossman
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1b.0: SDHCI controller found [8086:5aca] (rev b)
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1b.0: power state changed by ACPI to D0
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1b.0: power state changed by ACPI to D0
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1b.0: PCI INT A -> GSI 3 (level, low) -> IRQ 3
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1b.0: Invalid iomem size. You may experience problems.
Oct 13 02:52:57 localhost kernel: Registered led device: mmc0::
Oct 13 02:52:57 localhost kernel: mmc0: SDHCI controller on PCI [0000:00:1b.0] using ADMA
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1c.0: SDHCI controller found [8086:5acc] (rev b)
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1c.0: power state changed by ACPI to D0
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1c.0: power state changed by ACPI to D0
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1c.0: PCI INT A -> GSI 39 (level, low) -> IRQ 39
Oct 13 02:52:57 localhost kernel: sdhci-pci 0000:00:1c.0: Invalid iomem size. You may experience problems.
Oct 13 02:52:57 localhost kernel: Registered led device: mmc1::
Oct 13 02:52:57 localhost kernel: mmc1: SDHCI controller on PCI [0000:00:1c.0] using ADMA
Oct 13 02:52:57 localhost kernel: mmc0: new ultra high speed SDHC card at address 59b4
Oct 13 02:52:57 localhost kernel: mmcblk0: mmc0:59b4 SD    14.7 GiB
Oct 13 02:52:57 localhost kernel: mmcblk0:
Oct 13 02:52:57 localhost kernel: mmcblk0: retrying using single block read
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending status comand
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending read/write command, response 0x0, card status 0x0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 transferring data, sector 0, nr 8, card status 0x0
Oct 13 02:52:57 localhost kernel: __ratelimit: 577 callbacks suppressed
Oct 13 02:52:57 localhost kernel: end_request: I/O error, dev mmcblk0, sector 0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending status comand
Oct 13 02:52:57 localhost kernel: mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 transferring data, sector 1, nr 7, card status 0x0
Oct 13 02:52:57 localhost kernel: end_request: I/O error, dev mmcblk0, sector 1
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending status comand
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending read/write command, response 0x0, card status 0x0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 transferring data, sector 2, nr 6, card status 0x0
Oct 13 02:52:57 localhost kernel: end_request: I/O error, dev mmcblk0, sector 2
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending status comand
Oct 13 02:52:57 localhost kernel: mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 transferring data, sector 3, nr 5, card status 0x0
Oct 13 02:52:57 localhost kernel: end_request: I/O error, dev mmcblk0, sector 3
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending status comand
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 sending read/write command, response 0x0, card status 0x0
Oct 13 02:52:57 localhost kernel: mmcblk0: error -84 transferring data, sector 4, nr 4, card status 0x0
Oct 13 02:52:57 localhost kernel: end_request: I/O error, dev mmcblk0, sector 4
...

If I subsequently unload and reload those kernel modules - with the SD card still inserted - the errors are not reported and the device is enumerated properly. I can then mount the device and read/write to it as expected.

Oct 13 02:53:31 localhost kernel: sdhci: Secure Digital Host Controller Interface driver
Oct 13 02:53:31 localhost kernel: sdhci: Copyright(c) Pierre Ossman
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1b.0: SDHCI controller found [8086:5aca] (rev b)
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1b.0: power state changed by ACPI to D0
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1b.0: power state changed by ACPI to D0
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1b.0: PCI INT A -> GSI 3 (level, low) -> IRQ 3
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1b.0: Invalid iomem size. You may experience problems.
Oct 13 02:53:50 localhost kernel: Registered led device: mmc0::
Oct 13 02:53:50 localhost kernel: mmc0: SDHCI controller on PCI [0000:00:1b.0] using ADMA
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1c.0: SDHCI controller found [8086:5acc] (rev b)
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1c.0: power state changed by ACPI to D0
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1c.0: power state changed by ACPI to D0
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1c.0: PCI INT A -> GSI 39 (level, low) -> IRQ 39
Oct 13 02:53:50 localhost kernel: sdhci-pci 0000:00:1c.0: Invalid iomem size. You may experience problems.
Oct 13 02:53:50 localhost kernel: Registered led device: mmc1::
Oct 13 02:53:50 localhost kernel: mmc1: SDHCI controller on PCI [0000:00:1c.0] using ADMA
Oct 13 02:53:50 localhost kernel: mmc0: new high speed SDHC card at address 59b4
Oct 13 02:53:50 localhost kernel: mmcblk0: mmc0:59b4 SD    14.7 GiB
Oct 13 02:53:50 localhost kernel: mmcblk0: p1

As long as I leave the SD card inserted, I can unload/reload the kernel modules and use the device with no issues.

As soon as I eject the card, however, I will once again experience errors the first time I subsequently reload sdhci and sdhci_pc and I will again see those errors go away on the very next reload.

Any insights into why this might be happening?


UPDATE:

After the I/O errors are reported, I only need to unload and reload sdhci_pci. In other words, I need not unload and reload sdhci as well.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.