On Mon, 18 Dec 2006, Vaclav Barta wrote:

> On Friday 15 December 2006 20:31, Alan Stern wrote:
> > On Fri, 15 Dec 2006, Vaclav Barta wrote:
> > > So, sdb looks big enough and sdb1 can be mounted, but just read-only.
> > > Documentation mentions a "read-only switch" but the hardware doesn't have
> > > any. :-( How do I remove (or ignore) the write protection?
> > I don't know.  Maybe you can't.
> Well the raison d'etre of this conversation is that I can't, :-) but Windows 
> can, so why not Linux?

Umm, Windows doesn't remove the write protection either.  You yourself 
mentioned that the second LUN always shows up as read-only, even under 
Windows.

> > It would be interesting to see how Windows manages to go about accessing
> > the first LUN.  You could try using a USB sniffer program (like USB
> > Snoopy) to find out exactly what Windows does.
> OK, the log generated by SnoopyPro 0.22 (from the stick insertion to Explorer 
> popping up 2 windows with the drives) is at 
> http://www.mangrove.cz/stick/USBLog1.usblog .

Good.  Comparing this log with your earlier usbmon logs, one thing stands 
out: Linux sends a PREVENT MEDIUM REMOVAL command and Windows doesn't.  
Some devices have been known to choke when they receive this command, so 
perhaps if we don't send it your device will work better.

Below is a patch which will prevent Linux from sending the command.  
Please email back a usbmon log showing what happens when you use the 
patched driver.

Alan Stern


Index: usb-2.6/drivers/usb/storage/unusual_devs.h
===================================================================
--- usb-2.6.orig/drivers/usb/storage/unusual_devs.h
+++ usb-2.6/drivers/usb/storage/unusual_devs.h
@@ -1358,6 +1358,15 @@ UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
 
+/* Reported by Vaclav Barta <[EMAIL PROTECTED]>
+ * This device reports 2 LUNs, of which the second is read-only.
+ */
+UNUSUAL_DEV(  0x13fe, 0x1a21, 0x0100, 0x0100,
+               "Generic",
+               "Nu Drive",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_NOT_LOCKABLE ),
+
 /* patch submitted by Davide Perini <[EMAIL PROTECTED]>
  * and Renato Perini <[EMAIL PROTECTED]>
  */


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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