On Tue, 26 Dec 2006, Vaclav Barta wrote: > Hi, > > sorry for the late answer - festivities proved unavoidable... :-)
Likewise. > > > > > 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. > No, no, that's a misunderstanding. Under Windows, the only difference between > the drives is that the first can be configured to disappear (and show only > after entering a password) while the second is always there - but both drives > are writeable. It's just the documentation speaking about read-only access > (probably for some different model). Oh, okay. Well, the usbmon log shows that the device does claim the second LUN is write-protected, and the SnoopyPro log shows the same thing. Maybe Windows ignores the write-protection or maybe it sends some special command to remove the write-protection. Searching through the log for such a command is too painful, though. > > 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. > Here goes (again, ``cat /sys/kernel/debug/usbmon'' while inserting the drive): This didn't work either. :-( Comparing the logs again, I see that Windows uses a 512-byte read to load the partition sector whereas Linux uses a 4096-byte read. It's reasonable to assume the device likes one and doesn't like the other. Unfortunately there's no way to make Linux use a 512-byte read. However it is possible to verify the assumption. You can use the PLscsi program, available from http://members.aol.com/plscsi/linux/ Here's what you should do. First, rename the sd_mod.ko kernel module, or move it from its standard location, so that it won't get loaded automatically. Then plug in the device and do "modprobe sg". Then issue the following command (as root): plscsi -v -x '28 0 0 0 0 0 0 0 1 0' -i 512 /dev/sg0 Make sure you copy the command string correctly! You will probably have to run it twice; the first time through the device will report that it was just reset but the second time it should work. Alan Stern ------------------------------------------------------------------------- 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