> > What happens when swapping different size CompactFlash cards ?
>
>It appears that, if a TEST_UNIT_READY fails with the right sense data to
>indicate a media-change, the disk is re-validated. But don't quote me on
>that...
Sounds good, but in a mount,umount,mount sequence only one TEST_UNIT_READY
is issued.
I'm doing following:
* plug reader in
scsi does:
INQUIRY
TEST_UNIT_READY
--> autosense
READ_CAPACITY a few times
* insert 8MB CF card
* mount -r -n /dev/sda1 /mnt/cf
scsi does:
START_STOP - start
TEST_UNIT_READY
READ_CAPACITY
MODE_SENSE
READ_10 block 0
ALLOW_MEDIUM_REMOVAL
few READ_10's fat+dir ?
ALLOW_MEDIUM_REMOVAL - unlock
START_STOP - start
ALLOW_MEDIUM_REMOVAL - lock
START_STOP - start
again READ_10's
* ld or whatever
* umount -n /mnt/cf
scsi does:
ALLOW_MEDIUM_REMOVAL - unlock
* insert 128MB CF card
* mount -r -n /dev/sda1 /mnt/cf
START_STOP - start
ALLOW_MEDIUM_REMOVAL - lock
few READ_10's fat+dir ?
ALLOW_MEDIUM_REMOVAL - unlock
START_STOP - start
ALLOW_MEDIUM_REMOVAL - lock
START_STOP - start
again READ_10's
After the second mount no TEST_UNIT_READY.
* now scsi still thinks we have an 8MB device.
reading some file's in the top 120 mb of the card i get (naturally):
'attempt to access beyond end of device'
(/drivers/block/ll_rw_blk.c ?)
Is scsi possibly not 'aware enough' that usb-storage is heavily removeable ?
Same scenario as above, but with inserted 'sfdisk /dev/sda1 -R' it all
work nicely.
Had winamp playing 2 hours mp3 directly of a 128MB CF connected via Carry
USB Reader and Samba.
- sda
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel