Bug 93201 - RTS5129 card reader fails to read SDXC card using the new kernel drivers
Summary: RTS5129 card reader fails to read SDXC card using the new kernel drivers
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: MMC/SD (show other bugs)
Hardware: All Linux
: P1 high
Assignee: drivers_mmc-sd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 18:47 UTC by David Santamaría Rogado
Modified: 2019-11-22 10:30 UTC (History)
17 users (show)

See Also:
Kernel Version: 3.17.x, 3.18.x, 4.0.x, 4.1.x, 4.2.x
Tree: Mainline
Regression: No


Attachments

Description David Santamaría Rogado 2015-02-13 18:47:34 UTC
I'm making this bug report with Adrian Sándor's mail to lkml as I found his mail searching with the same log text.

The mail is here: https://lkml.org/lkml/2015/1/6/444

I have one RTS5129 card reader buit-in in my laptop and I found that my SDXC card was corrupt, but researching more I found that with another SDXC card reader the card was fine.

I have done tests with badblocks and seems to work well with SD cards. I haven't but will do, test with SDHC cards.

With badblock the pattern that makes more bad blocks is 0xff, don't know if this could help to found the bug in code.

I haven't tried like Adrian with the previous module found in older kernels. The specific module for this card readers was another one. Adrian says that the old module worked as it should.

Thanks in advance.
Comment 1 David Santamaría Rogado 2015-02-13 18:49:50 UTC
Forget to paste Adrian's log:

Jan  6 22:59:47 yoga kernel: [  815.662453] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:48 yoga kernel: [  816.265726] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:48 yoga kernel: [  816.872253] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x80800b00
Jan  6 22:59:49 yoga kernel: [  817.475467] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:49 yoga kernel: [  818.079672] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:50 yoga kernel: [  818.681950] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:51 yoga kernel: [  819.286227] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900
Jan  6 22:59:52 yoga kernel: [  820.494652] mmcblk0: error -110 sending 
status command, retrying
Jan  6 22:59:52 yoga kernel: [  820.495144] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0xb00
Jan  6 22:59:52 yoga kernel: [  821.100047] mmcblk0: error -110 sending 
stop command, original cmd response 0x900, card status 0x900

I have the same errors.
Comment 2 David Santamaría Rogado 2015-02-17 22:03:58 UTC
I'm setting this to high as this causes corruption of sd card, not by reading despite the content is read as corrupt, but by writing.
Comment 3 David Santamaría Rogado 2015-03-03 19:44:28 UTC
No one is watching this bug?
Comment 4 David Santamaría Rogado 2015-06-05 13:49:23 UTC
This continues in 4.0.x
Comment 5 David Santamaría Rogado 2015-09-23 07:49:51 UTC
Also  affects 4.1.x and 4.2.x, tested both under fedora 22 and 23.

I also want to remind that this is a very important bug, and it makes data to be corrupted.
Comment 6 David Santamaría Rogado 2015-11-05 23:24:17 UTC
Should I forward this to a mailing list? This bug as stated previously is so "dangerous" and it's a pitty that the previous kernel module for this hardware worked and the new module don't, perhaps even there are more important bugs derived from this module change.
Comment 7 David Santamaría Rogado 2016-01-31 13:23:54 UTC
This bug it's still present.
Comment 8 Szőgyényi Gábor 2017-03-06 20:17:07 UTC
Please try to reproduce this bug with latest kernel image.
Comment 9 David Santamaría Rogado 2017-03-21 22:56:24 UTC
(In reply to Szőgyényi Gábor from comment #8)
> Please try to reproduce this bug with latest kernel image.

Will try to test as soon as possible but that is going to be at least two weeks, sorry.
Comment 10 David Santamaría Rogado 2017-09-30 16:07:45 UTC
Sorry forget this one, I don't have the original card I used but have tested with another more recent sdxc card 64 gb. The result actually is the same, no even can't mount the partition it has because it can't even read the format.

Also I could rise this bug with a 16 gb sd card.

The actual dmesg output with 4.12.14 kernel is:
[  619.990860] mmc0: tuning execution failed: -22
[  619.990877] mmc0: error -22 whilst initialising SD card
[  626.067728] mmc0: tuning execution failed: -22
[  626.067746] mmc0: error -22 whilst initialising SD card
[  632.246465] mmc0: tuning execution failed: -22
[  632.246481] mmc0: error -22 whilst initialising SD card
[  637.398643] mmc0: tuning execution failed: -22
[  637.398660] mmc0: error -22 whilst initialising SD card
[  638.689157] mmc0: new ultra high speed SDR50 SDXC card at address 0001
[  638.756061] mmcblk0: mmc0:0001 EC2QT 59.6 GiB 
[  638.758546]  mmcblk0: p1
[  639.404076] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  640.045408] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x80800b00
[  640.684232] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x80800b00
[  641.323842] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  641.964425] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  642.604381] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  643.244227] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x80800b00
[  643.883995] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  645.164879] mmcblk0: error -110 sending status command, retrying
[  645.166193] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0xb00
[  645.804106] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  646.444580] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  647.085325] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[  662.446826] mmc0: card 0001 removed

The first output when just inserting the sdxc and the last one when extracting it.

I think this bug I reported could be consider a duplicate of this other one https://bugzilla.kernel.org/show_bug.cgi?id=119781

The other bug was also reported to realtek but there is no update since time ago.
Comment 11 David Santamaría Rogado 2017-09-30 16:10:13 UTC
It seems that now also gives error when detecting the card, the
[  619.990860] mmc0: tuning execution failed: -22
[  619.990877] mmc0: error -22 whilst initialising SD card

messages didn't showed up in previous reported kernel versions.
Comment 12 David Santamaría Rogado 2017-10-02 20:53:40 UTC
Confirmed that SDXC and SDHX now also shows this message just when inseting:
[ 6782.827984] mmc0: tuning execution failed: -22
[ 6782.827996] mmc0: error -22 whilst initialising SD card

That wasn't there before and now it only can read SD card up to 2 GB.
Comment 13 David Santamaría Rogado 2017-10-02 20:54:04 UTC
SDHC sorry.
Comment 14 Jakub Benda 2018-02-11 17:37:28 UTC
I have the same problem on OpenSUSE Tumbleweed with kernel 4.15.1: my notebook's RTS5139 SD card reader fails to read a 16GB Kingston SDHC card, producing dmesg

 mmc0: tuning execution failed: -22
 mmc0: error -22 whilst initialising SD card

Using the older module as described at https://github.com/asymingt/rts5139 solved the issue immediately.
Comment 15 Joseph Tingiris 2019-03-26 16:51:08 UTC
RTS5129 card reader in Toshiba Z50-C is having this issue (fails to read) 

SanDisk 256GB 170MB/s 'Extreme Pro' card 

with f29 kernels 4.20.15 - 5.0.3

[Tue Mar 26 12:42:33 2019] mmc0: error -110 whilst initialising SD card
[Tue Mar 26 12:42:37 2019] mmc0: error -110 whilst initialising SD card
[Tue Mar 26 12:42:41 2019] mmc0: error -110 whilst initialising SD card

The same card works fine in a generic usb reader (on the same machine)

[Tue Mar 26 12:49:27 2019] usb 1-4: new high-speed USB device number 10 using xhci_hcd
[Tue Mar 26 12:49:27 2019] usb 1-4: New USB device found, idVendor=1908, idProduct=0226, bcdDevice= 1.11
[Tue Mar 26 12:49:27 2019] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[Tue Mar 26 12:49:27 2019] usb-storage 1-4:1.0: USB Mass Storage device detected
[Tue Mar 26 12:49:27 2019] scsi host3: usb-storage 1-4:1.0
[Tue Mar 26 12:49:28 2019] scsi 3:0:0:0: Direct-Access     Generic  Mass-Storage     1.11 PQ: 0 ANSI: 2
[Tue Mar 26 12:49:28 2019] sd 3:0:0:0: Attached scsi generic sg2 type 0
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] 499744768 512-byte logical blocks: (256 GB/238 GiB)
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] Write Protect is off
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] Mode Sense: 03 00 00 00
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] No Caching mode page found
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] Assuming drive cache: write through
[Tue Mar 26 12:49:29 2019]  sdc: sdc1
[Tue Mar 26 12:49:29 2019] sd 3:0:0:0: [sdc] Attached SCSI removable disk
Comment 16 Václav Skála 2019-04-08 09:30:43 UTC
I confirm this bug with kernel 5.0.6 on Archlinux.

When i connect SD card the card did not show in fstab and in dmesg i get:
[  446.450731] usb 1-1.3: reset high-speed USB device number 3 using ehci-pci
[  446.548350] usb 1-1.3: USB disconnect, device number 3
[  446.650715] usb 1-1.3: new high-speed USB device number 5 using ehci-pci
[  446.748235] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=0139, bcdDevice=39.60
[  446.748239] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  446.748241] usb 1-1.3: Product: USB2.0-CRW
[  446.748243] usb 1-1.3: Manufacturer: Generic
[  446.748244] usb 1-1.3: SerialNumber: 20100201396000000
[  448.726709] mmc0: tuning execution failed: -22
[  448.726714] mmc0: error -22 whilst initialising SD card
[  451.294556] mmc0: tuning execution failed: -22
[  451.294576] mmc0: error -22 whilst initialising SD card

My card is Kingston MicroSDHC 32GB UHS-I U1

If i download old rts5139 driver (https://github.com/asymingt/rts5139), then i can work with this card.

uname: Linux arch 5.0.6-arch1-1-ARCH #1 SMP PREEMPT Wed Apr 3 09:35:20 UTC 2019 x86_64 GNU/Linux


If i plug in this card (Kingston Micro SDHC Canvas Select 16GB 80MB/s UHS-I) i can read and write this card but writing make data coruption.
Comment 17 Václav Skála 2019-04-08 11:51:19 UTC
Edit: with current kernel 5.0.6 it is not possible to compile rts5139 driver because
error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘do_settimeofday64’?
because do_gettimeofday was defined in linux/timekeeping32.h which was removed in kernel 5.0. 

Workaround:
Hopefully when you delete call of this function from rts51x.h (line 126) then you only get bunch of errors about non initialized variable but driver compiles and works. I know this is not clean solution but it works for now.
Comment 18 Václav Skála 2019-04-09 08:06:04 UTC
Same bug described in these bugreports
https://bugzilla.kernel.org/show_bug.cgi?id=201447
https://bugzilla.kernel.org/show_bug.cgi?id=202473
Comment 19 Duke Fong 2019-05-07 03:53:02 UTC
I got same problem on my yoga3 11: "mmc0: error -110 whilst initialising SD card", I simply replace the chip RTS5129(RTS5170) to another chip which use Mass Storage Protocol: http://blog.dukelec.com/fix-lenovo-sd-card-reader
Comment 20 Ben Wolsieffer 2019-05-22 22:56:41 UTC
I am running into this bug with a SanDisk Extreme 32GB A1 microSD card on Linux 5.1.3. My specific error is: `mmc0: error -110 whilst initialising SD card`. It seems like there might actually be different bugs here, because people have different errors, but they might also be related.

I enabled mmc debug logging (`echo 'file drivers/mmc/core/* +p' | sudo tee /sys/kernel/debug/dynamic_debug/control`) and discovered that the timeouts begin after the driver switches to low voltage mode. This card has bit 7 (Reserved for Low Voltage Range) of the OCR set, which apparently indicates that the card supports a 1.8V supply voltage. The card is initialized at 3.3V, and the OCR is fetched with ACMD41. The card is then power cycled to switch to 1.8V, after which it does not respond to commands. The beginning of the debug log can be seen below. Note that the CMD5 timeouts in the beginning are harmless.
```
[ 3295.918204] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 3295.918211] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 3295.957694] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 3295.968239] mmc0: starting CMD52 arg 00000c00 flags 00000195
[ 3296.071552] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 3296.071573] mmc0: starting CMD52 arg 80000c08 flags 00000195
[ 3296.178201] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 3296.178220] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 3296.179376] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 3296.179778] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 3296.181105] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 3296.182408] mmc0: starting CMD8 arg 000001aa flags 000002f5
[ 3296.183044] mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 3296.183058] mmc0: starting CMD5 arg 00000000 flags 000002e1
[ 3296.284983] mmc0: req failed (CMD5): -110, retrying...
[ 3296.388237] mmc0: req failed (CMD5): -110, retrying...
[ 3296.491594] mmc0: req failed (CMD5): -110, retrying...
[ 3296.598187] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 3296.598206] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 3296.598802] mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
[ 3296.598825] mmc0: starting CMD41 arg 00000000 flags 000000e1
[ 3296.599429] mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
[ 3296.599453] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 3296.602083] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 1 timing 0
[ 3296.638738] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 3296.651364] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 1 timing 0
[ 3296.652725] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 3296.653102] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 3296.654171] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 3296.655492] mmc0: starting CMD8 arg 000000aa flags 000002f5
[ 3296.758248] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
```

I verified that one of my cards that works does not support low voltage mode. I then made a quick hack that pretended that bit 7 of the OCR was not set, and the previously non-working card initialized correctly. This makes me suspect that the driver is not setting the supply voltage correctly (too low) in low voltage mode. I am trying to figure out a good way to probe this voltage on my machine. This may explain the different errors people are reporting, as some cards may partially function on the incorrect voltage. It would be helpful to know whether other people's cards have bit 7 of the OCR set.
Comment 21 Anton Gubarkov 2019-05-23 05:36:42 UTC
Ben, I'd be glad to provide my info, but my knowledge is not on par. Can you prove a simple command to check if my card has bit 7 of the OCR set?
Comment 22 Ben Wolsieffer 2019-05-23 14:39:44 UTC
The easiest way I know of is to enable debugging for `mmc_core` with: `echo 'file drivers/mmc/core/* +p' | sudo tee /sys/kernel/debug/dynamic_debug/control`. Then you can plug the card in and watch dmesg.

The most important line is:
```
mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
```
which shows the response to ACMD41, containing the OCR. Alternatively you can just post a log of the beginning of the initialization process like I did.
Comment 23 Stéphane 2019-05-29 15:52:46 UTC
Hi,

I've got a similar bug with an RTS525A.

"mmc0: error -110 whilst initialising SD card"

https://bugzilla.kernel.org/show_bug.cgi?id=202473#c2


PC: Dell XPS 9570, 2018

OS: Ubuntu 19.04, Linux 5.0.0-15-generic

SD CARD: SanDisk 128Go SDXC V30, U3, 95 mb/s

(The card works fine with Windows 10)

I also tried with a Samsung 64 Go SD, U1, which work really fine with both OS.

This is my log extract:

[ 4402.943821] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4402.955685] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4402.968446] mmc0: starting CMD52 arg 00000c00 flags 00000195
[ 4403.071711] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4403.071729] mmc0: starting CMD52 arg 80000c08 flags 00000195
[ 4403.175826] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4403.175845] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 4403.177565] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4403.178130] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4403.179905] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4403.181463] mmc0: starting CMD8 arg 000001aa flags 000002f5
[ 4403.182327] mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 4403.182344] mmc0: starting CMD5 arg 00000000 flags 000002e1
[ 4403.283543] mmc0: req failed (CMD5): -110, retrying...
[ 4403.387842] mmc0: req failed (CMD5): -110, retrying...
[ 4403.491844] mmc0: req failed (CMD5): -110, retrying...
[ 4403.595659] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 4403.595679] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4403.596518] mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
[ 4403.596534] mmc0: starting CMD41 arg 00000000 flags 000000e1
[ 4403.597328] mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
[ 4403.597347] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 4403.600073] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 1 timing 0
[ 4403.615747] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4403.627719] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4403.639721] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 1 timing 0
[ 4403.641077] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4403.641506] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4403.642842] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4403.644158] mmc0: starting CMD8 arg 000000aa flags 000002f5
[ 4403.747838] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 4403.747856] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4403.748682] mmc0: req done (CMD55): 0: 00c00120 00000000 00000000 00000000
[ 4403.748700] mmc0: starting CMD41 arg 11000080 flags 000000e1
[ 4403.851751] mmc0: req done (CMD41): -110: 00000000 00000000 00000000 00000000
[ 4403.851770] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4403.955752] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4403.955771] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4404.059857] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4404.059875] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4404.163867] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4404.163885] mmc0: error -110 whilst initialising SD card
[ 4404.163893] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4404.164132] mmc0: starting CMD1 arg 00000000 flags 000000e1
[ 4404.267869] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 4404.267888] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 4404.269670] mmc0: mmc_rescan_try_freq: trying to init card at 300000 Hz
[ 4404.269677] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 4404.283848] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4404.295751] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4404.307750] mmc0: starting CMD52 arg 00000c00 flags 00000195
[ 4404.411875] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4404.411893] mmc0: starting CMD52 arg 80000c08 flags 00000195
[ 4404.515737] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4404.515745] mmc0: clock 300000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 4404.517111] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4404.517485] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4404.518771] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4404.520135] mmc0: starting CMD8 arg 000001aa flags 000002f5
[ 4404.520767] mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 4404.520770] mmc0: starting CMD5 arg 00000000 flags 000002e1
[ 4404.623791] mmc0: req failed (CMD5): -110, retrying...
[ 4404.727897] mmc0: req failed (CMD5): -110, retrying...
[ 4404.831844] mmc0: req failed (CMD5): -110, retrying...
[ 4404.935951] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 4404.935970] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4404.936778] mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
[ 4404.936794] mmc0: starting CMD41 arg 00000000 flags 000000e1
[ 4404.937609] mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
[ 4404.937627] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 4404.940376] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 1 timing 0
[ 4404.956039] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4404.967778] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4404.979779] mmc0: clock 300000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 1 timing 0
[ 4404.981158] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4404.981719] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4404.983070] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4404.984462] mmc0: starting CMD8 arg 000000aa flags 000002f5
[ 4405.087904] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 4405.087923] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4405.088748] mmc0: req done (CMD55): 0: 00c00120 00000000 00000000 00000000
[ 4405.088767] mmc0: starting CMD41 arg 11000080 flags 000000e1
[ 4405.192753] mmc0: req done (CMD41): -110: 00000000 00000000 00000000 00000000
[ 4405.192771] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4405.295589] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4405.295607] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4405.399915] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4405.399934] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4405.503928] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4405.503945] mmc0: error -110 whilst initialising SD card
[ 4405.503953] mmc0: clock 300000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4405.504167] mmc0: starting CMD1 arg 00000000 flags 000000e1
[ 4405.607930] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 4405.607948] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 4405.609685] mmc0: mmc_rescan_try_freq: trying to init card at 250000 Hz
[ 4405.609692] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 4405.623906] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4405.635806] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4405.647811] mmc0: starting CMD52 arg 00000c00 flags 00000195
[ 4405.751930] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4405.751949] mmc0: starting CMD52 arg 80000c08 flags 00000195
[ 4405.855942] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[ 4405.855961] mmc0: clock 250000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[ 4405.857662] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4405.858203] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4405.859770] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[ 4405.861269] mmc0: starting CMD8 arg 000001aa flags 000002f5
[ 4405.862098] mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 4405.862116] mmc0: starting CMD5 arg 00000000 flags 000002e1
[ 4405.963950] mmc0: req failed (CMD5): -110, retrying...
[ 4406.067859] mmc0: req failed (CMD5): -110, retrying...
[ 4406.171905] mmc0: req failed (CMD5): -110, retrying...
[ 4406.275956] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 4406.275976] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.276790] mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
[ 4406.276806] mmc0: starting CMD41 arg 00000000 flags 000000e1
[ 4406.277620] mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
[ 4406.277638] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[ 4406.280433] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 1 timing 0
[ 4406.295730] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[ 4406.307743] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4406.320453] mmc0: clock 250000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 1 timing 0
[ 4406.321825] mmc0: starting CMD0 arg 00000000 flags 000000c0
[ 4406.322363] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 4406.323724] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4406.325121] mmc0: starting CMD8 arg 000000aa flags 000002f5
[ 4406.427864] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 4406.427884] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.428550] mmc0: req done (CMD55): 0: 00c00120 00000000 00000000 00000000
[ 4406.428564] mmc0: starting CMD41 arg 11000080 flags 000000e1
[ 4406.531970] mmc0: req done (CMD41): -110: 00000000 00000000 00000000 00000000
[ 4406.531988] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.635872] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4406.635890] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.739865] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4406.739883] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.843983] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 4406.844001] mmc0: error -110 whilst initialising SD card
[ 4406.844010] mmc0: clock 250000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 4406.844224] mmc0: starting CMD1 arg 00000000 flags 000000e1
[ 4406.947988] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 4406.948006] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0


I hope it can help.


I have few different 'req done' messages:

[ 4406.739883] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.843983] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000

[ 4403.181463] mmc0: starting CMD8 arg 000001aa flags 000002f5
[ 4403.182327] mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000

[ 4406.275976] mmc0: starting CMD55 arg 00000000 flags 000000f5
[ 4406.276790] mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000

[ 4406.276806] mmc0: starting CMD41 arg 00000000 flags 000000e1
[ 4406.277620] mmc0: req done (CMD41): 0: 00ff8080 00000000 00000000 00000000
Comment 24 Elias 2019-06-02 14:32:20 UTC
if I boot from a USB drive containing a live image with 5.0.5-arch1-1-ARCH kernel.

Relevant lines from lspci output:
00:1c.0 SD Host controller: Intel Corporation Celeron/Pentium Silver Processor SDA Standard Compliant SD Host Controller (rev 03)
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)

dmesg (no CMD41 in my case):

[101832.208933] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[101832.208942] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[101832.209448] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[101832.222234] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101832.234869] mmc0: starting CMD52 arg 00000c00 flags 00000195
[101832.335729] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101832.335757] mmc0: starting CMD52 arg 80000c08 flags 00000195
[101832.442368] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101832.442396] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[101832.443937] mmc0: starting CMD0 arg 00000000 flags 000000c0
[101832.444523] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[101832.446706] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101832.448256] mmc0: starting CMD8 arg 000001aa flags 000002f5
[101832.549200] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[101832.549229] mmc0: starting CMD5 arg 00000000 flags 000002e1
[101832.652878] mmc0: req failed (CMD5): -110, retrying...
[101832.755787] mmc0: req failed (CMD5): -110, retrying...
[101832.858937] mmc0: req failed (CMD5): -110, retrying...
[101832.962524] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[101832.962554] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101833.065859] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101833.065888] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101833.172275] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101833.172301] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101833.275856] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101833.275883] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101833.379194] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101833.379224] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101833.379284] mmc0: starting CMD1 arg 00000000 flags 000000e1
[101833.482534] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[101833.482564] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[101833.483930] mmc0: mmc_rescan_try_freq: trying to init card at 300000 Hz
[101833.483940] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[101833.484484] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[101833.503161] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101833.515569] mmc0: starting CMD52 arg 00000c00 flags 00000195
[101833.618989] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101833.619010] mmc0: starting CMD52 arg 80000c08 flags 00000195
[101833.722553] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101833.722603] mmc0: clock 300000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[101833.724144] mmc0: starting CMD0 arg 00000000 flags 000000c0
[101833.724717] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[101833.726016] mmc0: clock 300000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101833.727551] mmc0: starting CMD8 arg 000001aa flags 000002f5
[101833.829005] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[101833.829029] mmc0: starting CMD5 arg 00000000 flags 000002e1
[101833.932543] mmc0: req failed (CMD5): -110, retrying...
[101834.035592] mmc0: req failed (CMD5): -110, retrying...
[101834.138992] mmc0: req failed (CMD5): -110, retrying...
[101834.242256] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[101834.242283] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101834.345862] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101834.345892] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101834.448936] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101834.448961] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101834.552570] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101834.552598] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101834.655850] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101834.655873] mmc0: clock 300000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101834.655939] mmc0: starting CMD1 arg 00000000 flags 000000e1
[101834.759201] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[101834.759232] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
[101834.760708] mmc0: mmc_rescan_try_freq: trying to init card at 250000 Hz
[101834.760719] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[101834.761249] rtsx_pci_sdmmc rtsx_pci_sdmmc.0: Initial signal voltage of 3.3v
[101834.772431] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101834.785012] mmc0: starting CMD52 arg 00000c00 flags 00000195
[101834.885856] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101834.885885] mmc0: starting CMD52 arg 80000c08 flags 00000195
[101834.988903] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[101834.988930] mmc0: clock 250000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
[101834.990461] mmc0: starting CMD0 arg 00000000 flags 000000c0
[101834.991078] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[101834.993442] mmc0: clock 250000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101834.994990] mmc0: starting CMD8 arg 000001aa flags 000002f5
[101835.095873] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[101835.095901] mmc0: starting CMD5 arg 00000000 flags 000002e1
[101835.199183] mmc0: req failed (CMD5): -110, retrying...
[101835.302375] mmc0: req failed (CMD5): -110, retrying...
[101835.409191] mmc0: req failed (CMD5): -110, retrying...
[101835.515692] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[101835.515719] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101835.619061] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101835.619078] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101835.722356] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101835.722385] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101835.828896] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101835.828910] mmc0: starting CMD55 arg 00000000 flags 000000f5
[101835.932508] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[101835.932537] mmc0: clock 250000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 1 timing 0
[101835.932624] mmc0: starting CMD1 arg 00000000 flags 000000e1
[101836.035558] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[101836.035574] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0
Comment 25 Elias 2019-06-02 14:35:24 UTC
The first paragraph should be:

I have a similar problem with Realtek RTS5229 on an Intel NUC NUC7PJY computer with 5.1.5-arch1-2-ARCH kernel. The problem does not occur
if I boot from a USB drive containing a live image with 5.0.5-arch1-1-ARCH kernel.

(In reply to Elias from comment #24)
> if I boot from a USB drive containing a live image with 5.0.5-arch1-1-ARCH
> kernel.
>  ...
Comment 26 Elias 2019-06-02 15:06:03 UTC
Just wanted to add that the dmesg log was generated when a Samsug EVO+ 128 GB was inserted, but an older Samsung 32GB SDHC card and an ancient Panasonic 4 GB cards also don't work. All of these cards mount and work if I boot 5.0.5 kernel.

Sorry for the spam ... no comment editing in Bugzilla, it seems :(

(In reply to Elias from comment #25)
> The first paragraph should be:
> 
> I have a similar problem with Realtek RTS5229 on an Intel NUC NUC7PJY
> computer with 5.1.5-arch1-2-ARCH kernel. The problem does not occur
> if I boot from a USB drive containing a live image with 5.0.5-arch1-1-ARCH
> kernel.
> 
> (In reply to Elias from comment #24)
> > if I boot from a USB drive containing a live image with 5.0.5-arch1-1-ARCH
> > kernel.
> >  ...
Comment 27 Antoine 2019-08-04 07:35:41 UTC
I was able to reproduce the issue on my asus rog gl552 with this sd card.

https://www.amazon.fr/gp/product/B07H9DVLBB/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1


03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
	Subsystem: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader
	Flags: bus master, fast devsel, latency 0, IRQ 127
	Memory at df115000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at df100000 [disabled] [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: rtsx_pci
	Kernel modules: rtsx_pci
Comment 28 Bo Sun 2019-11-22 10:30:59 UTC
hi,
i've got the similar error but different error message (CMD41) with marvell driver:
...
[    0.638157] mmc0: starting CMD41 arg 40300000 flags 000000e1
[    0.638172] mvsdio mvsdio: cmd 41 (hw state 0x20f8)
[    0.638457] mvsdio mvsdio: intr 0x0813 intr_en 0x4001 hw_state 0x20f8
[    0.638475] mmc0: req done (CMD41): 0: 00ff8000 0000003f 00000000 00000000
...

to compare with a good case:
...
[    0.638181] mmc0: starting CMD41 arg 40300000 flags 000000e1
[    0.638196] mvsdio mvsdio: cmd 41 (hw state 0x20f8)
[    0.638484] mvsdio mvsdio: intr 0x0813 intr_en 0x4001 hw_state 0x20f8
[    0.638502] mmc0: req done (CMD41): 0: c0ff8000 0000003f 00000000 00000000
...
do you know what is the difference between the reponses on CMD41 with value 00ff8000 and c0ff8000?

Note You need to log in before you can comment on or make changes to this bug.