On Fri, 5 Dec 2003 [EMAIL PROTECTED] wrote: > Hmm. Now that I look - it is just that the driver is broken. > Nothing wrong with the device. > > The ATA convention is to return the capacity. > The SCSI convention is to return the highest block number, > one less than the capacity. > So, the driver misses a -1. > > Another problem causing hangs was that the SCSI code does > TEST_UNIT_READY, and datafab.c first wants to determine > which lun it is using, and tries to find out, but the attempt > fails and causes scsi error-recovery, but that does TEST_UNIT_READY > and we have a recursion. > Below a patch fixing both problems. Now my two-lun device works > for CF and it works for SM but not both - depending on the order > of the entries in unusual_devices. > In the good old days I showed versions that just worked, but the > vanilla kernel does not yet handle multi-lun devices.
Does this fix the LUN-selection problem Eduard pointed out? Do you think Eduard's patch for checking whether the media is present (test for USB_STOR_XFER_SHORT return status from the bulk_read call in datafab_id_device() and return UNIT-ATTENTION sense) is correct? I trust you are aware that using static variables as with your beenhere variable in this patch (and the sensekey and sensecode variables in sddr09.c) won't work when more than one card reader is connected to a host. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
