On Sun, 23 Apr 2006, John O'Donnell wrote:

>               /* Some devices don't like MODE SENSE with page=0x3f,
>                * which is the command used for checking if a device
>                * is write-protected.  Now that we tell the sd driver
>                * to do a 192-byte transfer with this command the
>                * majority of devices work fine, but a few still can't
>                * handle it.  The sd driver will simply assume those
>                * devices are write-enabled. */
>               /*if (us->flags & US_FL_NO_WP_DETECT)*/
>                       sdev->skip_ms_page_3f = 1;
> 
> in drivers/usb/storage/scsiglue.c - comment out the "if"

Okay, makes sense.

> Putting the code back in and compiling, unload, reload, connect device...
> 
> USB Mass Storage support registered.
> usb 1-6: new high speed USB device using ehci_hcd and address 61
> scsi43 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 61
> usb-storage: waiting for device to settle before scanning
>    Vendor: Generic   Model: STORAGE DEVICE    Rev: 9228
>    Type:   Direct-Access                      ANSI SCSI revision: 00
> SCSI device sde: 1984000 512-byte hdwr sectors (1016 MB)
> sde: Write Protect is off
> sde: Mode Sense: 03 00 00 00
> sde: assuming drive cache: write through
> SCSI device sde: 1984000 512-byte hdwr sectors (1016 MB)
> sde: Write Protect is off
> sde: Mode Sense: 03 00 00 00
> sde: assuming drive cache: write through
>   sde: sde1
> sd 43:0:0:0: Attached scsi removable disk sde
> sd 43:0:0:0: Attached scsi generic sg5 type 0
> usb-storage: device scan complete
> 
> I cant explain it.  All last night this wasnt working.  I was tearing my hair 
> out.  It works now.  I uncommented the "if".  I thought maybe it was my 512M 
> card fooling me so I tried the 1Gb one that was driving me nuts last night 
> and 
> it works.  I tried removing the verbose debug.  It still works.
> 
> I popped out the card...
> sde: Write Protect is on
> It is now obeying the WP if I set it on the card.
> I just took it back off...
> It's all working?!?!
> 
> I cant even begin to explain this.  But if it fails again I will send a 
> message.

Good enough.  I'm glad removing the "sync" was all you needed to get 
things working again.

Alan Stern



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to