Bug 2558 - usb storage does not detect hardware ro mode
Summary: usb storage does not detect hardware ro mode
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Matthew Dharm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 14:24 UTC by Albeiro
Modified: 2004-06-26 18:09 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Patch for usb-storage write-protection detect (1.92 KB, patch)
2004-04-26 11:58 UTC, Alan Stern
Details | Diff
Test patch (3.84 KB, patch)
2004-05-20 16:16 UTC, Matthew Dharm
Details | Diff

Description Albeiro 2004-04-21 14:24:27 UTC
Distribution:Gentoo Linux
Hardware Environment:kingston usb dongle with ro switch
Software Environment:
Problem Description:i have nice kingston usb dongle. it has write protected
switch. in 2.4 kernel usb storage could detect that dongle is write protected,
printk it and return error on writing request. but 2.6 does not detect it, so it
does not know about ro switch. it allows to write, what ends with many `lost
page` errors and call trace. it is ugly. ro switch should be detected like it was
in 2.4 and futher writing should be disalowed.

Steps to reproduce: trying to write to some hardware write protected usb dongle
will resulyt in this error
Comment 1 Matthew Dharm 2004-04-21 14:42:34 UTC
rebuild your 2.6 kernel with USB Mass Storage Verbose Debugging enabled and send
the logs that it generates showing the r/o detection for analysis.
Comment 2 Alan Stern 2004-04-26 11:58:09 UTC
Created attachment 2726 [details]
Patch for usb-storage write-protection detect

Please try this patch, intended for 2.6.6-rc2 or later.  It enables MODE SENSE
with page=0x3f on USB mass storage devices.  That's what the SCSI disk driver
uses to determine whether the device is write-protected.
Comment 3 Matthew Dharm 2004-05-20 16:16:00 UTC
Created attachment 2932 [details]
Test patch

Here is an updated patch -- please try this.
Comment 4 Matthew Dharm 2004-06-26 18:09:41 UTC
four weeks without response.  closing.

Note You need to log in before you can comment on or make changes to this bug.