Card reader linux kernel

Arch Linux

You are not logged in.

#1 2016-07-28 15:48:36

Realtek SD card reader RTS522A unusable — HP Pavillion Laptop

among all of this laptop’s hardware, of which all except the subject of this thread work flawlessly, the SD card reader is nigh unusable, despite alleged support of this specific reader in the kernel for a while now.

The reader being

There’s an option for powersaving for this card reader in my BIOS, however the on/off state of that setting has no effect on its behaviour. I’m using the linux-ck skylake flavour (repo-ck) of the arch kernel, but the exact same issues occur on the generic one as well (to be clear: non-repo-ck generic, «official»).
Generally, the system is able to recognize an SD card if it is connected through the slot (lsblk shows a device named mmcblk0 with capacity of the SD card), however no partitions are recognised (despite one being present in reality). After unloading and reloading the relevant kernel modules (rtsx_pci, rtsx_pci_ms, rtsx_pci_sdmmc) and subsequently inserting the sd card, partitions are sometimes read off it (the only one being mmcblk0p1) and are able to be mounted, however I/O errors seen in the log above ensue and copy attempts of files off the SD card generally fail, particularly with larger files. Unmounting afterwards works fine.
The card reader and SD card work fine under Windows (and cause no issues on there or the jailbroken 3DS it’s used in), so it’s unlikely to be a hardware or card issue.

Google turns up results with solutions similar to this, though that may have only helped in those specific instances and are probably out of date today.
https://abhinavgupta2812.wordpress.com/ … on-debian/

Compilation of the driver thoroughly fails after changing relevant parts in an analogous manner to this. It may simply not apply in my case.

Last edited by Muffindrake (2016-07-28 19:59:13)

Источник

Arch Linux

You are not logged in.

#1 2019-10-09 10:43:49

[SOLVED] Trouble mounting microSD card

I’m running Arch on a 15″ HP Spectre X360 laptop. I’m trying to mount a Samsung EVO 32 GB microSD card (the slot is for regular SD cards so I’m using the included microSD to SD adapter). I’ve installed udisks2 and started the corresponding udisks2.service. The wiki indicates that the card should end up mounting under /run/media/user/, but this doesn’t happen. It does not show up in the output of lsblk, so I can’t manually mount it either. I’ve tried using udiskie and the bash script from the wiki, but those didn’t do anything either. udev and dmesg both seem to notice the card when I insert it. Also, I know that the card itself is fine since it works with Windows and my Raspberry Pi. The output of relevant commands is listed below.

Any suggestions on how to troubleshoot this would be greatly appreciated.

Last edited by LiteracyFanatic (2019-10-09 15:03:37)

#2 2019-10-09 12:47:48

Re: [SOLVED] Trouble mounting microSD card

Some possible causes :

— SD reader lacks a driver
lspci -k can help to determine this, please post it
Have you been able to access other things with this reader ?

Читайте также:  Удалить все файлы с расширением windows

— adapter can’t handle this typo of Micro SD card
What adapter/reader did you use on windows & RPi ?
Can you try on archlinux with the same adapter ?

* there may be more

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can’t help you.

(A works at time B) && (time C > time B ) ≠ (A works at time C)

Источник

Using a USB Card Reader in Linux

I recently got a Compact Flash card reader and set about getting it to work under Linux (x86). I didn’t find any instructions that were as straightforward as they should be, so.

First things first. here are some resources:

If you have any particular successes or failures using these instructions, let me know. I originally did this on Debian sarge with Linux kernel 2.4.19. It should work with any 2.4.x series kernel. I have also done this with 2.6.x kernels and it all works.

Installing the Drivers

Make sure you do not select the “Low Performance USB Block Driver” ( BLK_DEV_UB ). It will prevent the whole thing from working correctly.

Compile your kernel with these options and reboot (or just load the relevant modules if you’ve got them). And, plug the thing in, if you haven’t already.

Checking it out

If you have a look through the file /proc/bus/usb/devices , you should see a section with an S: line and the name of your reader and an I: line with Driver=usb-storage . If you see that, the kernel is recognizing the USB device.

Install the sg3-utils package if you haven’t already (on Debian, apt-get install sg3-utils ). To check your SCSI devices, run the command sg_scan -i . You should see something like this:

That’s it. Your card reader is /dev/sda . The first (and almost certainly only) partition is /dev/sda1 .

Multi Card Readers

If you have an n -in-1 card reader that can deal with multiple cards, the process isn’t much different. Make sure that “Probe all LUNs on each SCSI device” ( CONFIG_SCSI_MULTI_LUN ) is enabled in your kernel. If this isn’t compiled in, you can add this line to your /etc/modules.conf :

Or, for a more temporary solution, run this command:

The device should still appear in your /proc/bus/usb/devices as described above. When you do the sg_scan -i , you should see several devices, like this:

Notice that the four generics are part of the same physical device, but have different LUNs . The “Probe all LUNs on each SCSI device” option in the kernel must be enabled so it will find these.

If so, then sg_map can do its thing:

On this system, the four slots on the card reader are mapped to SCSI devices /dev/sd[a-d] .

Now, the question of which slot on the reader corresponds to which device file. I have no real advice here. Some readers give a useful description in sg_scan . If not, put a card in and try to mount it on each one. You will get a “ mount: No medium found ” for absent cards. When you find the right one, add it to your /etc/fstab as described below and forget about it. Repeat for each kind of card you actually have.

One more note: don’t cheap-out on your card reader. The first multi-card reader I bought was a off-brand and would spontaneously disconnent itself after being mounted for a minute or two. I replaced it with a SanDisk 8-in-1 and everything worked beautifully.

Thanks to Susan Macchia for her notes on getting n -in-1 card readers working that got me started with mine. Thanks also to the mailing list posted that I’ve long since lost that pointed out the “Probe all LUNs ” thing. Thanks to Chris Bryant for the info on how to work around when “Probe all LUNs ” isn’t available, and Neil Gunton and Dale Thacher for even more.

Читайте также:  Amd 2600 pro windows 10

Final Setup

You’ll want to add a line to your /etc/fstab so you can easily mount a card. I mount my card at /mnt/flash ; you can mount it anywhere you want, just create the mount point first. Add this line to /etc/fstab :

The user option lets any user mount the card. If you don’t want that, remove it.

Now, you should be able to insert a card and mount it with the command mount /mnt/flash . Before you remove the card, unmount it with the command umount /mnt/flash .

Formatting a Card

Since cards are generally formatted as DOS ”disks”, they are formatted just like any other DOS disk. The Unix command mkfs -t vfat /dev/sda1 or mkfs -t msdos /dev/sda1 should do it.

Источник

Arch Linux

You are not logged in.

#1 2011-05-11 09:34:43

Card reader problem with kernel 2.6.38.6-1

Hi, just upgraded the kernel to 2.6.38.6-1 , system didn’t detect the sd card. Getting error messages in dmesg like this:

And if I remove the card:

Hardware? It’s a sony vaio netbook:

Probably will downgrade, ideas?

Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. — James Branch Cabell

#2 2011-05-12 21:51:39

Re: Card reader problem with kernel 2.6.38.6-1

It’s a bit worse for me. On my laptop, inserting a card into my card reader crashes my ENTIRE laptop. I mean no tty’s or anything. If I boot up with an SD card inserted, the boot process will completely fail. I reverted back to 2.6.38.5 (the previous kernel) and the card reader works fine again.

#3 2011-05-13 05:52:26

Re: Card reader problem with kernel 2.6.38.6-1

It’s a bit worse for me. On my laptop, inserting a card into my card reader crashes my ENTIRE laptop. I mean no tty’s or anything. If I boot up with an SD card inserted, the boot process will completely fail. I reverted back to 2.6.38.5 (the previous kernel) and the card reader works fine again.

I’ve had both happen to me: I get a TTY and then I can’t login properly, or I don’t get a TTY and my tablet PC crashes entirely. I was about to downgrade via the Live CD (not having known the SD card was the problem, not having checked the forums), but then I accidentally booted into Arch, with my USB stick in (in addition to the SD card I usually have in), and the boot worked normally. This is pretty annoying.

Here’s the info on my SD card:
48:03.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)

Last edited by Sara (2011-05-13 05:56:36)

Registed Linux User 483618

Источник

Thread: How to Install SD Card Reader ENE Technology, Inc. (USB)

Thread Tools
Display

How to Install SD Card Reader ENE Technology, Inc. (USB)

Howto get your netbook SD card reader working (this article is a litle modification from http://community.linuxmint.com/tutorial/view/309)
This is a summary of the steps necessary to get my SD card reader working on MSI Wind like netbook running. It involves downloading, building and installing the driver module.
This is also relevant to other laptops/netbooks using the same internal card reader (ENE Technology UB6250).
The source for this solution was https://bugs.launchpad.net/ubuntu/+s. ux/+bug/530277. All credit goes to its contributors.
Disclaimer: Whilst I foresee no problems with this you copy the actions in this summary entirely at your own risk.

1. Confirm that you have the relevant SD card reader that is not working and check kernel version.
2. Install building tools.
3. Download the driver module source.
4. Extract the source files from the package.
5. Build and install the module.
6. Load the module and test.

Читайте также:  Как установить windows без запуска

1. Confirm that you have the same type of non-working SD card reader.

Insert an SD card into the card reader.

At a terminal type:

you should see output like this:

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0cf2:6250 ENE Technology, Inc.
Bus 001 Device 002: ID 0402:9665 ALi Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The 0cf2:6250 confirms you have the correct SD card reader for this howto.

Remove the SD card.

Check that your kernel:

2. Install building tools.

$ sudo apt install build-essential

3. Download the driver module source.

Download this file:

back to top
4. Extract the package keucr.tgz

From a terminal cd to a working directory of your choice and extract the tar ball with:

edit usb.c ($gedit usb.c) and change this:

If your kernel is = 2.6.34 put:

5. Build and install the module.

$ make -C /usr/src/linux-headers-`uname -r` M=`pwd`

$ sudo make -C /usr/src/linux-headers-`uname -r` O=/lib/modules/`uname -r`/build M=`pwd` modules_install

update your initrd:

$ sudo update-initramfs -u -k `uname -r`

Insert your SD card.

See if it appears in Computer.

It should be mounted under /media.

At a terminal check that the module keucr is loaded with

Check that the module keucr.ko is available with:

$ modprobe -l keucr

$ ls /lib/modules/`uname -r`/build/extra

Add keucr to /etc/modules listing:

$ sudo gedit /etc/modules

This file seens like that:

If no success please refer to the thread for more info and background. It worked for me. Good luck!

Last edited by Wilian; June 6th, 2011 at 08:37 PM .

Re: How to Install SD Card Reader ENE Technology, Inc. (USB)

I’m actually having problems with this bug, and with the solution proposed as well.

I’m running Xubuntu 12.04 (more than a fresh install) on an Emachines e350 (ENE’s card reader).

I’m aware about the discussion on the Official Bug Report (and I’ll post there also) but my problem is that I can’t actually build the keucr module on my system.

With regards to the solution proposed in this thread, the compiling process stops because the compiler can’t find a bunch of defines, more specifically:

#define US_PR_BULK 0x50
#define US_SC_SCSI 0x06
#define US_PR_CBI 0x00
#define US_SC_CYP_ATACB 0xf1
#define US_PR_CB 0x01
#define US_SC_UFI 0x04
#define US_PR_DPCM_USB 0xf0
#define US_SC_RBC 0x01

which in previous versions of the kernel were defined in usb_usual.h .
By adding these defines to usb.h file in the keucr directory, you are actually able to compile the module without mistakes.

But of course, I guess this is not a proper solution to apply. In fact, at the end, it still doesn’t work.

Thus, I am still searching for a proper solution of the problem.

What I can say is that before upgrading to Xubuntu 12.04 I was running Ubuntu Maverick 10.10 . At that time I had the Card Reader working by simply upgrading the kernel to 2.38.XX (I can’t remember the XX part^^) — while keeping Maverick.
So this could be a good hint for further investigation on this bug.

I hope this problem will be solved in a short time but I guess this won’t be the case, unless a lot of people start to face the same issue by upgrading their systems.

If you are aware about other solutions, or if I’m missing some part, please let me know.
Thanks and best regards.

In any case I’ll keep an eye on this thread!

Источник

Оцените статью