[I'm migrating this thread over from linux-kernel, since it may be
more appropriate here... neither myself nor Andries Brouwer are
subscribers here though, so please cc: us on any replies. Thanks]

Some history - a patch to sd.c has gone into 2.4.5-pre1 to enable the
Dane-Elec PhotoMate Combo USB card reader (CompactFlash / SmartMedia)
to be recognised. This appears to work well, but it only deals with
the CompactFlash side of the device, and I'd very much like to get the
SmartMedia side working too.

I have added CONFIG_USB_STORAGE_SDDR09 support to the Config.in in
/usr/src/linux/drivers/usb and enabled it, and this now seems to have
helped:

andyp@castor$ cat /proc/scsi/scsi
[snip]
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: eUSB     Model: Compact Flash    Rev:     
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 01
  Vendor: SCM Micr Model: eUSB SmartMedia  Rev: 0208
  Type:   Direct-Access                    ANSI SCSI revision: 02

So, the two logical parts of the device turn into /dev/sda (CF) and
/dev/sdb (SM).

kernel: Detected scsi removable disk sda at scsi1, channel 0, id 0,
lun 0
kernel: Detected scsi removable disk sdb at scsi1, channel 0, id 0,
lun 1

I've read that enabling SDDR09 support is dangerous... however, I can
successfully mount a SmartMedia card on /dev/sdb1 at this stage:

andyp@castor$ mount -t vfat /dev/sdb1 /mnt/sm

kernel: usb-uhci.c: interrupt, status 3, frame# 570
kernel: SCSI device sdb: 32768 512-byte hdwr sectors (17 MB)
kernel: usb-uhci.c: interrupt, status 3, frame# 705
kernel: usb-uhci.c: interrupt, status 3, frame# 709
kernel: usb-uhci.c: interrupt, status 3, frame# 713
kernel: usb-uhci.c: interrupt, status 3, frame# 716
kernel: usb-uhci.c: interrupt, status 3, frame# 721
kernel: sdb: test WP failed, assume Write Enabled
kernel:  sdb: sdb1
kernel: usb-uhci.c: interrupt, status 3, frame# 739
kernel: usb-uhci.c: interrupt, status 3, frame# 748
kernel: usb-uhci.c: interrupt, status 3, frame# 751
kernel: usb-uhci.c: interrupt, status 3, frame# 755
kernel: usb-uhci.c: interrupt, status 3, frame# 759

This enables me to read the files from the disk. With the patch from
Andries, the kernel seems to work out that the card is write-enabled,
and I can apparently copy new files on, but once I cd back out of the
mount point and unmount the card, the hard disk goes mad (writing
messages about SCSI errors to syslog) and the changes all vanish if I
mount the card in another device such as my Fuji Finepix 4700.

The messages received on unmounting are along the lines of -

kernel: SCSI disk error : host 1 channel 0 id 0 lun 1 return code =
70000
kernel:  I/O error: dev 08:11, sector 55
kernel: usb-uhci.c: interrupt, status 3, frame# 1619
kernel: usb-uhci.c: interrupt, status 3, frame# 1623
kernel: usb-uhci.c: interrupt, status 3, frame# 1626
kernel: usb-uhci.c: interrupt, status 3, frame# 1629
kernel: usb-uhci.c: interrupt, status 3, frame# 1634
kernel: SCSI disk error : host 1 channel 0 id 0 lun 1 return code =
70000
kernel:  I/O error: dev 08:11, sector 9079
kernel: usb-uhci.c: interrupt, status 3, frame# 1638
kernel: usb-uhci.c: interrupt, status 3, frame# 1643
....etc....

I also have to unmount the device twice in order for the kernel to
allow me to mount it again without whingeing - although it complains
that the device is already unmounted when I do so.

(incidentally, all of this only seems to work if I compile usb-storage
as a module; and the module is only inserted *once* I login, for some
reason, so as soon as someone logs in the kernel messages about
USB/SCSI support are echoed all over the screen...)

Back to my point - what can I do to help to get this working? If the
support for the CompactFlash side of the device is in 2.4.5-pre1, I'd
be quite keen to get the SmartMedia stuff in soon as well.

Andy

-- 
Andy Piper - Fareham, Hampshire (UK)
[EMAIL PROTECTED] - ICQ #86489434
http://www.andyp.uklinux.net

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to