I/O Errors with O2Micro sdhci PCI MMC/SD host controller v2

Bug #323159 reported by dcam
122
This bug affects 31 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I have a situation with a fully updated Ubuntu 8.10 where inserting a 64Mb MMC card into my computer's card reader works fine, but inserting any of my SD cards gives errors as recorded in the output of dmesg and it fails to recognise the insertion of the card. Works fine elsewhere or with a different card reader.

This problem occurs in a Dell Vostro 1710. Note the message below about unknown controller version 2 and the possibility of problems.

From output of dmesg:
[ 15.420084] sdhci: Secure Digital Host Controller Interface driver
[ 15.420087] sdhci: Copyright(c) Pierre Ossman
[ 15.493868] sdhci-pci 0000:08:05.2: SDHCI controller found [1217:7120] (rev 2)
[ 15.493887] sdhci-pci 0000:08:05.2: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 15.493903] mmc0: Unknown controller version (2). You may experience problems.
[ 15.494009] mmc0: SDHCI controller on PCI [0000:08:05.2] using DMA

root@vostro:~# lspci | grep SD
08:05.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

Reportedly it is an O2Micro OZH24 SD/MMC Host Controller.

root@vostro:~# lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

Errors logged on insertion of SD cards is as follows:

[52996.340355] mmc0: new SD card at address 494e
[52996.341502] mmcblk0: mmc0:494e SD 124544KiB
[52996.341877] mmcblk0:<3>mmcblk0: error -84 transferring data
[52996.342464] end_request: I/O error, dev mmcblk0, sector 0
[52996.342474] Buffer I/O error on device mmcblk0, logical block 0
[52996.345370] mmcblk0: error -84 transferring data
[52996.345381] end_request: I/O error, dev mmcblk0, sector 0
[52996.345388] Buffer I/O error on device mmcblk0, logical block 0
[52996.347738] mmcblk0: error -84 transferring data
[52996.347746] end_request: I/O error, dev mmcblk0, sector 0
[52996.347754] Buffer I/O error on device mmcblk0, logical block 0
[52996.349233] mmcblk0: error -84 transferring data
[52996.349244] end_request: I/O error, dev mmcblk0, sector 0
[52996.349251] Buffer I/O error on device mmcblk0, logical block 0
[52996.359998] mmcblk0: error -84 transferring data
[52996.360034] end_request: I/O error, dev mmcblk0, sector 0
[52996.360045] Buffer I/O error on device mmcblk0, logical block 0
[52996.360076] ldm_validate_partition_table(): Disk read failed.
[52996.363244] mmcblk0: error -84 transferring data
[52996.363252] end_request: I/O error, dev mmcblk0, sector 0
[52996.363260] Buffer I/O error on device mmcblk0, logical block 0
[52996.364071] mmcblk0: error -84 transferring data

Revision history for this message
dcam (david-pastornet) wrote :

Looks like similar issues affects/affected the Acer Aspire 310 also...
http://ubuntuforums.org/archive/index.php/t-578953.html

Revision history for this message
Durand D'souza (durand1) wrote :

Hmm, I have the exact same problem on a Dell Vostro 1710 :( Any updates on your situation?

Revision history for this message
dcam (david-pastornet) wrote :

I the reporter don't have any progress on this matter. I'm using an external USB SD card reader to work around the issue for now. Would be nice to have it fixed.

Revision history for this message
dcam (david-pastornet) wrote :

In Ubuntu Jaunty [release version] on Dell Vostro 1710 [same hardware] I see different behaviour from Intrepid. On Jaunty insertion of an SD or MMC card results in absolutely nothing. No dmesg output...nothing as far as I can see. On Intrepid, the MMC card worked, but now with Jaunty, I see nothing whatsoever.

In Jaunty demsg output:

[ 13.835088] sdhci: Secure Digital Host Controller Interface driver
[ 13.835090] sdhci: Copyright(c) Pierre Ossman
[ 13.836497] sdhci-pci 0000:08:05.2: SDHCI controller found [1217:7120] (rev 2)
[ 13.836513] sdhci-pci 0000:08:05.2: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 13.836575] mmc0: Unknown controller version (2). You may experience problems.
[ 13.836700] mmc0: SDHCI controller on PCI [0000:08:05.2] using DMA

root@vostro:~# lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

root@vostro:~# lspci | grep SD
08:05.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

Revision history for this message
dcam (david-pastornet) wrote :

Acer Extensa 4420-5963 and Toshiba A300-15J have the same O2Micro controller (v2).

Revision history for this message
bobya (bobya) wrote :

I confirm the same issue with jaunty(9.04) on MSI GX700. It uses the same controller and again inserting a card results in absolutely nothing.
It was working for me in feisty(7.04) and nothing ever since.
I would really like to see this issue fixed.

Revision history for this message
RuiDC (ruidc) wrote :

I get the same on my MSI GT725 -same controller.

Revision history for this message
Abel O'Rian (abel-orian) wrote :

the same...

on boot:
[ 10.981706] mmc0: Unknown controller version (16). You may experience problems.

abel@abel-laptop:~$ lspci | grep SD
05:04.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)

--------------------------------------------------------------------------------------------------------------------------------

add:

Code:

blacklist sdhci-pci
blacklist sdhci
blacklist mmc_core

to /etc/modprobe.d/blacklist.conf

this solve the problem ?

Revision history for this message
shaoli.zhu (zsl1005) wrote :

Still have the same problem in 9.10 , the 2.6.31-11 kernel

$ dmesg | grep mmc
[ 1.898328] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 10.335565] mmc0: Unknown controller version (2). You may experience problems.
[ 10.335808] Registered led device: mmc0::
[ 10.335899] mmc0: SDHCI controller on PCI [0000:08:06.2] using DMA

$ lspci -nn | grep MMC
08:06.2 SD Host controller [0805]: O2 Micro, Inc. Integrated MMC/SD Controller [1217:7120] (rev 02)

Revision history for this message
vanni (vanni971) wrote :

The same problem in 9.10 too

$ dmesg | grep mmc
[ 3.101808] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 9.618846] mmc0: Unknown controller version (2). You may experience problems.
[ 9.618917] Registered led device: mmc0::
[ 9.618958] mmc0: SDHCI controller on PCI [0000:0d:06.2] using DMA
vanni@Morpheus:~$

Revision history for this message
vanni (vanni971) wrote :

Same problem in 9.10 too

$ dmesg | grep mmc
[ 3.101808] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 9.618846] mmc0: Unknown controller version (2). You may experience problems.
[ 9.618917] Registered led device: mmc0::
[ 9.618958] mmc0: SDHCI controller on PCI [0000:0d:06.2] using DMA

Revision history for this message
andyptaylor (andy-p-taylor) wrote :

Same problem

on boot:
(11.901981) mmc0: Unknown controller version (16). You may experience problems.

(11.902163) mmc0: SDHCI controller on PCI (0000:03:06.2) using PIO

But then freezes, so cant blacklist.

Revision history for this message
dcam (david-pastornet) wrote :

I'm happy to report that under Ubuntu 9.10 (Karmic), the SD card reader is working for me, though it still gives these messages:

[ 17.229764] sdhci-pci 0000:08:05.2: SDHCI controller found [1217:7120] (rev 2)
[ 17.229782] sdhci-pci 0000:08:05.2: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 17.229803] mmc0: Unknown controller version (2). You may experience problems.
[ 17.229843] Registered led device: mmc0::
[ 17.229873] mmc0: SDHCI controller on PCI [0000:08:05.2] using DMA

root@vostro-local:~# lspci | grep MMC/SD
08:05.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

root@vostro-local:~# df |grep mmc
/dev/mmcblk0p1 1984640 69248 1915392 4% /media/CAMPBELLSD

Revision history for this message
Seva Gluschenko (gvs-ya) wrote :

[ 14.219263] sdhci: Secure Digital Host Controller Interface driver
[ 14.219274] sdhci: Copyright(c) Pierre Ossman
[ 14.220542] sdhci-pci 0000:0a:01.2: SDHCI controller found [1217:7120] (rev 2)
[ 14.220563] sdhci-pci 0000:0a:01.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 14.220590] mmc0: Unknown controller version (2). You may experience problems.
[ 14.220629] Registered led device: mmc0::
[ 14.220661] mmc0: SDHCI controller on PCI [0000:0a:01.2] using DMA

Then, upon insertion of an SD card it makes nothing. Ubuntu 9.10

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi dcam,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/lucid . If the issue remains, please run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 323159

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Seva Gluschenko (gvs-ya) wrote :

I've just boot up the 2.6.33 kernel, and the problem with SD card gone. Have no MMC or XD cards to test. So it seems like the latest kernel fixes this issue.

tags: removed: needs-upstream-testing
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

dcam,
    Can you confirm if this is resolved per Seva's comment?

Thanks!

~JFo

Revision history for this message
dcam (david-pastornet) wrote :

As per my above comments, and despite comments since from others It is working for me in 2.6.28-18-generic (jaunty). I tested a lucid CD boot and it worked too, although it still says:

[ 85.818320] mmc0: Unknown controller version (2). You may experience problems.
[ 85.818358] Registered led device: mmc0::
[ 85.818389] mmc0: SDHCI controller on PCI [0000:08:05.2] using DMA

Is there some sort of file copying test suite I could run over it? I seem to remember that although it works, that there may be some transient issues with reliability.

Revision history for this message
abgalphabet (abgalphabet) wrote :

This issue still happens in the latest ubuntu lucid kernel 2.6.32.19.20.

here is the lspci output:
38:03.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

Revision history for this message
Goalie Fight (goaliefight) wrote :

Same problem here too on Lucid.

$ dmesg |grep mmc0
[ 11.849266] mmc0: Unknown controller version (2). You may experience problems.
[ 11.849585] Registered led device: mmc0::
[ 11.849624] mmc0: SDHCI controller on PCI [0000:04:00.0] using ADMA

 $ lspci|grep SD
04:00.0 SD Host controller: Ricoh Co Ltd Device e822 (rev 03

Revision history for this message
drunken monkey (remus) wrote :

Dito.

$ dmesg | grep mmc0
[ 19.796516] mmc0: Unknown controller version (2). You may experience problems.
[ 19.796597] Registered led device: mmc0::
[ 19.796634] mmc0: SDHCI controller on PCI [0000:0d:06.2] using DMA
$ lspci | grep SD
0d:06.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

Revision history for this message
Andrew Sam (mailandrewsam) wrote :

Same problem here on the latest Ubuntu, with Linux 2.6.32-22-generic kernel.

[ 18.957964] mmc0: Unknown controller version (2). You may experience problems.
[ 18.958067] Registered led device: mmc0::
[ 18.958108] mmc0: SDHCI controller on PCI [0000:0a:06.2] using DMA

With all the latest updates

Revision history for this message
china4u (china4u) wrote :

Still same problem here with latest Ubuntu, including all the latest updates:

6
[ 15.938218] mmc0: Unknown controller version (2). You may experience problems.

On a Dell Vostro 1520

More people with the same problem http://ubuntuforums.org/showthread.php?p=9239374#post9239374

its really annoying.

Revision history for this message
SF Basilix (sf-basilix) wrote :

I am experiencing the same error message on bootup.

Ubuntu 10.04 (lucid)
Dell Latitude E6510 w/Intel Core i5 and Intel graphics

$ dmesg | grep -i mmc
[ 0.786323] PCI: Using MMCONFIG at f8000000 - fbffffff
[ 10.473322] mmc0: Unknown controller version (2). You may experience problems.
[ 10.473437] Registered led device: mmc0::
[ 10.473475] mmc0: SDHCI controller on PCI [0000:03:00.1] using ADMA

$ lspci | grep SD
03:00.1 SD Host controller: Ricoh Co Ltd Device e822 (rev 03)

Revision history for this message
Johnathan Morlock (johnathan-morlock) wrote :

Hey everyone,

Using a Dell Vostro 1720, getting the same issue with Lucid kernel: 2.6.32-23-generic.

dmesg:
--------------------------------------------------------------------------------------------------------------------------------------------------
[ 22.305734] sdhci-pci 0000:1a:00.1: SDHCI controller found [1217:8120] (rev 1)
[ 22.305775] sdhci-pci 0000:1a:00.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 22.305805] mmc0: Unknown controller version (2). You may experience problems.
[ 22.305983] sdhci-pci 0000:1a:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 22.305997] sdhci-pci 0000:1a:00.1: setting latency timer to 64
[ 22.306039] Registered led device: mmc0::
[ 22.306082] mmc0: SDHCI controller on PCI [0000:1a:00.1] using DMA
--------------------------------------------------------------------------------------------------------------------------------------------------

Same for syslog:
--------------------------------------------------------------------------------------------------------------------------------------------------
Jul 8 00:37:26 7727609341 kernel: [ 22.305734] sdhci-pci 0000:1a:00.1: SDHCI controller found [1217:8120] (rev 1)
Jul 8 00:37:26 7727609341 kernel: [ 22.305775] sdhci-pci 0000:1a:00.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Jul 8 00:37:26 7727609341 kernel: [ 22.305805] mmc0: Unknown controller version (2). You may experience problems.
Jul 8 00:37:26 7727609341 kernel: [ 22.305983] sdhci-pci 0000:1a:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
Jul 8 00:37:26 7727609341 kernel: [ 22.305997] sdhci-pci 0000:1a:00.1: setting latency timer to 64
Jul 8 00:37:26 7727609341 kernel: [ 22.306039] Registered led device: mmc0::
Jul 8 00:37:26 7727609341 kernel: [ 22.306082] mmc0: SDHCI controller on PCI [0000:1a:00.1] using DMA
--------------------------------------------------------------------------------------------------------------------------------------------------

$ lspci | grep SD
1a:00.1 SD Host controller: O2 Micro, Inc. Device 8120 (rev 01)

NOTE: For me my card reader works fine after boot. But boot suffers a good 15 second delay due to this. It is annoying.

Thank you and God bless,
Johnathan

Revision history for this message
Bruno Menegola (menegola) wrote :

Maybe it's not a problem related with a specific controller? I also have the "unknown controller version" problem with my Dell Latitude E6510, but it is a Ricoh controller:

$ lspci -vvvnn -s 04:00.1
04:00.1 SD Host controller [0805]: Ricoh Co Ltd Device [1180:e822] (rev 03) (prog-if 01)
        Subsystem: Dell Device [1028:040b]
        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, Cache Line Size: 64 bytes
        Interrupt: pin B routed to IRQ 19
        Region 0: Memory at e5930000 (32-bit, non-prefetchable) [size=256]
        Capabilities: <access denied>
        Kernel driver in use: sdhci-pci
        Kernel modules: sdhci-pci

Though these bugs can be duplicates:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/474834
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/603445

My output is exactly like the last one. Also tested with kernel 2.6.33 but the problem remains.

Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

Confirming problem on Dell Latitude E6510 laptop, latest Ubuntu 10.04 kernel.

Warnings message in kernel log:
[ 2.671002] mmc0: Unknown controller version (2). You may experience problems.

Controller PCI device:
04:00.1 SD Host controller: Ricoh Co Ltd Device e822 (rev 03) (prog-if 01)
        Subsystem: Dell Device 040b

Tried to insert an SD card, but that gave errors, and it could not be mounted.

Revision history for this message
Johnathan Morlock (johnathan-morlock) wrote :

The following possible fix:
https://answers.launchpad.net/ubuntu/+question/2535

Has a file download link in it:
tp://scrdriver:scrdriver@209.19.104.194/Linux/O2Micro_PCMCIA_SCR_203_Linux_Kernel26_OpenSource.tar.gz

This link is no longer available and if another can't be found then this possible fix is no longer a fix.

Did a Google search for the file and found nothing... still searching...

Any help with this would be appreciated.

BTW, I've made a script to automate the mmc fix process as noted in the above possible fix.

As soon as another reliable link to the above file is found I can update the script.

Here is the script thus far:
===============================================================================
#!/bin/bash
# Fix the mmc "unknown controller" issue in Ubuntu with O2Micro MMC Readers

# Install pcsclite from http://pcsclite.alioth.debian.org/
# Will this work? sudo apt-get -y install pcsclite

# Install dos2unix utility to convert the package
sudo apt-get -y install tofrodos

# Get the source code to convert
wget ftp://scrdriver:scrdriver@209.19.104.194/Linux/O2Micro_PCMCIA_SCR_203_Linux_Kernel26_OpenSource.tar.gz

# Get the patches
wget http://lists.drizzle.com/pipermail/muscle/attachments/20060621/81fefc10/ozscrlx.c-patch-kernel-2.6.13-to-2.6.17configids-b-0001.bin

# Unpack
tar zxvf O2Micro_PCMCIA_SCR_203_Linux_Kernel26_OpenSource.tar.gz

# Convert the file with DOS line endings
dos2unix OZSCR_2.0.3_Kern_2.6/src/ozscrlx-2.6.13/ozscrlx.c

# Test
cd OZSCR_2.0.3_Kern_2.6
patch --dry-run -p1 < ../ozscrlx.c-patch-kernel-2.6.13-to-2.6.17configids-b-0001.bin

# You should get this..
# patching file src/ozscrlx-2.6.13/ozscrlx.c

# Apply the patch
patch -p1 < ../ozscrlx.c-patch-kernel-2.6.13-to-2.6.17configids-b-0001.bin

# Perform the install
sudo ./configure-release
===============================================================================

Thank you and God bless,
Johnathan

Revision history for this message
invitu (invitu) wrote :

Find a recent solution in Ubuntu 10.04 here : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/605043
You might try it

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu development release http://cdimage.ubuntu.com/daily-live/current/ . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
quintus22 (airmeng) wrote :

I have the same problem in 10.04 (Lucid) with the 2.6.32-25 kernel.
It delays the boot process by 15 sec. but the Card reader works!
Hardware is FujitsuSiemens Lifebook E8410.

[ 0.172785] PCI: Using MMCONFIG for extended config space
[ 0.678317] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 30.374268] mmc0: Unknown controller version (2). You may experience problems.
[ 30.374304] Registered led device: mmc0::
[ 30.374339] mmc0: SDHCI controller on PCI [0000:1c:03.2] using PIO

The recent solution in Ubuntu 10.04: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/605043 doesn't work om ny site.

Changed in linux (Ubuntu):
status: Expired → New
Brad Figg (brad-figg)
tags: added: b73a1py79
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in supported series, ple
ase file a new bug.

Changed in linux (Ubuntu):
status: New → Won't Fix
Brad Figg (brad-figg)
tags: removed: b73a1py79
Revision history for this message
gill_za (gillza) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.