Unfortunately, Sony MS readers are broken, because they do not generate a media-change event. When the media is removed, it detaches from the bus. Most people agree that this is a Bad Thing(tm), but so far there is no workaround.
Some code would be needed to notice if this is the first media-access command (just defining that is a bit fuzzy) and failing the command with sense data that suggests a media-change. Ugly, to say the least. It would be nicer if there was some call I could send to the SCSI layer to say that "media change has occured on this device", but I'm not sure if that exists. Matt On Sun, Dec 30, 2001 at 09:35:46AM +0000, Nick Craig-Wood wrote: > I'm sure this is a known problem - does anyone know how to go about > fixing it? > > I have a Sony Memory stick reader and two memory sticks (4 MB and 64 > MB). This all works fine giving a respectable 375 kB/s with usb-uhci > with both reading and writing. However what doesn't work is swapping > the two memory sticks. > > For example if I plug the 4 MB stick in and then cat /proc/partitions > I get this... > > major minor #blocks name > > 8 0 3952 sda > 8 1 3922 sda1 > > Now if I remove the stick and place the 64 MB stick in > /proc/partitions doesn't change. Likewise calling eject /dev/sda > doesn't help (though it appears to work) /proc/partitions persistently > has the wrong value. > > Trying to mount the 64 MB stick is futile when /proc/partitions has > the wrong value - mount complains about the superblock. > > The only way I've discovered to reset /proc/partitions is to take the > stick out, rmmod usb-storage and plug it back in. > > All this was from linus 2.4.14. > > hub.c: USB new device connect on bus1/1, assigned device number 2 > usb.c: USB device 2 (vend/prod 0x54c/0x2d) is not claimed by any active driver. > Initializing USB Mass Storage driver... > usb.c: registered new driver usb-storage > scsi0 : SCSI emulation for USB Mass Storage devices > Vendor: Sony Model: MSAC-US1 Rev: 1.00 > Type: Direct-Access ANSI SCSI revision: 02 > Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 > SCSI device sda: 7904 512-byte hdwr sectors (4 MB) > sda: Write Protect is off > sda: sda1 > WARNING: USB Mass Storage data integrity not assured > USB Mass Storage device found at 2 > USB Mass Storage support registered. > > -- > Nick Craig-Wood > [EMAIL PROTECTED] > > _______________________________________________ > [EMAIL PROTECTED] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver M: No, Windows doesn't have any nag screens. C: Then what are those blue and white screens I get every day? -- Mike and Cobb User Friendly, 1/4/1999
msg03584/pgp00000.pgp
Description: PGP signature
