USB mmcblk support (realtek or others)

mmcsd cardusb

Can a USB card-reader ever appear as /dev/mmcblk0 and support the MMC ioctl commands?

I see there are some kernel driver modules such as:

rtsx_usb_sdmmc.ko  (rtsx-usb-sdmmc)
rtsx_usb.ko (rtsx-usb)

Can these make a realtek card reader, attached to the USB bus appear as a real MMC device? I notice that all the USB card readers I have access to appear as /dev/sdX. which appear to be an emulated SCSI device. These emulated SCSI devices do not support all the MMC operations (ioctl).

Are there certain USB-attached card-readers (chips) that appear as a /dev/mmcblkX instead of /dev/sdX?

This would allow the card to support blkdiscard, trim or fstrim.

Best Answer

Yes, this is how devices based on RTS5129 or RTS5139 work. I do have RTS5129 in my Vostro laptop as a cardreader, and it provides me with /dev/mmcblkc0 device.

Related Question