# Oddities with a SanDisk SDDR-73 USB flash reader

## nhaggin

I apologize if the following has already been answered; my search of the forum and the web has not turned up too much.

I've been attempting to use a SanDisk SDDR-73 USB CF/SD/MMC reader, and have had what I would describe as partial success. Upon insertion, it is recognized by hotplug and the usb-storage module is loaded, and devfs makes the proper symlinks for /dev/sda and /dev/sdb. 

Apparently, it doesn't generate any kind of hotplugging event when a card is inserted, because doing so does not create /dev/sda1 or dev/sdb1. So, naturally, attempts to mount either device fail with "special device foo does not exist".

If I cd over to /dev/scsi/.... and run ls, the node for the block device automagically appears, as does the symlink for /dev/sda1 or sdb1, and I can then mount it with no problem.

Any thoughts on automating the partition discovery? I have heard of a program in the util-linux package called partx that may be able to help, but for some odd reason it wasn't built in my install (1.4_rc3, util-linux-2.11y).

Nick

A.M.D.G.

----------

## Visionary

My card reader has similar problems (see thread https://forums.gentoo.org/viewtopic.php?t=41197)  The only way I could get /dev/sda1 to appear was to plug in the card reader with the ard inserted.  But unfortunately for me I can not see anything on the card.

If you get any answers please let me know, also if any ideas for answers to my problem.

Visionary

----------

## nhaggin

Note to moderators: I promise this is the only time I will attempt to attract attention in this thread by a random extra post.

No news yet on this topic...if anyone has anything, pray post; if not, I will desist.

Nick

A.M.D.G.

----------

## mjbjr

2.4.20

I have this dual card reader, also.

In /etc/fstab:

/dev/sda1              /mnt/cf_card     auto            noauto,user             0 0

/dev/sdb1              /mnt/sd_card     auto            noauto,user             0 0

Directly after boot, I:

'mount /mnt/cf_card' - results in /dev/sda1 not found

'mount /mnt/sd_card' - mounts it !!

Following what was mentioned, I 'cd /proc/scsi' and do a 'ls', then I am able to 'mount /mnt/cf_card' successfully.

I do not have '/proc/bus/scsi'

# less /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

  Vendor: SanDisk  Model: ImageMate CF-SD1 Rev: 0100

  Type:   Direct-Access                    ANSI SCSI revision: 02

Host: scsi0 Channel: 00 Id: 00 Lun: 01

  Vendor: SanDisk  Model: ImageMate CF-SD3 Rev: 0100

  Type:   Direct-Access                    ANSI SCSI revision: 02

Host: scsi1 Channel: 00 Id: 00 Lun: 00

  Vendor: PLEXTOR  Model: CD-R   PX-W4824A Rev: 1.01

  Type:   CD-ROM                           ANSI SCSI revision: 02

Once mounted, icons appear on the gnome desktop.

- Martin -

----------

## red2

I have the same issue, and it is just a little annoying to cd to the directory before mounting works.  Just one of those small usability things.  Is there anyway to change the right click menu on the kde desktop so that the mount action does a script(the access the directory) before trying to mount the card?

Also I have an 8,32 and 128 MB card.  If I mount the 8 first, then when I try and mount the other ones, I can only access the first 8 MB.  I have to rmmod the scsi modules and modprobe them again to be able to see the rest of the card.  Any thoughts on how to get around this?  

again a script to do this might be handy if I can bind it to the device on the kde desktop, but I have other scsi devices (scanner and burner) that wouldn't like me removing the kernel modules.

These are the sorts of things that drive my wife crazy. (Especially when I am at work and have to explain this over the phone).

----------

## nhaggin

I apologize for not posting this sooner, but I've found something of a solution....

The problem we're all having is that, while the SCSI block devices are created when the card reader is plugged in, it doesn't create the partition devices unless you have a card inserted when you plug in the reader. Thus,  partition discovery has to be done at some later time, preferably AFTER you've inserted a Flash card.

There are several programs which need to read partition tables as part of what they do, and GNU parted is one of them. I installed it and then added the following line to /etc/devfsd.conf:

```
LOOKUP   ^(scsi/host[0-9]+/bus[0-9]+/target[0-9]+/lun[0-9]+)/part[0-9]+$         EXECUTE /usr/sbin/parted -s $mntpnt/\1/disc

```

For those of you unfamiliar with devfsd config rules, here's a rough translation:

"When someone tries to look up a file under /dev whose relative pathname matches this big honking regexp, run the command specified at the end of the EXECUTE clause." $mntpnt stands for the mount point of devfsd (usually /dev).

When the device has been properly recognized, it works great. I am having a couple hotplug issues, however, so it's not always properly enabled at boot....

Nick

A.M.D.G.

----------

## phypor

(posting this in case someone comes accross this thread searching for imagemate...)

To get my ImageMate CF/SM (SDDR-75) working,

i have the following kernel options (some are obvious):

```

General setup

    [*] Support for hot-pluggable devices

ATA/IDE/MFM/RLL support

   IDE, ATA and ATAPI Block devices

      <M>   SCSI emulation support

SCSI support

   <M> SCSI support

   <M>   SCSI disk support

   <M>   SCSI generic support

   [*]   Probe all LUNs on each SCSI device

USB support

   <*> Support for USB

   [*]   Preliminary USB device filesystem

   <M>   EHCI HCD (USB 2.0) support (EXPERIMENTAL)

   <M>   UHCI (Intel PIIX4, VIA, ...) support

   <M>   UHCI Alternate Driver (JE) support

   <M>   OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support

   <M>   USB Mass Storage support

   [*]     SanDisk SDDR-09 (and other SmartMedia) support

   [*]     SanDisk SDDR-55 SmartMedia support

```

the one that wasn't obvious was 'Probe all LUNs'... I figured it out after only having the cf card show up in /dev/scsi/, but not the sm.

as it is, i have

```

rommel linux # ls -l /dev/scsi/host1/bus0/target0/lun*

/dev/scsi/host1/bus0/target0/lun0:

total 0

brw-------    1 root     root       8,   0 Dec 31  1969 disc

crw-rw----    1 root     root      21,   1 Dec 31  1969 generic

brw-------    1 root     root       8,   1 Dec 31  1969 part1

/dev/scsi/host1/bus0/target0/lun1:

total 0

brw-------    1 root     root       8,  16 Dec 31  1969 disc

crw-r-----    1 root     root      21,   2 Dec 31  1969 generic

brw-------    1 root     root       8,  17 Dec 31  1969 part1

```

also i have the following in /etc/modules.autoload :

```

ide-scsi

usb-ohci

usb-uhci

usb-storage

```

(you wont need all those usb host bus modules unless you have onboard with one type and a pci card with the other,

and ive had better luck with usb-uhci than plain uhci, tho come 2.5.x/2.6.x there will be only one)

----------

## unplug

I am using this card reader in AMD64 kernel 2.6.7-r11. My problem is I can only access cf card but not sd card.

When I do sg_scan -i, I can see:

```

/dev/sg0: scsi2 channel=0 id=0 lun=0

/dev/sg1: scsi4 channel=0 id=0 lun=0

      SanDisk ......

```

Note that I have a sata hard drive so /dev/sg0 is that hd.

Now, when I do sg_map, I only got:

/dev/sg0    /dev/sda

/dev/sg1   /dev/sdb

I already have 

 Probe all LUNs on each SCSI device

enabled

What is wrong with my configuration? Thanks

----------

