rtsx_usb module for Realtek Semiconductor Corp. RTS5129 Card Reader Controller: mmc errors and read data corruption

Bug #1579748 reported by svasiljev
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

RTS5129 Card Reader has issues with rtsx_usb module on kernels >=3.16 (since kmod-staging rts5129 module replaced with rtsx).

Copying files from FAT32 SDHC memory card produces error messages in syslog:
May 9 05:39:15 dev-laptop kernel: [ 134.762713] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
May 9 05:39:15 dev-laptop kernel: [ 135.427035] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
May 9 05:39:16 dev-laptop kernel: [ 136.030041] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900

Also these errors indicate that copied files are corrupted - md5sum shows different checksums for copied file after each "insert card/copy file/check md5sum/eject card" cycle (actually you can skip "copy file" step and run "check md5sum" step directly with file on mounted memory card filesystem).

Running sudo badblocks -n /dev/mmcblk0 produces same error messages and prints a lot of random block numbers.

Hardware:
 - dell inspiron 7720 laptop (a few different RAM modules and HDD drives used for testing);
 - Realtek Semiconductor Corp. RTS5129 Card Reader (ID 0bda:0129);
 - Transcend 32Gb SDHC Memory card Class 10 UHS-I.

Bug exists in latest xenial 4.4.0-22.39 kernel and xenial mainline 4.4.9-040409_4.4.9-040409.201605041832.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-22-generic 4.4.0-22.39
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: dev 1692 F.... pulseaudio
CurrentDesktop: Unity
Date: Mon May 9 08:38:14 2016
HibernationDevice: RESUME=UUID=cf073128-d53a-4214-96bc-3acdf0516900
InstallationDate: Installed on 2016-05-08 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
MachineType: Dell Inc. Inspiron 7720
ProcFB:
 0 inteldrmfb
 1 nouveaufb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic root=UUID=2e4e4944-669a-4f1b-a080-87971c644984 ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-22-generic N/A
 linux-backports-modules-4.4.0-22-generic N/A
 linux-firmware 1.157
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: yes
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/23/2013
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A16
dmi.board.name: 04M3YM
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA16:bd08/23/2013:svnDellInc.:pnInspiron7720:pvr:rvnDellInc.:rn04M3YM:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Inspiron 7720
dmi.sys.vendor: Dell Inc.

Revision history for this message
svasiljev (svasiljev) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.6 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-rc7-wily/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
svasiljev (svasiljev) wrote :

Thanks, Joseph. Bug exists on mainline 4.6.0-040600rc7.201605081830.

In first test it completely failed to mount card, spaming with errors:
May 9 16:05:53 dev-laptop kernel: [ 103.547966] mmc0: error -110 whilst initialising SD card
May 9 16:05:57 dev-laptop kernel: [ 107.655738] mmc0: error -110 whilst initialising SD card
May 9 16:06:01 dev-laptop kernel: [ 111.763336] mmc0: error -110 whilst initialising SD card

Eject/re-insert was required to mount card and perform second test: copy/md5sum test fails with "mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900" errors and corrupted data.

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Denys Vitali (denys-u) wrote :
Download full text (8.8 KiB)

Same problem here, I'm currently using 4.5.0-rc4-mainline with the Realtek Semiconductor Corp. RTS5129 Card Reader Controller on Arch Linux.
The problem appears just on Linux, and I have fixed it a while ago, until I format my pc and installed Arch. Unfortunately I don't have the solution anymore (see http://unix.stackexchange.com/questions/257033/rts5129-card-reader-with-ubuntu-15-10) since the user who has commented actually deleted his account.

This happens when I put on a class 10 micro sd card with an sdcard adapter in my Acer Aspire V17 Nitro

[ 132.789797] sd 4:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 132.789807] sd 4:0:0:0: [sdc] tag#0 Sense Key : 0x3 [current]
[ 132.789813] sd 4:0:0:0: [sdc] tag#0 ASC=0x11 ASCQ=0x0
[ 132.789818] sd 4:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 20 00
[ 132.789823] blk_update_request: critical medium error, dev sdc, sector 0
[ 132.790660] sd 4:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 132.790666] sd 4:0:0:0: [sdc] tag#0 Sense Key : 0x3 [current]
[ 132.790670] sd 4:0:0:0: [sdc] tag#0 ASC=0x11 ASCQ=0x0
[ 132.790675] sd 4:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[ 132.790679] blk_update_request: critical medium error, dev sdc, sector 0
[ 132.790684] Buffer I/O error on dev sdc, logical block 0, async page read
[ 132.791535] sd 4:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 132.791546] sd 4:0:0:0: [sdc] tag#0 Sense Key : 0x3 [current]
[ 132.791553] sd 4:0:0:0: [sdc] tag#0 ASC=0x11 ASCQ=0x0
[ 132.791561] sd 4:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[ 132.791567] blk_update_request: critical medium error, dev sdc, sector 0
[ 132.791574] Buffer I/O error on dev sdc, logical block 0, async page read

lsmod:
Module Size Used by
fuse 94208 3
ctr 16384 2
ccm 20480 2
cmac 16384 2
ecb 16384 1
rfcomm 61440 14
ipt_MASQUERADE 16384 1
nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE
iptable_nat 16384 1
nf_conntrack_ipv4 16384 2
nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
nf_nat_ipv4 16384 1 iptable_nat
xt_addrtype 16384 2
iptable_filter 16384 1
xt_conntrack 16384 1
nf_nat 20480 2 nf_nat_ipv4,nf_nat_masquerade_ipv4
nf_conntrack 90112 5 nf_nat,nf_nat_ipv4,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_ipv4
br_netfilter 24576 0
bridge 118784 1 br_netfilter
stp 16384 1 bridge
llc 16384 2 stp,bridge
dm_thin_pool 61440 1
dm_persistent_data 57344 1 dm_thin_pool
dm_bio_prison 16384 1 dm_thin_pool
dm_bufio 24576 1 dm_persistent_data
libcrc32c 16384 1 dm_persistent_data
crc32c_generic 16384 0
loop 28672 4
arc4 16384 2
snd_hda_codec_hdmi 53248 1
snd_hda_codec_realtek 69632 1
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek
bne...

Read more...

Revision history for this message
penalvch (penalvch) wrote :

svasiljev, to clarify your Bug Description, you noted badblocks showed errors (indicating bad sectors). Hence, to confirm this isn't a hardware issue, could you please boot into a pre-3.16 kernel, then run badblocks again, and advise to the results?

My expectation if your Bug Description comments are correct, is that badblocks would have no errors.

tags: added: bios-outdated-a17 kernel-bug-exists-upstream-4.6-rc7
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
svasiljev (svasiljev) wrote :

Christopher, done. badblocks test completes without errors on Ubuntu 12.04 (3.5.0-48).

My short test example:
badblocks -wsv -e 1 -t 255 /dev/mmcblk0 10000 4000

* read-only tests doesn't detect any issues;
* write-test pattern 0xff (-t 255) is much more efficient then first two default patterns (0xaa and 0x55);
* small random block range used (4000-10000) for quick tests.

Also, this card has been successfully tested on:
- RTS5139 Card Reader Controller (0bda:0139) (rtsx_usb on Lubuntu 16.04);
- ENE Technology Inc pci SD/MMC card reader controller (rtsx_usb on Xubuntu 16.04);
- Nikon camera PTP USB device (gphoto2 on Ubuntu 16.04).

penalvch (penalvch)
tags: added: regression-release
Revision history for this message
penalvch (penalvch) wrote :

svasiljev, to keep this relevant to upstream, could you please test the latest mainline kernel (4.7-rc4) and advise to the results?

Revision history for this message
svasiljev (svasiljev) wrote :

Christopher, done. Issue exists on the latest 4.7.0-040700rc5-generic #201606262232 SMP Mon Jun 27 02:34:07 UTC 2016 x86_64

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

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

svasiljev, could you please post the results of the following terminal command:
usb-devices

tags: added: kernel-bug-exists-upstream-4.7-rc5 needs-bisect
removed: kernel-bug-exists-upstream-4.6-rc7
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
svasiljev (svasiljev) wrote :

Christopher, sure.?field.comment=Christopher, sure.

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

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
svasiljev (svasiljev) wrote :

Ok, dmidecode output after BIOS update:
A17
05/19/2015

Read test produces same errors after BIOS update. Some new error patterns:
mmcblk0: error -110 sending status command, retrying
mmcblk0: error -32 sending stop command, original cmd response 0x900, card status 0xb00
FAT-fs (mmcblk0p1): error, fat_get_cluster: invalid cluster chain (i_pos 262148)

tags: removed: bios-outdated-a17
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

svasiljev, was your most recent test on the latest mainline kernel (4.7-rc7)?

tags: added: latest-bios-a17
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
svasiljev (svasiljev) wrote :

Ah, retested on latest 4.7.0-040700rc7-generic #201607110032 - same issues. Another new error pattern:
FAT-fs (mmcblk0p1): error, invalid access to FAT (entry 0x0b730a96)
FAT-fs (mmcblk0p1): Filesystem has been set read-only
attempt to access beyond end of device
mmcblk0p1: rw=0, want=12293694784, limit=61855744

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: kernel-bug-exists-upstream-4.7-rc7
removed: kernel-bug-exists-upstream-4.7-rc5
Revision history for this message
penalvch (penalvch) wrote :

svasiljev, the issue you are reporting is an upstream one. Could you please report this problem following the instructions verbatim at https://wiki.ubuntu.com/Bugs/Upstream/kernel to the appropriate mailing list (TO Roger Tseng and Ulf Hansson CC linux-mmc)?

Please provide a direct URL to your post to the mailing list when it becomes available so that it may be tracked.

Thank you for your help.

tags: removed: needs-bisect
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Akos Mate (mateakos1) wrote :

Same errors, on 4.8.1-gentoo.

Changed in linux (Ubuntu):
status: Triaged → Confirmed
penalvch (penalvch)
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jan Drogi (ja5kier) wrote :

It seems that solution described here fix the issue:
https://github.com/asymingt/rts5139

Revision history for this message
Akos Mate (mateakos1) wrote :

Still there in 4.9.16.
Did anybody forward this bug report to the appropriate people?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Akos,

Can you attach dmesg?

Revision history for this message
Akos Mate (mateakos1) wrote :

Yes, I can.
It's now with 4.9.34 kernel, but it's the same problem.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Akos, since you use Gentoo instead of Ubuntu, please try this kernel tree:

https://code.launchpad.net/~kaihengfeng/+git/rts5139

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I'll build deb package if other Ubuntu users want to test it.

Revision history for this message
Akos Mate (mateakos1) wrote :

No luck so far, the drive does not show up at all.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Actually it uses rts5139. We just need to solve the dma issue.

Changed in linux (Ubuntu):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
status: Triaged → In Progress
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I managed to find a machine with RTS5129, which does not have this issue.

Originally I think it's a good idea to bring rts5139 module back, but I can't reproduce the issue on the RTS5129 I have.

Can you try 4.13-rc4? There are several fixes landed in mmc/core.

Changed in linux (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Akos Mate (mateakos1) wrote :

It does not have this problem, with all the cards. For me it has this problem with a Transcend 32GB UHS-I microSD card. It might be a timing or ordering problem, which only appears if the card responds quickly. The same card reads at 20 MB/s without corruption, on the same machine, if I boot to windows.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Ok, first we need to make sure the various changes in mmc/core fixed the issue or not.

If the issue still happen, add "mmc_core.dyndbg=+p rtsx_usb_sdmmc.dyndbg=+p" to your kernel parameter and attach dmesg.

Revision history for this message
svasiljev (svasiljev) wrote :

Thanks for your help and feedback, guys.
Can't reproduce this issue on a newer hardware - Acer Aspire v15 Nitro, 2016 (with the same RTS5129, live-usb and Transcend 32Gb SDHC card).

Revision history for this message
svasiljev (svasiljev) wrote :

Check these Marcus Overhagen reports from 2015:
https://lkml.org/lkml/2015/9/28/593
https://lkml.org/lkml/2015/10/20/590

Here is Marcus response:
"Ulf Hansson suggested to experiment with changing MMC_CAPS, but I ran
into trouble when trying to install custom kernel image because my
/boot partition was too small.

I didn't get any futher response from other developers. Apart from
Ulf, nobody seemed to be bothered by the corruption."

Revision history for this message
Oleg (krivorot-oleg) wrote :

Lenovo g580
The bug is present on the last hwe kernel 4.10.0-30-generic
I'll try to test the solution https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1579748/comments/24

Revision history for this message
Oleg (krivorot-oleg) wrote :
Download full text (5.5 KiB)

compile https://github.com/asymingt/rts5139

Linux oleg-Lenovo-G580 4.10.0-30-generic #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[10366.363560] sd 6:0:0:0: [sdb] 7954432 512-byte logical blocks: (4.07 GB/3.79 GiB)
[10376.625609] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[10376.625618] sd 6:0:0:0: [sdb] tag#0 Sense Key : Medium Error [current]
[10376.625623] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Unrecovered read error
[10376.625630] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[10376.625634] blk_update_request: critical medium error, dev sdb, sector 0
[10376.625646] Buffer I/O error on dev sdb, logical block 0, async page read
[10386.866325] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[10386.866333] sd 6:0:0:0: [sdb] tag#0 Sense Key : Medium Error [current]
[10386.866338] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Unrecovered read error
[10386.866345] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[10386.866350] blk_update_request: critical medium error, dev sdb, sector 0
[10386.866360] Buffer I/O error on dev sdb, logical block 0, async page read
[10397.107027] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[10397.107031] sd 6:0:0:0: [sdb] tag#0 Sense Key : Medium Error [current]
[10397.107033] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Unrecovered read error
[10397.107036] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[10397.107038] blk_update_request: critical medium error, dev sdb, sector 0
[10397.107043] Buffer I/O error on dev sdb, logical block 0, async page read
[10397.107056] ldm_validate_partition_table(): Disk read failed.

# lsmod
Module Size Used by
hid_generic 16384 0
usbhid 53248 0
hid 118784 2 hid_generic,usbhid
rfcomm 77824 12
pci_stub 16384 1
vboxpci 24576 0
vboxnetadp 28672 0
vboxnetflt 28672 0
vboxdrv 458752 3 vboxnetadp,vboxnetflt,vboxpci
zram 24576 4
bnep 20480 2
rts5139 315392 0
uvcvideo 90112 0
videobuf2_vmalloc 16384 1 uvcvideo
videobuf2_memops 16384 1 videobuf2_vmalloc
videobuf2_v4l2 24576 1 uvcvideo
videobuf2_core 40960 2 uvcvideo,videobuf2_v4l2
videodev 172032 3 uvcvideo,videobuf2_core,videobuf2_v4l2
media 40960 2 uvcvideo,videodev
btusb 45056 0
btrtl 16384 1 btusb
btbcm 16384 1 btusb
btintel 16384 1 btusb
bluetooth 557056 39 btrtl,btintel,bnep,btbcm,rfcomm,btusb
wl 6447104 0
intel_rapl 20480 0
x86_pkg_temp_thermal 16384 0
intel_powerclamp 16384 0
kvm_intel 200704 0
kvm 593920 1 kvm_intel
irqbypass 16384 1 kvm
crct10dif_pclmul 16384 0
crc32_pclmul 16384 0
ghash_clmulni_intel 16384 0
cryptd 24576 1 ghash_clmulni_intel
intel_cstate ...

Read more...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you guys try the suggestions in comment #32?

Revision history for this message
Oleg (krivorot-oleg) wrote :

returm to kernel driver and change in drivers/mmc/host/rtsx_usb_sdmmc.c
As advised in https://lkml.org/lkml/2015/10/21/318 comment caps:

static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
{
        struct mmc_host *mmc = host->mmc;

        mmc->f_min = 250000;
        mmc->f_max = 208000000;
        mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
        mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
        // MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
        // MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
                MMC_CAP_NEEDS_POLL;
        mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;

        mmc->max_current_330 = 400;
        mmc->max_current_180 = 800;
        mmc->ops = &rtsx_usb_sdmmc_ops;
        mmc->max_segs = 256;
        mmc->max_seg_size = 65536;
        mmc->max_blk_size = 512;
        mmc->max_blk_count = 65535;
        mmc->max_req_size = 524288;

        host->power_mode = MMC_POWER_OFF;
}

reload new module and block rts5139

# lsmod | grep rts
rtsx_usb_sdmmc 28672 0
rtsx_usb_ms 20480 0
memstick 16384 1 rtsx_usb_ms
rtsx_usb 20480 2 rtsx_usb_sdmmc,rtsx_usb_ms

It does not work anyway, as before the changes:
[10270.437734] mmc0: error -110 whilst initialising SD card
[10273.125682] mmc0: error -110 whilst initialising SD card
[10276.837684] mmc0: error -110 whilst initialising SD card
[10279.493425] mmc0: error -110 whilst initialising SD card
[10304.740718] mmc0: error -110 whilst initialising SD card
[10307.428683] mmc0: error -110 whilst initialising SD card

If you have any ideas I can check them on my kernel

Linux oleg-Lenovo-G580 4.10.0-30-generic #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please try kernel in http://people.canonical.com/~khfeng/lp1579748/

svasiljev, can you also try it? Hopefully it didn't bring any regression to the "new" RTS5129.

Revision history for this message
Oleg (krivorot-oleg) wrote :
Download full text (8.5 KiB)

install this kernel:
oleg@oleg-Lenovo-G580:~/Завантаження/1$ sudo dpkg -i *.deb
[sudo] пароль до oleg:
(Читання бази даних ... на дану мить встановлено 315002 файли та каталоги.)
Приготування до розпакування linux-headers-4.13.0-5_4.13.0-5.6_all.deb ...
Розпакування linux-headers-4.13.0-5 (4.13.0-5.6) над (4.13.0-5.6)...
Приготування до розпакування linux-headers-4.13.0-5-generic_4.13.0-5.6_amd64.deb ...
Розпакування linux-headers-4.13.0-5-generic (4.13.0-5.6) над (4.13.0-5.6)...
Приготування до розпакування linux-image-4.13.0-5-generic_4.13.0-5.6_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.13.0-5-generic /boot/vmlinuz-4.13.0-5-generic
Done.
Розпакування linux-image-4.13.0-5-generic (4.13.0-5.6) над (4.13.0-5.6)...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-5-generic /boot/vmlinuz-4.13.0-5-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-5-generic /boot/vmlinuz-4.13.0-5-generic
Приготування до розпакування linux-image-extra-4.13.0-5-generic_4.13.0-5.6_amd64.deb ...
Розпакування linux-image-extra-4.13.0-5-generic (4.13.0-5.6) над (4.13.0-5.6)...
Налаштовування linux-headers-4.13.0-5 (4.13.0-5.6) ...
Налаштовування linux-headers-4.13.0-5-generic (4.13.0-5.6) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.13.0-5-generic /boot/vmlinuz-4.13.0-5-generic
ERROR (dkms apport): kernel package linux-headers-4.13.0-5-generic is not supported
Error! Bad return status for module build on kernel: 4.13.0-5-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
ERROR (dkms apport): kernel package linux-headers-4.13.0-5-generic is not supported
Error! Bad return status for module build on kernel: 4.13.0-5-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.40/build/make.log for more information.
Налаштовування linux-image-4.13.0-5-generic (4.13.0-5.6) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(4.13.0-5.6 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(4.13.0-5.6 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-5-generic /boot/vmlinuz-4.13.0-5-generic ...

Read more...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

That's unfortunate.

I found that sd_change_phase() and sd_set_timing() in rtsx_usb_sdmmc.c do not have rtsx_usb_get_rsp(), which can be found in rts5139 as rts51x_get_rsp().

That's all I got.

Here's the diff I use:

diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 12d2fbe9c520..30cb98272158 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -616,7 +616,7 @@ static int sd_change_phase(struct rtsx_usb_sdmmc *host, u8 sample_point, int tx)
        if (err)
                return err;

- return 0;
+ return rtsx_usb_get_rsp(ucr, 1, 500);
 }

 static inline u32 get_phase_point(u32 phase_map, unsigned int idx)
@@ -1126,8 +1126,10 @@ static int sd_set_timing(struct rtsx_usb_sdmmc *host,
        }

        err = rtsx_usb_send_cmd(ucr, MODE_C, 100);
+ if (err)
+ return err;

- return err;
+ return rtsx_usb_get_rsp(ucr, 6, 1000);
 }

 static void sdmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Did anyone already file a report at bugzilla.kernel.org, or escalate this issue on mailing list?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
assignee: Kai-Heng Feng (kaihengfeng) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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