LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-09-2005, 04:22 PM   #1
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Rep: Reputation: 21
Sandisk multicard reader won't read xD cards


I'm hoping someone can help me out with this one. I've scoured the web for tutorials and howtos, and nothing I do seems to work. Here's my problem.

I have a Sandisk 8-in-1 USB card reader and am trying to get it to read inserted cards under Slackware 10.1 (custom kernel 2.4.30). I've installed the sg3_utils already and have scanned and mapped the devices:

# sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
HL-DT-ST DVDRAM GSA-4163B A102 [rmb=1 cmdq=0 pqual=0 pdev=0x5]
/dev/sg1: scsi0 channel=0 id=1 lun=0 [em]
BENQ DVD DD DW1640 BSHB [rmb=1 cmdq=0 pqual=0 pdev=0x5]
/dev/sg2: scsi1 channel=0 id=0 lun=0 [em]
Generic STORAGE DEVICE 9139 [rmb=1 cmdq=0 pqual=0 pdev=0x0]
/dev/sg3: scsi1 channel=0 id=0 lun=1 [em]
Generic STORAGE DEVICE 9139 [rmb=1 cmdq=0 pqual=0 pdev=0x0]
/dev/sg4: scsi1 channel=0 id=0 lun=2 [em]
Generic STORAGE DEVICE 9139 [rmb=1 cmdq=0 pqual=0 pdev=0x0]
/dev/sg5: scsi1 channel=0 id=0 lun=3 [em]
Generic STORAGE DEVICE 9139 [rmb=1 cmdq=0 pqual=0 pdev=0x0]

The first two are my DVD writers ('cause you can't just have one!), and the rest are (assumed) to be each of the physical ports on the card reader. I do also find evidence of it in /proc/bus/usb/devices:

# more /proc/bus/usb/devices
<snip>
T: Bus=03 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0781 ProdID=8889 Rev=91.39
S: Manufacturer=SanDisk
S: Product=ImageMate 8 in 1
S: SerialNumber=0200216185
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
<snip>

... and furthermore, I am able to map it:

# sg_map
/dev/sg0 /dev/scd0
/dev/sg1 /dev/scd1
/dev/sg2 /dev/sda
/dev/sg3 /dev/sdb
/dev/sg4 /dev/sdc
/dev/sg5 /dev/sdd


So at this point I have a populated SD card inserted, as well as a populated XD card inserted into the car reader (obvously both in different slots on the reader).
So with everything mapped, I try to mount the devices:

# mount /dev/sdc /mnt/sd
Works fine! I look in 'mount' and see:

# mount
<snip>
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdc on /mnt/sd type vfat (rw,noexec,nosuid,nodev)

I know by looking at the contents that this is the SD card (and have setup my fstab accordingly for this device).

But now if I go and try any other card, it fails. (Note I explicitly specify the filesystem type otherwise it complains)
# mount -t vfat /dev/sda /mnt/tmpcard
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

#mount -t vfat /dev/sdb /mnt/tmpcard
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

# mount -t vfat /dev/sdd /mnt/tmpcard
mount: wrong fs type, bad option, bad superblock on /dev/sdd,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

... so I take the error's advice, excluding the tail because there's more errors than a mere couple lines here:

#dmesg
<snip>
sdd: Unit Not Ready, sense:
Current 00:00: sense key Not Ready
Additional sense indicates Medium not present
sdd : READ CAPACITY failed.
sdd : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sense key Not Ready
Additional sense indicates Medium not present
sdd : block size assumed to be 512 bytes, disk size 1GB.
sdd: test WP failed, assume Write Enabled
sdd: I/O error: dev 08:30, sector 0
I/O error: dev 08:30, sector 0
unable to read partition table
Device not ready. Make sure there is a disc in the drive.
Device busy for revalidation (usage=1)
Device 08:30 not ready.
I/O error: dev 08:30, sector 0
FAT: unable to read boot sector
Device not ready. Make sure there is a disc in the drive.
sdd: Unit Not Ready, sense:
Current 00:00: sense key Not Ready
Additional sense indicates Medium not present
sdd : READ CAPACITY failed.
sdd : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sense key Not Ready
Additional sense indicates Medium not present
sdd : block size assumed to be 512 bytes, disk size 1GB.
sdd: test WP failed, assume Write Enabled
sdd: I/O error: dev 08:30, sector 0
I/O error: dev 08:30, sector 0
unable to read partition table
Device not ready. Make sure there is a disc in the drive.
Device not ready. Make sure there is a disc in the drive.
<snip>

.. and I get this pretty well for all the other cards.

Does this mean I need to format my other card? I hope not since I have about 200 digital photos on there that haven't been transferred to any other medium yet.

I read somewhere that sometimes each card is treated like a partition as opposed to a dedicated device, so I umounted everything and tried mounting specifying a partition:

# mount /dev/sdc1 /mnt/sd

... and it hangs. The system still operates relatively alright, but it sits there seemingly forever and no matter how much I Ctrl+C or even kill the process from another tty, it just sits there. I left it alone after trying to terminate and kill it the other day, and when I went back to check on it a few hours later, it looked like it *had* terminated, but it obviously got me nowhere.

Does anyone have any ideas what else I might be able to try to get this thing working? USB has been a real thorn in my side for the last little while on this system, and I'd like very much to resolve it and cross it off my big list of administrative things-to-do on my system.

Thanks!

- skubik.

PS: If it helps, here is the output of lsmod on my system (perhaps I'm missing a module?)
Module Size Used by Tainted: PF
msdos 5644 0 (autoclean)
sg 26492 0 (autoclean)
sd_mod 10700 0 (autoclean)
sr_mod 13176 0 (autoclean)
cdrom 29024 0 (autoclean) [sr_mod]
iptable_filter 1772 0 (autoclean) (unused)
snd-mixer-oss 13432 1 (autoclean)
ip_tables 11968 1 [iptable_filter]
usb-storage 24976 0
fglrx 208520 285
agpgart 15040 5
joydev 5600 1
hid 14600 0 (unused)
usb-ohci 19176 0 (unused)
usbcore 62604 1 [usb-storage hid usb-ohci]
forcedeth 10380 1
vfat 10348 1 (autoclean)
fat 31992 0 (autoclean) [msdos vfat]
ide-scsi 10032 0
scsi_mod 88372 5 [sg sd_mod sr_mod usb-storage ide-scsi]
snd-emu10k1 93732 3
snd-rawmidi 13760 0 [snd-emu10k1]
snd-util-mem 1424 0 [snd-emu10k1]
snd-hwdep 4672 0 [snd-emu10k1]
snd-ac97-codec 64540 0 [snd-emu10k1]
snd-pcm 59688 0 [snd-emu10k1 snd-ac97-codec]
snd-timer 14980 0 [snd-emu10k1 snd-pcm]
snd-seq-device 4340 0 [snd-emu10k1 snd-rawmidi]
snd 35108 2 [snd-mixer-oss snd-emu10k1 snd-rawmidi snd-util-mem snd-hwdep snd-ac97-codec snd-pcm snd-timer snd-seq-device]
soundcore 3844 3 [snd]
snd-page-alloc 5128 0 [snd-mixer-oss snd-emu10k1 snd-rawmidi snd-hwdep snd-pcm snd-timer snd-seq-device snd]

Last edited by skubik; 09-09-2005 at 04:25 PM.
 
Old 09-13-2005, 11:42 AM   #2
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Original Poster
Rep: Reputation: 21
Luckily I figured this one ouf myself. Not 100% sure what it was that caused it (and other USB devices) to work more-or-less properly, but I am able to access the xD card from the Sandisk reader, as well as an SD card (simultaneously).
On the SD card, I was mounting it as> mount /dev/sdc /mnt/sd, which works fine.
When I went to try something similar on the xD card, it kept telling me it couldn't recognize the format of that device. Frustrated, I got all the data off the card and formatted it ON the Sandisk reader, and it seemed to work fine (using mkdosfs -c -C -n XDCARD /dev/sdb. note: I did this late last night a little intoxicated, so forgive me if I don't remember specifics I remember it failed once, so perhaps the -C is not required, OR I had to format it as /dev/sdb1... regardless, it formatted the card). BUT, it failed to work in my Olympus digital camera since it wanted to reformat the card again, which I did. Took some pictures and put the card in the reader and tried to mount as before, again, failing.

So then I tried the partition thing again, and it WORKED!:

> mount -t vfat /dev/sdb1 /mnt/xd


Now, how did I know that it was /dev/sdb for the xD card? I tried to mount each SCSI device (except the DVD writers) using 'mount -t vfat /dev/sd[a-d] /mnt/<cardtype>, with the cards already inserted into the reader. I then examined the output in dmesg and noticed some differences in the errors being reported. At the time I only used two cards, the SD and the xD. I already knew which device my SD card was on, so it was a process of elimination to find the dmesg errors for the device, different from the other two. I won't go into specifics, but I believe it had to do with formatting/filesystem errors as opposed to 'make sure there is a disk in the drive'.

I decided to post this followup more for information reasons so that if anyone else has a similar problem with their Sandisk multicard reader, this might help point them in the right direction.

- skubik.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multicard reader problem in Slack 10.2 surfer63 Slackware 4 10-31-2005 12:31 PM
MUlticard reader not correctly detected leodp Linux - Hardware 2 09-05-2005 06:26 AM
USB Multicard reader problem mazzo Linux - Hardware 1 02-26-2005 06:27 AM
can't mount my sandisk card reader kamstrup Linux - Hardware 17 08-20-2003 02:39 PM
USB Sandisk card reader griv Linux - General 1 06-04-2002 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration