Description of problem: On my T420S with built-in card reader the sd card can be read, but nothing can be written to it Version-Release number of selected component (if applicable): kernel 2.6.38.8-35.fc15.x86_64 How reproducible: 100% Steps to Reproduce: 1. insert sdcard into cardreader 2. mount one (mount -t vfat /dev/mmcblk0p1 /mnt/sdcard/ 3. write smth to it (no errors) 4. call sync to force data flush Actual results: data is silently dropped, many errors in dmesg Expected results: data is written to card Additional info: On card insert dmesg says [ 5972.410033] mmc0: new SD card at address 0002 [ 5972.411419] mmcblk0: mmc0:0002 00000 974 MiB [ 5972.413687] mmcblk0: p1 Here's what I see in dmesg after sync [ 6033.341748] mmcblk0: error -84 transferring data, sector 262, nr 1, card status 0x900 [ 6033.425992] end_request: I/O error, dev mmcblk0, sector 262 [ 6033.426005] quiet_error: 25 callbacks suppressed [ 6033.426012] Buffer I/O error on device mmcblk0p1, logical block 15 [ 6033.426017] lost page write due to I/O error on mmcblk0p1 [ 6033.426260] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00 [ 6033.426386] end_request: I/O error, dev mmcblk0, sector 506 [ 6033.426398] Buffer I/O error on device mmcblk0p1, logical block 259 [ 6033.426405] lost page write due to I/O error on mmcblk0p1 [ 6033.426534] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00 [ 6033.426647] end_request: I/O error, dev mmcblk0, sector 736 [ 6033.426657] Buffer I/O error on device mmcblk0p1, logical block 489 [ 6033.426664] lost page write due to I/O error on mmcblk0p1 [ 6033.426778] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00 [ 6033.426891] end_request: I/O error, dev mmcblk0, sector 123360 [ 6033.427198] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00 [ 6033.427295] end_request: I/O error, dev mmcblk0, sector 736 [ 6033.427302] Buffer I/O error on device mmcblk0p1, logical block 489 [ 6033.427307] lost page write due to I/O error on mmcblk0p1 [ 6142.610923] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00 [ 6142.610934] end_request: I/O error, dev mmcblk0, sector 736 The lspci output (this is T420S notebook) is 00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Device 0126 (rev 09) 00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b4) 00:1c.1 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 2 (rev b4) 00:1c.3 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 4 (rev b4) 00:1c.4 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 5 (rev b4) 00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Cougar Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 04) 03:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000 05:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04) 0d:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
Same problem here on a Thinkpad X220, with kernel-2.6.40.3-0.fc15.x86_64. It looks very similar to what's described here: http://comments.gmane.org/gmane.linux.kernel.mmc/8690
this workaround works for me : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/773524/comments/13 and the upstream bug report: https://lkml.org/lkml/2011/7/11/381
(In reply to comment #2) > this workaround works for me : > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/773524/comments/13 > > and the upstream bug report: > https://lkml.org/lkml/2011/7/11/381 That thread lead to commit 15bed0f2fa8e1d7db201692532c210a7823d2d21 which is in 3.1-rc2, which has a kernel built for f16 here: http://koji.fedoraproject.org/koji/buildinfo?buildID=259670 which is also queued for updates-testing. Could you please test that kernel?
> Could you please test that kernel? Doesn't work :( Only the workaround with the bunch of setpci-s helps.
(In reply to comment #4) > > Could you please test that kernel? > > Doesn't work :( Only the workaround with the bunch of setpci-s helps. Are you seeing the new message? "MMC controller base frequency changed to 50Mhz."
(In reply to comment #5) > Are you seeing the new message? > "MMC controller base frequency changed to 50Mhz." I don't see this message, and I confirm comment #4.
*** Bug 728616 has been marked as a duplicate of this bug. ***
OK, I can confirm that if I run the commands found here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/773524/comments/13 then the Ricoh SD card reader in my x220 works fine. That same set of commands should be performed by the PCI quirk, but it isn't registering for some reason. I'll look into this.
Ok, so here is what is happening on the x220. The PCI quirk that was added to fix this issue does get called, however it first checks to see if the proprietary MMC controller is disabled already (either by BIOS or possibly by some previous boot). If so, then it just returns immediately, which means that we never get to the e823 part of the quirk to lower the clock frequency. I moved the e823 check above the MMC disable, and things seem to be working rather well. I'll create a kernel with that patch shortly.
For those of you still seeing this, the following scratch build has the change I described in comment #9 in it. Please test with this kernel once it completes: http://koji.fedoraproject.org/koji/taskinfo?taskID=3406947 The patch itself has been sent upstream: http://article.gmane.org/gmane.linux.kernel/1199650
Now running kernel from build posted above, on Thinkpad X220 with affected internal SD device. Works a charm, it seems. Thanks!
Thanks for testing! I've added the patch and this should be in the next F15 kernel build.
kernel-2.6.40.7-0.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.40.7-0.fc15
Package kernel-2.6.40.7-0.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kernel-2.6.40.7-0.fc15' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-14513 then log in and leave karma (feedback).
kernel-2.6.40.7-3.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.40.7-3.fc15
kernel-2.6.40.8-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.40.8-2.fc15
kernel-2.6.40.8-4.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.40.8-4.fc15
Hello. I have Lenovo Thinkpad X220 and I have some issues with the cardreader. My cardreader is Ricoh Co Ltd MMC/SD Host Controller (rev 07), not rev 04 as others have on this laptop. This issue can be fixed for me using debug_quirks=0x40 or a bunch of setpci's mentioned in comment #8. In the first message Pavel can mount the card but if I put a card to the cardreader I got: mmc0: error -110 whilst initialising SD card or mmc0: error -84 whilst initialising SD card I hope we'll see the fix soon. Sorry for my bad English.
Oh, sorry, just found that my cardreader is e822 with ID [1180:e822], not e823. Should I make another bug and not to write here?
kernel-2.6.41.1-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.41.1-1.fc15
kernel-2.6.41.1-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.