On Tue, 22 Mar 2005, Julien Gaston wrote: > Before I get to the log, I had a look at the > linux/drivers/usb/storage/unusual_devs.h file and a few lines should > be changed or added: > > <code> > /* Submitted by Daniel Drake <[EMAIL PROTECTED]> > * Reported by dayul on the Gentoo Forums */ > UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110, > "Ours Technology", > "Flash Disk", > US_SC_DEVICE, US_PR_DEVICE, NULL, > US_FL_IGNORE_RESIDUE ), > </code> > > My key uses Ours Technology logic but reports "USB" as the > manufacturer and its bcdDevice is 0x0200 instead of 0x0110.
The difference is manufacturer name doesn't matter. The name stored in unusual_devs.h gets used only if the device doesn't provide a name. The bcdDevice difference might be important. However, if your device has no trouble reading or writing -- apart from reading the partition table at startup -- then the entry is okay as it stands. > Now, here is the log without the script: > > Mar 22 13:18:56 booba usb 4-5: new high speed USB device using > ehci_hcd and address 5 > Mar 22 13:18:57 booba scsi3 : SCSI emulation for USB Mass Storage devices > Mar 22 13:18:57 booba usb-storage: device found at 5 > Mar 22 13:18:57 booba usb-storage: waiting for device to settle before > scanning > Mar 22 13:19:02 booba Vendor: KINGMAX Model: USB Flash Disk Rev: 2.00 > Mar 22 13:19:02 booba Type: Direct-Access ANSI > SCSI revision: 02 > Mar 22 13:19:02 booba sdb: Unit Not Ready, sense: > Mar 22 13:19:02 booba : Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb : READ CAPACITY failed. That particular code means "Not Ready to Ready Transition". It's a perfectly legal code, and you would expect to see it after plugging in the key. But it's only supposed to occur once! After that the system _knows_ about the state transition; the key doesn't need to keep reporting it. > Mar 22 13:19:02 booba sdb : status=1, message=00, host=0, driver=08 > Mar 22 13:19:02 booba sd: Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb: test WP failed, assume Write Enabled > Mar 22 13:19:02 booba sdb: assuming drive cache: write through > Mar 22 13:19:02 booba sdb: Unit Not Ready, sense: > Mar 22 13:19:02 booba : Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb : READ CAPACITY failed. > Mar 22 13:19:02 booba sdb : status=1, message=00, host=0, driver=08 > Mar 22 13:19:02 booba sd: Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb: test WP failed, assume Write Enabled > Mar 22 13:19:02 booba sdb: assuming drive cache: write through > Mar 22 13:19:02 booba sdb: Unit Not Ready, sense: > Mar 22 13:19:02 booba : Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb : READ CAPACITY failed. > Mar 22 13:19:02 booba sdb : status=1, message=00, host=0, driver=08 > Mar 22 13:19:02 booba sd: Current: sense key=0x6 > Mar 22 13:19:02 booba ASC=0x28 ASCQ=0x0 > Mar 22 13:19:02 booba sdb: test WP failed, assume Write Enabled > Mar 22 13:19:02 booba sdb: assuming drive cache: write through > Mar 22 13:19:02 booba sdb:end_request: I/O error, dev sdb, sector 0 > Mar 22 13:19:02 booba Buffer I/O error on device sdb, logical block 0 > Mar 22 13:19:02 booba Buffer I/O error on device sdb, logical block 0 > Mar 22 13:19:02 booba ldm_validate_partition_table(): Disk read failed. > Mar 22 13:19:02 booba Buffer I/O error on device sdb, logical block 0 > Mar 22 13:19:02 booba unable to read partition table You can see why Linux had trouble reading the partition table. The device kept saying that it had undergone a state change when in fact it hadn't. This looks like a bug in the firmware of the USB key. > Mar 22 13:19:02 booba Attached scsi removable disk sdb at scsi3, > channel 0, id 0, lun 0 > Mar 22 13:19:02 booba usb-storage: device scan complete > Mar 22 13:19:02 booba USBKEY: /dev/sdb > Mar 22 13:19:03 booba scsi.agent[22281]: disk at > /devices/pci0000:00/0000:00:1d.7/usb4/4-5/4-5:1.0/host3/target3:0:0/3:0:0:0 > > Now when I scan the key: > > Mar 22 13:30:03 booba SCSI device sdb: 512000 512-byte hdwr sectors (262 MB) > Mar 22 13:30:03 booba sdb: Write Protect is off > Mar 22 13:30:03 booba sdb: Mode Sense: 03 00 00 00 > Mar 22 13:30:03 booba sdb: assuming drive cache: write through > Mar 22 13:30:03 booba SCSI device sdb: 512000 512-byte hdwr sectors (262 MB) > Mar 22 13:30:03 booba sdb: Write Protect is off > Mar 22 13:30:03 booba sdb: Mode Sense: 03 00 00 00 > Mar 22 13:30:03 booba sdb: assuming drive cache: write through > Mar 22 13:30:03 booba sdb: sdb1 > Mar 22 13:30:03 booba SCSI device sdb: 512000 512-byte hdwr sectors (262 MB) > Mar 22 13:30:03 booba sdb: Write Protect is off > Mar 22 13:30:03 booba sdb: Mode Sense: 03 00 00 00 > Mar 22 13:30:03 booba sdb: assuming drive cache: write through > Mar 22 13:30:03 booba sdb: sdb1 > Mar 22 13:30:03 booba USBKEY: key ready > Mar 22 13:30:03 booba USBKEY: key ready I have no idea why it started working here. The commands being sent to the key are exactly the same as when it wasn't working. Maybe the manufacturer could give you an explanation... Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users