Bug 42640

Summary: Realtek RTS5116 card reader produces errors during boot
Product: Drivers Reporter: Disabled Account (disabled_20190211)
Component: MMC/SDAssignee: drivers_mmc-sd
Status: NEW ---    
Severity: normal CC: c3904a4a, chris, eric.donkersloot, gmiramir, szg00000
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.2.1 Subsystem:
Regression: No Bisected commit-id:

Description Disabled Account 2012-01-23 16:25:01 UTC
Errors are produced by kernel module: rts_pstor

"Bad LUN" and "Bad target number" errors appear during boot.
The card reader seems to work fine though, at least it reads my SDHC cards. After googling around a bit, I found that there's numerous people reporting this, but I couldn't find a bug in kernel bugzilla. 

[    8.565773] scsi 6:0:0:0: Direct-Access     Generic- xD/SD/M.S.       1.00 PQ: 0 ANSI: 0 CCS
[    8.566082] Bad LUN (0:1)
[    8.566086] sd 6:0:0:0: [sdb] 7741440 512-byte logical blocks: (3.96 GB/3.69 GiB)
[    8.566435] sd 6:0:0:0: [sdb] Write Protect is off
[    8.566440] sd 6:0:0:0: [sdb] Mode Sense: 67 10 00 00
[    8.566498] sd 6:0:0:0: [sdb] Cache data unavailable
[    8.566502] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[    8.566505] Bad target number (1:0)
[    8.566616] Bad target number (2:0)
[    8.566712] Bad target number (3:0)
[    8.566808] Bad target number (4:0)
[    8.566904] Bad target number (5:0)
[    8.566972] Bad target number (6:0)
[    8.567042] Bad target number (7:0)
[    8.567071] rts_pstor: device scan complete
[    8.570213] sd 6:0:0:0: [sdb] Cache data unavailable
[    8.570215] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[    8.571724]  sdb: sdb1
[    8.571949] sd 6:0:0:0: [sdb] Cache data unavailable
[    8.571952] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[    8.572651] sd 6:0:0:0: [sdb] Attached SCSI removable disk

lspci relevant output:
13:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5116 PCI Express Card Reader (rev 01)
        Subsystem: Hewlett-Packard Company Device 3388
        Flags: bus master, fast devsel, latency 0, IRQ 18
        Memory at c3501000 (32-bit, non-prefetchable) [size=4K]
        Expansion ROM at c2400000 [disabled] [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: rts_pstor
        Kernel modules: rts_pstor

Linux dv6 3.2.1-1-ARCH #1 SMP PREEMPT Fri Jan 13 06:50:31 CET 2012 x86_64 Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz GenuineIntel GNU/Linux
Comment 1 Disabled Account 2012-02-11 22:27:29 UTC
So is anyone going to look into this?

I think there's lots of people just putting up with these errors, but it looks like ** fill out any nasty word here **
Comment 2 Chris Ball 2012-02-12 17:58:33 UTC
This isn't an SD/MMC driver, it's a SCSI driver: rts_pstor, in staging.

Because it's a staging driver, it's not supported and it's not very surprising that you're seeing bugs in it.

It looks like the primary author is "wwang <wei_wang@realsil.com.cn>" -- you could try getting in touch.
Comment 3 MM 2012-08-30 00:03:57 UTC
I also have this "Bad target number" and my card reader doesn't work, so I've submitted an emaill to this wwang and I hope we can get this fixed in 3.2x kernels...

After reading this from Patrick Volkerding of Slackware, I figured if it's good enough for Pat, that's good enough for me and reason enough I want to stay with 3.2x also, but I really want to see/need to see this fixed!

Quote from Patrick Volkerding;

After hearing that the 3.4.x kernel series will have long-term support, I tested 3.4.9 hoping that it would prove stable enough to use that as the release kernel, but there are problems with an oops in clocksource.c every few boots. Given that the 3.2.x series has been very stable, it seems prudent to stick with that for release, and 3.2.28 is going to be the release kernel.
Comment 4 Alan 2012-08-30 09:11:28 UTC
*** Bug 46681 has been marked as a duplicate of this bug. ***
Comment 5 Szőgyényi Gábor 2017-03-06 20:00:32 UTC
Please try this bug with latest kernel image.