Alan Stern wrote:
On Sun, 23 Apr 2006, John O'Donnell wrote:
Are you saying that the SDDR-103 reports the write-protect setting
wrongly, or that Linux interprets the reported value wrongly?
yuppers Alan! Just google it. I aint the only one. Someone suggested timing
the insertion of the SanDisk card (and it only happens with SD cards it seems).
Timing the insertion from 2 to 3 seconds after plugging in the reader to the
USB port was reported to bypass it?!? Thats like waving chicken bones and
jumping around in prayer to me... So I just disabled it in the code. Workin great!
Exactly what code did you change? What happens if you use a card that
really is write-protected?
If there is any info there I can help ya out with, I'd be glad to help.
What shows up in the dmesg log with the original code intact?
Alan Stern
/* 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"
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.
?!?!?!?!?!?!?!?!?
Johnny O
--
=== Never ask a geek why, just nod your head and slowly back away.===
+================================+==================================+
| John O'Donnell | |
| (Sr. Systems Engineer, | http://juanisan.homeip.net |
| Net Admin, Webmaster, etc.) | E-Mail: [EMAIL PROTECTED] |
+================================+==================================+
-------------------------------------------------------
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