[Toshiba Tecra R850] SD card reader doesn't work

Bug #773524 reported by Daniel Manrique
184
This bug affects 32 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Manoj Iyer
Natty
Fix Released
Undecided
Manoj Iyer
Oneiric
Fix Released
Medium
Manoj Iyer

Bug Description

Steps to reproduce:
- Install Natty on a Tecra R850
- Insert SD card into the slot

Expected result:
- Card is recognized and auto-mounted

Actual result:
- Nothing on the desktop, and a lot of errors on syslog/dmesg, as attached (dmesg current).

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1402 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xc4820000 irq 48'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0269,11790626,00100100 HDA:80862805,11790001,00100000'
   Controls : 21
   Simple ctrls : 10
Date: Fri Apr 29 14:20:18 2011
HibernationDevice: RESUME=UUID=0dc73311-b661-4bdd-b440-63ca81502c4e
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
MachineType: TOSHIBA TECRA R850
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=0eb89bb0-b068-4f01-bd3b-c192d9d5fcb6 ro quiet splash initcall_debug vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.52
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/04/2011
dmi.bios.vendor: TOSHIBA
dmi.bios.version: Version 2.10
dmi.board.asset.tag: 0000000000
dmi.board.name: Portable PC
dmi.board.vendor: TOSHIBA
dmi.board.version: Version A0
dmi.chassis.asset.tag: 0000000000
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: Version 1.0
dmi.modalias: dmi:bvnTOSHIBA:bvrVersion2.10:bd03/04/2011:svnTOSHIBA:pnTECRAR850:pvrPT524C-00H003:rvnTOSHIBA:rnPortablePC:rvrVersionA0:cvnTOSHIBA:ct10:cvrVersion1.0:
dmi.product.name: TECRA R850
dmi.product.version: PT524C-00H003
dmi.sys.vendor: TOSHIBA

Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

The card reader is a RIcoh e823, might be related to bug 717435, but I filed as a new bug, since although 717435 is supposed to be fix released, the reader still doesn't work on the Tecra R850.

Revision history for this message
Ara Pulido (ara) wrote :

Assigning to the QA team

Changed in linux (Ubuntu):
assignee: nobody → Canonical Platform QA Team (canonical-platform-qa)
importance: Undecided → Medium
tags: removed: blocks-hwcert
Revision history for this message
Brian Murray (brian-murray) wrote :

I imagine the SD card has been tested in other systems and it works okay. Is that right? I've also sometimes find that cleaning out card readers resolves issues like these.

Still assigning to the kernel team though.

Changed in linux (Ubuntu):
assignee: Canonical Platform QA Team (canonical-platform-qa) → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
David Duffey (dduffey) wrote :

It appears that this SD card reader may be the same that is found on the Lenovo X220, which works (717435). I would leave room for someone with more expertise to verify the system here and on 717435 are actually the same SD card readers. Is there a way to verity that any firmware involved is the same or running different versions?

But we have two R850s, one Intel based, another AMD based, that both have this problem. So it is unlikely a dirty card reader.

Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Manoj Iyer (manjo) wrote :

Appears to be the same issue we see with MMC cards on the X220.
mmcblk0: error -110 sending status command

IMHO this is caused because the MMC function of the Card reader chipset gets in the way of the SD interfaces in the driver, there is a way to disable the MMC function of the chipset so that we can use the SD interfaces in the kernel to read MMC/SD/SDHCI cards. We need to know the PCI config bits that needs to be written to the chipset. If the BIOS vendor can give us that information we should be able to get this working. Please refer to my email communications to the linux-input upstream mailing list for details.

Revision history for this message
Alexandre (ab-linuxfr) wrote :

The Toshiba Portégé R830 is also affected by the bug.
I'm using kubuntu natty.

# uname -a
Linux deep 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
# lspci
...
01:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04)
...

and the dmesg output can be found here : http://pastebin.com/9Sn448fS

Revision history for this message
David Duffey (dduffey) wrote :

Some more information:

We found the following information "check the class code of SD controller on Tecra R850. If the class code is not "0x05", SDHCI driver is not installed. because the class code must be 0x05 for SDHCI. The class code is the offset address 0x0A in Configuration register of Ricoh SD host controller, DID 0xE823."

We then ran the following:

"ubuntu@201103-7412:~$ lspci
... lots of irrelevant devices ...
01:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04)
01:00.1 System peripheral: Ricoh Co Ltd Device e232 (rev 04)
01:00.2 System peripheral: Ricoh Co Ltd Device e852 (rev 07)
... irrelevant devices ...

so I want to query device 01:00.0.

ubuntu@201103-7412:~$ setpci -vD -s 01:00.0 0x0A.w
0000:01:00.0 @0a = 0880

It looks to me like it's *not* 0x05 as it should be..."

When looking at the ubuntu git tree, it appears that it should already "work"
 * sdhci-pci.c has already included Ricoh R5U220, 0xE823 device ID, so the driver would be installed on Tecra R850.
 * And sdhci.c and sdhci.h has included "Base clock frequency change in spec3.0".

In summary, I will see if we are looking at the correct value in the configuration editor.

Revision history for this message
Giuseppe Paterno' (gpaterno) wrote :

Reporting tested a few different SD cards today. The Verbatim SD 64MB and the Kingston 8GB SDHC are working fine. Please see results below.

Verbatim SD 64MB
Result: Pass

Buffalo SD 512MB
Result: Fail
Message: -
dmesg: I/O error, dev mmcblk0, sector xxx

Kingston SD 2GB
Result: Fail
Message: -
dmesg: I/O error, dev mmcblk0, sector xxx

Kingston 8GB SDHC
Message: -
Result: Pass

Patriot Micro SDHC
Result: Fail
Message: Unable to mount 8GB Files system. Error mounting mount
/dev/mmcblk0p1: can't read superblock
dmesg: I/O error, dev mmcblk0, sector xxx. Unable to FAT: unable to read
boot sector

Revision history for this message
trigeorgis (trigeorgis) wrote :

Same thing happens on a Toshiba Sattellite Pro R850 with a Transcend SDHC class 10 16GB.

[33587.844827] mmc0: error -123 whilst initialising SD card
[33589.025408] mmc0: error -110 whilst initialising SD card
[33599.018082] mmc0: Timeout waiting for hardware interrupt.
[33599.018096] sdhci: =========== REGISTER DUMP (mmc0)===========
[33599.018109] sdhci: Sys addr: 0x00000000 | Version: 0x00000502
[33599.018120] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[33599.018129] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[33599.018137] sdhci: Present: 0x01f70001 | Host ctl: 0x00000001
[33599.018157] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
[33599.018162] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
[33599.018167] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
[33599.018173] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
[33599.018179] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[33599.018184] sdhci: Caps: 0x21e8c8b2 | Caps_1: 0x00008073
[33599.018190] sdhci: Cmd: 0x00000102 | Max curr: 0x00000040
[33599.018191] sdhci: ===========================================
[33599.459634] mmc0: error -110 whilst initialising SD card
[33609.462501] mmc0: Timeout waiting for hardware interrupt.
[33609.462511] sdhci: =========== REGISTER DUMP (mmc0)===========
[33609.462521] sdhci: Sys addr: 0x00000000 | Version: 0x00000502
[33609.462531] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[33609.462551] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[33609.462563] sdhci: Present: 0x01f70001 | Host ctl: 0x00000001
[33609.462573] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
[33609.462584] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
[33609.462594] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
[33609.462605] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
[33609.462616] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[33609.462627] sdhci: Caps: 0x21e8c8b2 | Caps_1: 0x00008073
[33609.462638] sdhci: Cmd: 0x00000102 | Max curr: 0x00000040
[33609.462643] sdhci: ===========================================
[33609.905434] mmc0: error -110 whilst initialising SD card

Revision history for this message
Giuseppe Paterno' (gpaterno) wrote :

Also latest kernel didn't fixed the issue:

Linux 201103-7412 2.6.38-11-generic #45~pre201107010902-Ubuntu SMP Fri Jul 1 09:21:35 UTC 2011 i686 i686 i386 GNU/Linux

Revision history for this message
meitham (meitham) wrote :

The issue exist also in linux 3.0 (linux-image-3.0.0-0300rc2-generic_3.0.0-0300rc2.201106081532_amd64)
and linux 2.6.39 (linux-image-2.6.39-020639rc4-generic_2.6.39-020639rc4.201104191410_amd64)

Revision history for this message
Giuseppe Paterno' (gpaterno) wrote :

Everybody subscribed to this bug, please verify that this trick will work for you:

sudo setpci -v -d 1180:e823 f9.B=fc
sudo setpci -v -d 1180:e823 150.B=10
sudo setpci -v -d 1180:e823 f9.B=00
sudo setpci -v -d 1180:e823 fc.B=01
sudo setpci -v -d 1180:e823 e1.B=32
sudo setpci -v -d 1180:e823 fc.B=00

sudo rmmod sdhci_pci
sudo rmmod sdhci
sudo modprobe sdhci
sudo modprobe sdhci_pci

If yes, I will create a patch for sdhci-pci.c

Revision history for this message
meitham (meitham) wrote :

@gpaterno fix tested on these three kernels and it worked on all three of them:
* 2.6.38-10-generic
* 2.6.39-020639rc4-generic and
* 3.0.0-0300rc2-generic

Cheers to @gpaterno
M

Revision history for this message
Andrey Krutov (a-o-krutov) wrote :

It works on 3.0-2-generic!

Revision history for this message
vilmos (vilmos) wrote :

Fix from #13 works on my Thinkpad X220.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Giuseppe,

Tested on both my R850s, one Intel and one ATI/AMD, both work perfectly with the trick you suggested, card gets recognized and mounted without problems.

This works even on a stock 2.6.38-8 Natty kernel.

Thanks so much!

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Bram Biesbrouck (b-m) wrote :

I confirm this works on Lenovo Thinkpad X220 with kernel 2.6.39-0-generic on Natty (x86_64)

Revision history for this message
David Duffey (dduffey) wrote :

For those reporting success on the X220, are you using an SD card that was not working before the setpci commands, or are you using an MMC card? I was under the impression that SD cards worked on the X220, and this problem was unique to the Toshiba R850s.

Also, for documentation's sake here is the equivalent kernel code that should do the same as the setpci commands:

      // add below for ricoh e823 before pci_read_config in "Device
probing" and in sdhci_pci_resume.

      pci_write_config_byte(pdev, 0xf9, 0xfc);
      pci_write_config_byte(pdev, 0xf150, 0x10);
      pci_write_config_byte(pdev, 0xf9, 0x00);

      pci_write_config_byte(pdev, 0xfc, 0x01);
      pci_write_config_byte(pdev, 0xe1, 0x32);
      pci_write_config_byte(pdev, 0xfc, 0x00);
         // end of adding code for ricoh e823

Revision history for this message
Bram Biesbrouck (b-m) wrote :

@David: I'm using an SDXC (64GB) on a Thinkpad X220 that didn't work before without the setpci commands.

Revision history for this message
Andrey Krutov (a-o-krutov) wrote :

Some SD cards works on X220, some doesn't work (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/773524/comments/9). Now I'm using SD card on X220 that didn't work before.

Revision history for this message
Giuseppe Paterno' (gpaterno) wrote :

I don't have access to a Lenovo x220 or tecra R850 myself, so I would really appreciate if you can try with this module:
http://www.gpaterno.com/external/sdhci_pci_patch.tar

it's a recompiled version of sdhci-pci.ko for 2.6.38 ***32 BIT ONLY*** (i.e. i686, no 64-bit)

so remove it first with rmmod sdhci-pci and then insmod sdhci-pci.ko
try also to search in dmesg for "Ricoh E823 MMC detected"
If it is working, I will post the patch for sdhci-pci.c

Thank you.

Revision history for this message
Giuseppe Paterno' (gpaterno) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Download full text (3.7 KiB)

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: ========================================...

Read more...

Revision history for this message
Manoj Iyer (manjo) wrote :

Can you please test the kernel in

http://kernel.ubuntu.com/~manjo/oneiric/lp773524ricoh/

and report back here ?

PS: it is an oneiric based kernel but it should install on natty just fine.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Manoj,

I tried the stock Oneiric kernel on my Natty R850 and it doesn't work, shows error -110 whilst initialising. I tried several Kingston 1GB cards and a 128-MB one.

However the kernel you posted (3.0 with apparently some changes) does work, just as if the PCI commands from #13 had been issued, which so far is the only other way I've gotten the R850 reader to work.

I tried with several Kingston 1 GB cards (the ones I normally use) and the 128-MB card I had lying around, all worked fine.

they say this:

[ 372.373594] mmc0: new SD card at address b368
[ 372.374011] mmcblk0: mmc0:b368 SD 970 MiB
[ 372.375710] mmcblk0: p1

I even tried one with a borked partition table (doesn't work, but at least the kernel sees it):
[ 381.900701] mmc0: new SD card at address b368
[ 381.901092] mmcblk0: mmc0:b368 SD 970 MiB
[ 381.905208] mmcblk0: unknown partition table
[ 385.744511] mmc0: card b368 removed

Let me know if you need some more info on this.

Revision history for this message
Daniel Manrique (roadmr) wrote :
Download full text (5.2 KiB)

BTW, here's what I get on card insertion, with both the Oneiric stock kernel and a mainline 3.0 kernel:

Jul 11 14:49:04 201103-7412 kernel: [ 40.102101] mmc0: new SD card at address b368
Jul 11 14:49:04 201103-7412 kernel: [ 40.136877] mmcblk0: mmc0:b368 SD 970 MiB
Jul 11 14:49:04 201103-7412 kernel: [ 40.138031] mmcblk0: retrying using single block read
Jul 11 14:49:04 201103-7412 kernel: [ 40.138112] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138117] end_request: I/O error, dev mmcblk0, sector 0
Jul 11 14:49:04 201103-7412 kernel: [ 40.138195] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138197] end_request: I/O error, dev mmcblk0, sector 1
Jul 11 14:49:04 201103-7412 kernel: [ 40.138260] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138262] end_request: I/O error, dev mmcblk0, sector 2
Jul 11 14:49:04 201103-7412 kernel: [ 40.138326] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138328] end_request: I/O error, dev mmcblk0, sector 3
Jul 11 14:49:04 201103-7412 kernel: [ 40.138390] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138392] end_request: I/O error, dev mmcblk0, sector 4
Jul 11 14:49:04 201103-7412 kernel: [ 40.138455] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x800b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138457] end_request: I/O error, dev mmcblk0, sector 5
Jul 11 14:49:04 201103-7412 kernel: [ 40.138519] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138520] end_request: I/O error, dev mmcblk0, sector 6
Jul 11 14:49:04 201103-7412 kernel: [ 40.138594] mmcblk0: error -110 sending status command
Jul 11 14:49:04 201103-7412 kernel: [ 40.138595] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
Jul 11 14:49:04 201103-7412 kernel: [ 40.138597] end_request: I/O error, dev mmcblk0, sector 7
Jul 11 14:49:04 201103-7412 kernel: [ 40.138600] Buffer I/O error on device mmcblk0, logical block 0
Jul 11 14:49:04 201103-7412 kernel: [ 40.138660] mmcblk0: retrying using single block read
Jul 11 14:49:04 201103-7412 kernel: [ 40.138724] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138726] end_request: I/O error, dev mmcblk0, sector 0
Jul 11 14:49:04 201103-7412 kernel: [ 40.138790] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138792] end_request: I/O error, dev mmcblk0, sector 1
Jul 11 14:49:04 201103-7412 kernel: [ 40.138856] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
Jul 11 14:49:04 201103-7412 kernel: [ 40.138857] end_request: I/O error, dev mmcblk0, sector 2
Jul 11...

Read more...

Revision history for this message
Manoj Iyer (manjo) wrote :

can you please test the kernel in

http://kernel.ubuntu.com/~manjo/oneiric/lp773524ricoh/v2/

and report back here? this kernel should fix issues with the card after resume from suspend.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Manoj,

Tested your latest kernel on the R850, suspend/resume and even hibernate/restore behavior is correct now, I see no errors in the logs when restoring/resuming, I even tested leaving the card inside while suspending/hibernating and it restores/resumes OK and auto-mounts the card.

Kernel version string is:
Linux version 3.0.0-4-generic-pae (root@tangerine) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-2ubuntu1) ) #5 SMP Mon Jul 11 19:44:11 UTC 2011

Thanks!

Revision history for this message
Manoj Iyer (manjo) wrote :

Daniel,

Here is the final version of the kernel that I am going to propose to upstream. Can you please verify that it works just as well as the previous one ?

http://kernel.ubuntu.com/~manjo/oneiric/lp773524ricoh/v3/

and report back here.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Manoj,

Here's the kernel version string:

Linux 201103-7412 3.0.0-4-generic-pae #5 SMP Mon Jul 11 20:26:49 UTC 2011 i686 i686 i386 GNU/Linux

I tested this on both my R850s (Intel and AMD GPUs respectively). I tested:

- Inserting and removing the card. Gets recognized and auto-mounted.
- Inserting and removing the card after suspend (S3). Works fine as above.
- Inserting and removing the card after hibernate (S4). Works fine as above.
- Inserting the card, suspending, resuming. The card still gets detected and mounted as soon as the system is back up.
- Inserting the card, hibernating, restoring. Same as above.
- Several crazy combinations such as removing the card while the system is suspended/hibernating. Works as expected and the card gets recognized if I insert it after the system is back up.

Thanks, let me know if you want me to do some more tests on this.

Revision history for this message
Manoj Iyer (manjo) wrote :

Kernel tested on Version: ThinkPad X220 Tablet, BIOS Revision: 0.25.

Linux u 3.0.0-4-generic-pae #5 SMP Mon Jul 11 20:26:49 UTC 2011 i686 GNU/Linux

Sandisk Class2 SD card, able to mount and perform I/O
Transcend MMC 2GB did not mount before the patch, mounts after the patch and able to perform I/O

=== SD ===
[ 44.510107] mmc0: new SD card at address 0002
[ 44.510292] mmcblk0: mmc0:0002 00000 1.86 GiB
[ 44.512408] mmcblk0: p1
u@u:~/Documents$

=== MMC ===

[ 726.510850] mmc0: card 0001 removed
[ 731.688463] mmc0: error -110 whilst initialising MMC card
[ 731.776506] mmc0: error -110 whilst initialising MMC card
[ 731.864157] mmc0: new MMC card at address 0001
[ 731.864611] mmcblk0: mmc0:0001 MMC 1.87 GiB
[ 731.866047] mmcblk0: p1
u@u:~/Documents$

Revision history for this message
Manoj Iyer (manjo) wrote :

Sandisk 2GB Class2 SD card Read/Write time test after the patch was applied.

Revision history for this message
Manoj Iyer (manjo) wrote :

Sandisk 2GB Class2 SD card Read/Write time test before the patch was applied.

Revision history for this message
Manoj Iyer (manjo) wrote :

Sandisk 2GB Class 2 SD card flashbench test after the patch was applied.

Revision history for this message
Manoj Iyer (manjo) wrote :

Sandisk 2GB Class2 SD card flashbench test before the patch was applied.

Revision history for this message
Andrey Krutov (a-o-krutov) wrote :

Hi Manoj,

  Cloud you put also 64bit kernel (or just ready to build deb source), please?

Revision history for this message
Bram Biesbrouck (b-m) wrote :

I second Andrey with a request for a 64bit version of the kernel...

Revision history for this message
Manoj Iyer (manjo) wrote :

Andrey, Bram,

The kernels I posted was for testing purpose only, I am SRUing this in Natty and Oneiric, it is better to have an official kernel than to have one custom rolled. If it gets accepted it should hit proposed tree soon.

Thanks

Revision history for this message
Manoj Iyer (manjo) wrote :

SRU JUSTIFICATION
================

EFFECT
======
Ricoh 1180:e823 does not recognize certain types of SD/MMC cards.
- Buffalo SD 512MB
  dmesg: I/O error, dev mmcblk0, sector xxx
- Kingston SD 2GB
  dmesg: I/O error, dev mmcblk0, sector xxx
- Patriot Micro SDHC
  dmesg: I/O error, dev mmcblk0, sector xxx.

FIX
===
Lowering the SD base clock frequency from 200Mhz to 50Mhz fixes this issue. This solution was suggest by Koji Matsumuro, Ricoh Company, Ltd.

TEST
====
Performance test results with various MMC and SD cards were posted to https://lkml.org/lkml/2011/7/11/381 and also part of the results attached to this bug.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Natty):
assignee: nobody → Manoj Iyer (manjo)
status: New → In Progress
Changed in linux (Ubuntu Oneiric):
assignee: Canonical Kernel Team (canonical-kernel-team) → Manoj Iyer (manjo)
status: Confirmed → In Progress
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Oneiric):
status: In Progress → Fix Committed
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.0.0-7.9

---------------
linux (3.0.0-7.9) oneiric; urgency=low

  [ Andy Whitcroft ]

  * Revert "[Upstream] add local prefix to oss local change_bits"
  * Revert "SAUCE: add tracing for user initiated readahead requests"
  * Revert "SAUCE: vfs: Add a trace point in the mark_inode_dirty function"
  * Revert "SAUCE: Input: ALPS - Enable Intellimouse mode for Lenovo
    Zhaoyang E47"
  * Revert "SAUCE: fix documentation strings for struct input_keymap_entry"
  * Revert "SAUCE: vt -- fix handoff numbering to 1..n and add range checks
    (grub)"
  * Revert "SAUCE: vt -- fix handoff numbering to 1..n and add range
    checks"
  * Revert "SAUCE: vt -- allow grub to request automatic vt_handoff"
  * Revert "SAUCE: vt -- maintain bootloader screen mode and content until
    vt switch"
  * [Config] enable CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
    - LP: #816035
  * ubuntu: Yama: if an underlying filesystem provides a permissions op use
    it
  * SAUCE: (no-up) add tracing for user initiated readahead requests
  * SAUCE: vt -- maintain bootloader screen mode and content until vt
    switch
  * SAUCE: vt -- allow grub to request automatic vt_handoff

  [ Arjan van de Ven ]

  * SAUCE: (no-up) vfs: Add a trace point in the mark_inode_dirty function

  [ Kees Cook ]

  * Revert "SAUCE: (no-up) Disable building the ACPI debugfs source"
  * [Config] enforce ACPI_CUSTOM_METHOD disabled

  [ Keng-Yu Lin ]

  * SAUCE: (no-up) Input: ALPS - Enable Intellimouse mode for Lenovo
    Zhaoyang E47
    - LP: #632884, #803005

  [ Leann Ogasawara ]

  * [Config] Enable CONFIG_BLK_DEV_CMD64X=m on powerpc
    - LP: #513131
  * [Config] Enable CONFIG_RT2800PCI_RT53XX=y
    - LP: #815064

  [ Rezwanul Kabir ]

  * SAUCE: (no-up) Add support for Intellimouse Mode in ALPS touchpad on
    Dell E2 series Laptops
    - LP: #632884

  [ Upstream Kernel Changes ]

  * Revert "yama: if an underlying filesystem provides a permissions op use
    it"
  * Revert "Add support for Intellimouse Mode in ALPS touchpad on Dell E2
    series Laptops"
  * Revert "tty: include linux/slab.h for kfree"
  * Revert "gpio/ml_ioh_gpio: include linux/slab.h for kfree"
  * Revert "pch_dma: add include/slab.h for kfree"
  * mmc: Added quirks for Ricoh 1180:e823 lower base clock frequency
    - LP: #773524
  * oss: rename local change_bits to avoid powerpc bitsops.h definition
 -- Leann Ogasawara <email address hidden> Mon, 25 Jul 2011 09:08:01 -0700

Changed in linux (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Herton R. Krzesinski (herton) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-natty' to 'verification-done-natty'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-natty
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Herton,

I installed and tested the kernel from -proposed on two Toshiba R850s, one with Intel graphics, the other with AMD Radeon graphics.

Both systems failed as described originally when inserting the SD card.

With the new kernel the card reader works! I tested with 1-GB Kingston SD cards.

This is what I see in /var/log/syslog:

Sep 6 13:51:23 201103-7412 kernel: [ 99.940660] mmc0: new SD card at address b368
Sep 6 13:51:23 201103-7412 kernel: [ 99.999328] mmcblk0: mmc0:b368 SD 970 MiB
Sep 6 13:51:23 201103-7412 kernel: [ 100.000521] mmcblk0: p1

The card automounts under /media/something-or-other, I then tested writing about 150 MB worth of files which went on without any reported errors in syslog.

Kernel version string is:
Linux version 2.6.38-11-generic (buildd@roseapple) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ) #49-Ubuntu SMP Mon Aug 29 20:47:58 UTC 2011

This was tried on both R850s with similar success.

I'm tagging verification-done-natty per Herton's request.

Thanks so much for getting this fix into -proposed!

tags: added: verification-done-natty
removed: verification-needed-natty
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.38-11.50

---------------
linux (2.6.38-11.50) natty-proposed; urgency=low

  [Herton R. Krzesinski]

  * Release Tracking Bug
    - LP: #848246

  [ Upstream Kernel Changes ]

  * Revert "eCryptfs: Handle failed metadata read in lookup"
  * Revert "KVM: fix kvmclock regression due to missing clock update"
  * Revert "ath9k: use split rx buffers to get rid of order-1 skb
    allocations"

linux (2.6.38-11.49) natty-proposed; urgency=low

  [Herton R. Krzesinski]

  * Release Tracking Bug
    - LP: #836903

  [ Adam Jackson ]

  * SAUCE: drm/i915/pch: Fix integer math bugs in panel fitting
    - LP: #753994

  [ Keng-Yu Lin ]

  * SAUCE: Input: ALPS - Enable Intellimouse mode for Lenovo Zhaoyang E47
    - LP: #632884, #803005

  [ Stefan Bader ]

  * [Config] Force perf to use libiberty for demangling
    - LP: #783660

  [ Tim Gardner ]

  * [Config] Add enic/fnic to udebs
    - LP: #801610

  [ Upstream Kernel Changes ]

  * eeepc-wmi: add keys found on EeePC 1215T
    - LP: #812644
  * eCryptfs: Handle failed metadata read in lookup
    - LP: #509180
  * pagemap: close races with suid execve, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * report errors in /proc/*/*map* sanely, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * close race in /proc/*/environ, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * auxv: require the target to be tracable (or yourself), CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * deal with races in /proc/*/{syscall, stack, personality}, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * vmscan: fix a livelock in kswapd
    - LP: #813797
  * mmc: Add PCI fixup quirks for Ricoh 1180:e823 reader
    - LP: #773524
  * mmc: Added quirks for Ricoh 1180:e823 lower base clock frequency
    - LP: #773524
  * rose: Add length checks to CALL_REQUEST parsing, CVE-2011-1493
    - LP: #816550
    - CVE-2011-1493
  * pata_marvell: Add support for 88SE91A0, 88SE91A4
    - LP: #777325
  * GFS2: make sure fallocate bytes is a multiple of blksize, CVE-2011-2689
    - LP: #819572
    - CVE-2011-2689
  * Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.
    - LP: #819569
    - CVE-2011-2492
  * drm/nv50-nvc0: work around an evo channel hang that some people see
    - LP: #583760
  * KVM: fix kvmclock regression due to missing clock update
    - LP: #795717
  * Add mount option to check uid of device being mounted = expect uid,
    CVE-2011-1833
    - LP: #732628
    - CVE-2011-1833
  * proc: fix oops on invalid /proc/<pid>/maps access, CVE-2011-1020
    - LP: #813026
    - CVE-2011-1020
  * ipv6: make fragment identifications less predictable, CVE-2011-2699
    - LP: #827685
    - CVE-2011-2699
  * ath9k: use split rx buffers to get rid of order-1 skb allocations
    - LP: #728835
  * perf: Fix software event overflow, CVE-2011-2918
    - LP: #834121
    - CVE-2011-2918
 -- Herton Ronaldo Krzesinski <email address hidden> Mon, 12 Sep 2011 17:23:38 -0300

Changed in linux (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Nathan McCorkle (nmz787) wrote :

This bug is still present in linux-image-2.6.28-11-generic-pae (2.6.38-11.50)... I'm running Natty 11.04 on a Lenovo Thinkpad Edge 420 (e420)

Paterno's fix (comment #13 here) worked for me, SD card immediately mounted with no trouble. How can I fix this?

Here's just a snippet of the errors produced upon inserting an SD card before using the comment #13 fix:

17207.043719] mmc0: new SD card at address e624
[17207.044093] mmcblk0: mmc0:e624 SD02G 1.89 GiB
[17207.045072] mmcblk0: retrying using single block read
[17207.045546] mmcblk0: error -84 transferring data, sector 0, nr 8, card status 0x900
[17207.045557] end_request: I/O error, dev mmcblk0, sector 0
[17207.046411] mmcblk0: error -84 transferring data, sector 2, nr 6, card status 0x900
[17207.046418] end_request: I/O error, dev mmcblk0, sector 2
[17207.048327] quiet_error: 1201 callbacks suppressed
[17207.048335] Buffer I/O error on device mmcblk0, logical block 0
[17207.049118] ldm_validate_partition_table(): Disk read failed.
[17207.049263] Dev mmcblk0: unable to read RDB block 0
[17207.049990] mmcblk0: retrying using single block read
[17207.053198] mmcblk0: unable to read partition table
[17207.059826] mmcblk0: retrying using single block read
[17207.059935] mmcblk0: error -84 sending read/write command, response 0x0, card status 0xb00
[17207.059943] end_request: I/O error, dev mmcblk0, sector 0
[17207.060041] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400b00
[17207.060047] end_request: I/O error, dev mmcblk0, sector 1
[17207.060166] mmcblk0: error -84 sending status command
[17207.060172] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
[17207.060177] end_request: I/O error, dev mmcblk0, sector 2
[17207.060241] mmc0: Got data interrupt 0x00600000 even though no data operation was in progress.
[17207.060246] sdhci: =========== REGISTER DUMP (mmc0)===========
[17207.060259] sdhci: Sys addr: 0x2a900200 | Version: 0x00000502
[17207.060271] sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000001
[17207.060283] sdhci: Argument: 0x00000600 | Trn mode: 0x00000013
[17207.060296] sdhci: Present: 0x01ff0000 | Host ctl: 0x00000003
[17207.060308] sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[17207.060320] sdhci: Wake-up: 0x00000000 | Clock: 0x00000107
[17207.060332] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
[17207.060344] sdhci: Int enab: 0x02ff00cb | Sig enab: 0x02ff00cb
[17207.060356] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[17207.060367] sdhci: Caps: 0x21e8c8b2 | Caps_1: 0x00008073
[17207.060380] sdhci: Cmd: 0x0000113a | Max curr: 0x00000040
[17207.060383] sdhci: ===========================================

Revision history for this message
Anthony Wong (anthonywong) wrote :

@Manoj, I think your patch essentially performs the commands in comment #13, any ideas why it's failing on Nathan's system?

Revision history for this message
Ian Gibbs (flash666) wrote :

I confirm that the released kernel for natty fixes this on a Dell Studio 1558

Revision history for this message
Florian Burger (mfg-burger) wrote :

The problem still occurs on the Thinkpad T420s with Oneiric ("Ricoh Co Ltd Device e823 (rev 04)"). An inserted SD Card is not recognized at all.

Revision history for this message
Christoph H. (chille07) wrote :

The problem also still occurs on Thinkpad X220t with Oneiric ("Ricoh Co Ltd Device e823 (rev 07)") with a SDHC-Card with 8GB.
Errormessage in /var/log/kern.log is: "mmc0: error -84 whilst initialising SD card".
I also tried #13, then it worked for yesterday after a reboot, but I have the same problem today and #13 is not working anymore...

Revision history for this message
TienFu Chen (ctf) wrote :

My X220 has the same problem on specified SD card. Comment #13 works for me.
I updated to kernel:
Linux natty64 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:27:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
However problem still exists.

I took a look at the source of 2.6.38-12.51, the fix seems not in the source sdhci-pci.c

My system detail can be found at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/886109

Revision history for this message
ozzloy (ozzloy) wrote :

i used the fix in #13 and my lenovo x1 sd card reader works now.

before, i got stuff like this in /var/syslog:

Nov 6 19:32:15 planchet kernel: [ 131.036775] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x700
Nov 6 19:32:15 planchet kernel: [ 131.036779] end_request: I/O error, dev mmcblk0, sector 6
Nov 6 19:32:15 planchet kernel: [ 131.036841] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x700
Nov 6 19:32:15 planchet kernel: [ 131.036845] end_request: I/O error, dev mmcblk0, sector 7

after running the stuff in #13 i get this:
Nov 6 19:55:37 planchet kernel: [ 1530.900652] mmc0: card d555 removed
Nov 6 19:55:37 planchet kernel: [ 1530.942612] sdhci-pci 0000:0d:00.0: PCI INT A disabled
Nov 6 19:55:37 planchet kernel: [ 1530.979487] sdhci: Secure Digital Host Controller Interface driver
Nov 6 19:55:37 planchet kernel: [ 1530.979496] sdhci: Copyright(c) Pierre Ossman
Nov 6 19:55:37 planchet kernel: [ 1531.005460] sdhci-pci 0000:0d:00.0: SDHCI controller found [1180:e823] (rev 7)
Nov 6 19:55:37 planchet kernel: [ 1531.005504] sdhci-pci 0000:0d:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Nov 6 19:55:37 planchet kernel: [ 1531.005591] sdhci-pci 0000:0d:00.0: setting latency timer to 64
Nov 6 19:55:37 planchet kernel: [ 1531.005615] mmc0: no vmmc regulator found
Nov 6 19:55:37 planchet kernel: [ 1531.006866] Registered led device: mmc0::
Nov 6 19:55:37 planchet kernel: [ 1531.008067] mmc0: SDHCI controller on PCI [0000:0d:00.0] using DMA
Nov 6 19:55:37 planchet kernel: [ 1531.167729] mmc0: new SDHC card at address d555
Nov 6 19:55:37 planchet kernel: [ 1531.168199] mmcblk0: mmc0:d555 SD08G 7.60 GiB
Nov 6 19:55:37 planchet kernel: [ 1531.170653] mmcblk0: p1

and ubuntu automounted the card and i was about to get around 4 gigs of video off of it.

this is on ubuntu 11.04

thanks, gpaterno!

Revision history for this message
ozzloy (ozzloy) wrote :

"and ubuntu automounted the card and i was about to get around 4 gigs of video off of it."
should read
"and ubuntu automounted the card and i was *able* to get around 4 gigs of video off of it.

Revision history for this message
DataGovernor (adler1) wrote :

I have the same bug on my Thinkpad 220i with Ubuntu 11.10 and the official 3.1 kernel. I tried the fix in #13 and that works for me. But is that fix permanent after reboots?

Revision history for this message
ValdikSS (valdikss) wrote :

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 #13.
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.

Revision history for this message
ValdikSS (valdikss) wrote :

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?

Revision history for this message
Daniel Manrique (roadmr) wrote :

ValdikSS,

The fix submitted for this bug triggers only if the exact PCI device identifier [1180:e823] is found. Thus it sounds reasonable that, if you have a different reader, the fix would not work automatically, but does when you run the commands manually.

So please do file another bug. Open a terminal and type:

ubuntu-bug linux

This will attach relevant information to your report. Once your report has been filed, please add a comment indicating that manually applying the configuration on comment #13 from this bug (773524) fixes your problem (if indeed that is the case).

Thanks!

Revision history for this message
igorsh (ishipenkov) wrote :

in my Thinkpad X220i cardreader has id 1180:e823 but it still not work with kernel 3.0 or 3.1

Messages in logs are the same:

Nov 8 22:24:01 thinkpad kernel: [118221.345540] mmc0: Timeout waiting for hardware interrupt.
Nov 8 22:24:01 thinkpad kernel: [118221.345551] sdhci: =========== REGISTER DUMP (mmc0)===========
Nov 8 22:24:01 thinkpad kernel: [118221.345561] sdhci: Sys addr: 0x00000000 | Version: 0x00000502
Nov 8 22:24:01 thinkpad kernel: [118221.345570] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345578] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345587] sdhci: Present: 0x01f70001 | Host ctl: 0x00000005
Nov 8 22:24:01 thinkpad kernel: [118221.345595] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345603] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345611] sdhci: Timeout: 0x00000009 | Int stat: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345620] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
Nov 8 22:24:01 thinkpad kernel: [118221.345628] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345636] sdhci: Caps: 0x21e8c8b2 | Caps_1: 0x00008073
Nov 8 22:24:01 thinkpad kernel: [118221.345644] sdhci: Cmd: 0x00000102 | Max curr: 0x00000040
Nov 8 22:24:01 thinkpad kernel: [118221.345650] sdhci: Host ctl2: 0x00000000
Nov 8 22:24:01 thinkpad kernel: [118221.345653] sdhci: ===========================================
Nov 8 22:24:01 thinkpad kernel: [118221.505188] mmc0: error -110 whilst initialising SD card

Workaround from #13 still works for me

Revision history for this message
Andrey Krutov (a-o-krutov) wrote :

The same situation as in #57 for my thinkpad x220 with
Linux lizard 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
and
0d:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04)

It gets same messages in dmesg. But work perfectly after run #13.

Revision history for this message
Thomas Sibley (thomas-sibley) wrote :

Thinkpad T420s with what appears to be the same problem, but the workaround in comment #13 doesn't fix it for me. Neither does "options sdhci debug_quirks=0x40" in /etc/modprobe.d/sdhci.conf and an rmmod/modprobe.

Revision 07 of the Ricoh device, not 04 like others.

tom@whaam ~ $ sudo lspci -vd 1180:e823
05:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 07)
 Subsystem: Lenovo Device 21d2
 Flags: bus master, fast devsel, latency 0, IRQ 19
 Memory at d0d00000 (32-bit, non-prefetchable) [size=256]
 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
 Capabilities: [78] Power Management version 3
 Capabilities: [80] Express Endpoint, MSI 00
 Capabilities: [100] Virtual Channel
 Capabilities: [800] Advanced Error Reporting
 Kernel driver in use: sdhci-pci
 Kernel modules: sdhci-pci

Any thoughts? I wish I could use the SD reader on this machine...

Revision history for this message
steve bruce (sproot) wrote :

Still not working by default for me, Toshiba Satellite R830:

$ lspci | grep Ricoh
01:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 07)
$ uname -a
Linux Tosh 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux

Fix in #13 works though.

Revision history for this message
steve bruce (sproot) wrote :

Typically, right after I posted #60 update manager popped up and offered a new kernel:

$ uname -a
Linux Tosh 3.0.0-13-generic-pae #22-Ubuntu SMP Wed Nov 2 15:17:35 UTC 2011 i686 i686 i386 GNU/Linux

It works fine now, I presume it's the kernel and not the fix in #13 being persistent across reboots.

Revision history for this message
Thomas Sibley (thomas-sibley) wrote :

On oneiric, still doesn't work with 3.0.0-13 kernel, even with the workaround from #13.

tom@whaam ~ $ uname -a
Linux whaam 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Jawaid Bazyar (jb-forethought) wrote :

The fix in #13 works for me too.

I have a Lenovo Thinkpad T420s with 11.10.

Linux shell2 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011 i686 i686 i386 GNU/Linux

Revision history for this message
Jawaid Bazyar (jb-forethought) wrote :

And like Steve in #62, kernel update 3.0.0-14 seems to fix it as well.

Revision history for this message
Kristian Rink (kawazu) wrote :

Seeing something akin to this on a Toshiba Tecra M11, installed 11.10 yesterday. Kernel seems to be up to date:

Linux node428 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 i686 i386 GNU/Linux

Device seems a bit different though:

01:00.0 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 01)
01:00.1 System peripheral: Ricoh Co Ltd Memory Stick Host Controller (rev 01)
01:00.2 System peripheral: Ricoh Co Ltd Device e852 (rev 01)

Adding to this, it seems the device supports ejecting the card via software control, and as far as I have seen now, I got the card to remain loaded only once, seeing this in dmesg...

[ 1561.064650] mmc0: Controller never released inhibit bit(s).
[ 1561.064659] sdhci: =========== REGISTER DUMP (mmc0)===========
[ 1561.064668] sdhci: Sys addr: 0x00000000 | Version: 0x00000400
[ 1561.064676] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 1561.064684] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 1561.064692] sdhci: Present: 0x01ff0001 | Host ctl: 0x00000001
[ 1561.064700] sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[ 1561.064707] sdhci: Wake-up: 0x00000000 | Clock: 0x00004007
[ 1561.064715] sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 1561.064723] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
[ 1561.064731] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 1561.064739] sdhci: Caps: 0x01e032b2 | Caps_1: 0x00000000
[ 1561.064747] sdhci: Cmd: 0x0000371a | Max curr: 0x00000040
[ 1561.064752] sdhci: Host ctl2: 0x00000000
[ 1561.064755] sdhci: ===========================================
[ 2628.760076] usb 1-1.6: USB disconnect, device number 5

... and now being not even able to correctly insert the card anymore as the mechanism "ejecting" the card seems in some way open so the card won't stay in place...?

Revision history for this message
Michael Cook (michaelcook-mjc) wrote :

#13 workaround didn't work for me.

U10.04LTS - Linux T420-laptop 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:32:42 UTC 2011 x86_64 GNU/Linux

Revision history for this message
Scott Howard (showard314) wrote :

comments #48, 59, 66 say that the workaround doesn't fix T420 thinkpads. I have a T420, and it still doesn't work. However, comment #63 confirms that comment #13's fix works for T420s.

Since enough users have confirmed that it is still present in T420, I'm reopening bug #879674.

Revision history for this message
Scott Howard (showard314) wrote :

err, reopoen bug #717435

Revision history for this message
Thomas Sibley (thomas-sibley) wrote : Re: [Bug 773524] Re: [Toshiba Tecra R850] SD card reader doesn't work

Comment #13 does _not_ work for me on a T420s. Any ideas?

Revision history for this message
Janne Boman (janne-m-boman) wrote :

Comment #13 works on T61 and Debian Squeeze.

Revision history for this message
Emeric Vigier (emeric-vigier) wrote :

Workaround from comment #13 works for me as well on my Lenovo thinkpad x220 running Linux Mint 12 with linux-3.0.0-12-generic x86_64 SMP. I guess I will need to update to kernel 3.0.0-14 to get it fixed forever.

Revision history for this message
Catalin Patulea (cpatulea) wrote :

debug_quirks=0x40 worked for me on lucid 2.6.38-15.

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (4.2 KiB)

This just happened to me on Precise with this kernel, so it looks like the fix for Natty & Oneiric needs to be applied to Precise also.
Linux thinkpad 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Removing the sdhci_pci & sdhci modules and re-loading them fixed the issued.

[262622.993708] ------------[ cut here ]------------
[262622.993721] WARNING: at /build/buildd/linux-3.2.0/drivers/mmc/host/sdhci.c:959 sdhci_send_command+0x1f3/0x240 [sdhci]()
[262622.993726] Hardware name: 4318CTO
[262622.993728] Modules linked in: mmc_block iwlwifi hid_microsoft usbhid hid pci_stub vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) ip6table_filter ip6_tables dm_crypt ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp iptable_filter ip_tables x_tables joydev bridge stp kvm_intel kvm bnep rfcomm parport_pc ppdev btusb bluetooth snd_hda_codec_hdmi nvidia(P) arc4 mxm_wmi uvcvideo videodev v4l2_compat_ioctl32 snd_hda_codec_conexant mac80211 snd_seq_midi thinkpad_acpi snd_rawmidi psmouse snd_seq_midi_event serio_raw snd_seq cfg80211 snd_hda_intel i7core_edac edac_core snd_hda_codec snd_hwdep snd_seq_device snd_pcm snd_timer snd nvram tpm_tis soundcore snd_page_alloc wmi mac_hid lp parport vesafb firewire_ohci e1000e firewire_core sdhci_pci crc_itu_t sdhci video [last unloaded: iwlwifi]
[262622.993815] Pid: 1075, comm: rs:main Q:Reg Tainted: P W O 3.2.0-30-generic #48-Ubuntu
[262622.993818] Call Trace:
[262622.993820] <IRQ> [<ffffffff81066d7f>] warn_slowpath_common+0x7f/0xc0
[262622.993832] [<ffffffff81066dda>] warn_slowpath_null+0x1a/0x20
[262622.993841] [<ffffffffa000e6e3>] sdhci_send_command+0x1f3/0x240 [sdhci]
[262622.993850] [<ffffffffa000e804>] sdhci_finish_data+0xd4/0x150 [sdhci]
[262622.993858] [<ffffffffa000ecdf>] sdhci_data_irq+0x14f/0x220 [sdhci]
[262622.993867] [<ffffffffa000ef4f>] sdhci_irq+0x19f/0x260 [sdhci]
[262622.993872] [<ffffffff810d8a85>] handle_irq_event_percpu+0x55/0x210
[262622.993878] [<ffffffff810d8c91>] handle_irq_event+0x51/0x80
[262622.993883] [<ffffffff810dbcba>] handle_fasteoi_irq+0x6a/0x110
[262622.993888] [<ffffffff81015282>] handle_irq+0x22/0x40
[262622.993894] [<ffffffff8166551a>] do_IRQ+0x5a/0xe0
[262622.993898] [<ffffffff8165a8ae>] common_interrupt+0x6e/0x6e
[262622.993901] <EOI> [<ffffffff8125e3fc>] ? jbd2__journal_start+0x8c/0x110
[262622.993912] [<ffffffff811179c3>] ? find_get_page+0x13/0x90
[262622.993917] [<ffffffff81117a6a>] find_lock_page+0x2a/0x80
[262622.993923] [<ffffffff81117cc9>] grab_cache_page_write_begin+0x49/0xe0
[262622.993929] [<ffffffff81217cc0>] ext4_da_write_begin+0xa0/0x210
[262622.993935] [<ffffffff813177ad>] ? copy_user_generic_string+0x2d/0x40
[262622.993941] [<ffffffff811172da>] generic_perform_write+0xca/0x210
[262622.993946] [<ffffffff8121b940>] ? ext4_dirty_inode+0x50/0x60
[262622.993952] [<ffffffff8111747d>] generic_file_buffered_write+0x5d/0x90
[262622.993958] [<ffffffff81118e99>] __generic_file_aio_write+0x229/0x440
[262622.993964] [<ffffffff81119122>] generic_file_aio_write+0x72/0xe0
[262622.993970] [<fffff...

Read more...

Revision history for this message
Florian Stoll (flostoll) wrote :

Nearly the same situtation with my lenovo t500 ricoh-cardreader on ubuntu 12.04 precise.

@grubbs: "Removing the sdhci_pci & sdhci modules and re-loading them fixed the issued."

To post a comment you must log in.