You are not logged in.

#1 2024-07-19 08:51:23

doevis
Member
Registered: 2024-07-19
Posts: 4

USB SD Card adapter not working

I have been using a USB SD card adaptor to read write and format SD cards for my embedded projects. After a recent kernel update, difficult to pinpoint which one the USB adaptor stopped working.
The USB device is correctly detected as a mass storage device but the resulting block device is shown as having 0 space. Any advice as to where to poke would be greatly appreciated

dmesg
[ 3921.754153] usb 1-11: new high-speed USB device number 19 using xhci_hcd
[ 3921.895758] usb 1-11: New USB device found, idVendor=14cd, idProduct=1212, bcdDevice= 1.00
[ 3921.895770] usb 1-11: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[ 3921.895774] usb 1-11: Product: Mass Storage Device
[ 3921.895777] usb 1-11: Manufacturer: Generic
[ 3921.895780] usb 1-11: SerialNumber: 121220160204
[ 3921.898065] usb-storage 1-11:1.0: USB Mass Storage device detected
[ 3921.898451] scsi host6: usb-storage 1-11:1.0
[ 3922.904966] scsi 6:0:0:0: Direct-Access     Mass     Storage Device   1.00 PQ: 0 ANSI: 0 CCS
[ 3923.183730] sd 6:0:0:0: [sdc] Media removed, stopped polling
[ 3923.184379] sd 6:0:0:0: [sdc] Attached SCSI removable disk
❯ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 016: ID 1781:0b99 Multiple Vendors Guinnux (BB Black)
Bus 001 Device 017: ID 04b4:6022 Cypress Semiconductor Corp. Hantek DSO-6022BE
Bus 001 Device 018: ID 14cd:1212 Super Top microSD card reader (SY-T18)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
❯ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0  2.7T  0 disk
├─sda1   8:1    0  500M  0 part
├─sda2   8:2    0  500G  0 part /mnt/alt-os
└─sda3   8:3    0  2.2T  0 part /mnt/alt-os/home
sdb      8:16   0  2.7T  0 disk
├─sdb1   8:17   0  450M  0 part
├─sdb2   8:18   0   99M  0 part /boot
├─sdb3   8:19   0   16M  0 part
├─sdb4   8:20   0  1.4T  0 part
├─sdb5   8:21   0  527M  0 part
├─sdb6   8:22   0  250G  0 part /
└─sdb7   8:23   0  1.1T  0 part /home
sdc      8:32   1    0B  0 disk
sr0     11:0    1 1024M  0 rom

Offline

#2 2024-07-19 09:20:17

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: USB SD Card adapter not working

Does it still work with the linux-lts kernel package? Also which version are you currently on?

Offline

#3 2024-07-22 09:11:58

doevis
Member
Registered: 2024-07-19
Posts: 4

Re: USB SD Card adapter not working

I'm running 6.9.3. I also get the same result with linux-lts i.e. 6.6.40.

Offline

#4 2024-07-22 09:22:58

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: USB SD Card adapter not working

doevis wrote:

After a recent kernel update

Hm, can you narrow down which update that might have been? You could use i.e. aur/downgrade to pinpoint this a little more or install older kernel packages by hand from https://archive.archlinux.org/packages/l/linux/. Also it could be that your issue is already fixed in a newer release, so maybe also try the latest 6.9.y release or even 6.10 from testing.

Offline

#5 2024-07-22 09:33:03

doevis
Member
Registered: 2024-07-19
Posts: 4

Re: USB SD Card adapter not working

Very difficult to pinpoint the exact update as I at first suspected that the USB adaptor was faulty. I then purchased a new adaptor with the same results which triggered my investigation.

I can try and figure this out by installing older kernels but at the moment I'm  a bit busy doing actual work

Offline

#6 2024-07-22 10:26:12

mpan
Member
Registered: 2012-08-01
Posts: 1,295
Website

Re: USB SD Card adapter not working

It is supposed to be seen as USB mass storage device with size 0. The capacity should change upon inserting a card:

…
Jul 22 12:25:06 null kernel: sd 0:0:0:2: [sde] 123473920 512-byte logical blocks: (63.2 GB/58.9 GiB)
Jul 22 12:25:06 null kernel: sde: detected capacity change from 0 to 123473920
…

What the journal prints at the moment you insert the card?


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#7 2024-07-22 11:55:12

doevis
Member
Registered: 2024-07-19
Posts: 4

Re: USB SD Card adapter not working

The journal does not print anything extra, only the log from above, after inserting the SD card. Just did this test.
I've always plugged in  the adaptor with the card already inserted.

Offline

#8 2024-07-22 13:07:31

mpan
Member
Registered: 2012-08-01
Posts: 1,295
Website

Re: USB SD Card adapter not working

Does the same happen if you use another USB port? Do you have any ports of other type (not USB3) to test with? Perhaps some non-USB3 hub just for testing?

(I assume, that you did try with a different SD card and it’s not a card issue)

Last edited by mpan (2024-07-22 15:26:39)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB