Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-31 Thread Alan Stern
On Wed, 31 Jan 2007, Vaclav Barta wrote: > On Tuesday 30 January 2007 19:30, Alan Stern wrote: > > Well, there's one more approach I can think of. Go back to the regular > > kernel, and make sure to build sd_mod as a module. Rename or move > > sd_mod.ko so that it can't be loaded automatically.

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-31 Thread Vaclav Barta
On Tuesday 30 January 2007 19:30, Alan Stern wrote: > Well, there's one more approach I can think of. Go back to the regular > kernel, and make sure to build sd_mod as a module. Rename or move > sd_mod.ko so that it can't be loaded automatically. > > After plugging in the stick, run plscsi with t

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-30 Thread Alan Stern
On Tue, 30 Jan 2007, Vaclav Barta wrote: > > work. The patch causes the SCSI core to send an INQUIRY command to each > > LUN before registering any of them, which is more or less what Windows > > does. (You might have to apply the patch by hand, like the other one, but > > it shouldn't be too ba

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-30 Thread Vaclav Barta
On Monday 29 January 2007 23:05, Alan Stern wrote: > Here's a completely different patch. You shouldn't need the previous one OK, I've reverted to standard unusual_devs.h, but I still have the patched scsiglue.c - is that OK? > along with this. This one is completely experimental and unlikely e

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-29 Thread Alan Stern
On Mon, 29 Jan 2007, Vaclav Barta wrote: > > However, this doesn't mean the device will actually allow you to write on > > it! The only way to find out it to try it. > > > > You will still need to use usbreset together with the two plscsi commands > > and blockdev. But then you ought to be able

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-29 Thread Vaclav Barta
On Monday 29 January 2007 18:21, Alan Stern wrote: > Well, here's one last thing you can try. The patch below will prevent > Linux from asking the device whether it is write-protected, so there will Well, it didn't apply (I suppose my 2.6.18 sources are too old by now), but I've inserted it manua

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-29 Thread Alan Stern
On Sat, 27 Jan 2007, Vaclav Barta wrote: > On Saturday 27 January 2007 02:27, Alan Stern wrote: > > Let's see the usbmon log for the entire sequence, starting with plugging > > in the stick and including the usbreset, plscsi, and blkdev commands. > OK, for the first sequence (insert the stick, the

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-27 Thread Vaclav Barta
On Saturday 27 January 2007 02:27, Alan Stern wrote: > Let's see the usbmon log for the entire sequence, starting with plugging > in the stick and including the usbreset, plscsi, and blkdev commands. OK, for the first sequence (insert the stick, then ./usbreset /proc/bus/usb/001/002

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-26 Thread Alan Stern
On Fri, 26 Jan 2007, Vaclav Barta wrote: > I had my laptop repaired, but I'd be very surprised if they changed anything > USB-related while replacing display (if in fact they've changed anything at > all - the longer I look at it, the graver my doubts)... Anyway, with sg > loaded, the commands

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-26 Thread Vaclav Barta
On Thursday 25 January 2007 21:01, Alan Stern wrote: > On Thu, 25 Jan 2007, Vaclav Barta wrote: > > On Monday 15 January 2007 16:36, Alan Stern wrote: > > > Here's another approach to try. Get hold of the "usbreset" program, > > Doesn't really work: > > # ./usbreset /proc/bus/usb/001/002 > > Reset

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-25 Thread Alan Stern
On Thu, 25 Jan 2007, Vaclav Barta wrote: > On Monday 15 January 2007 16:36, Alan Stern wrote: > > Here's another approach to try. Get hold of the "usbreset" program, which > > I posted here: > > > > http://marc.theaimsgroup.com/?l=linux-usb-users&m=116827193506484&w=2 > > > > After plugging in yo

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-25 Thread Vaclav Barta
On Monday 15 January 2007 16:36, Alan Stern wrote: > Here's another approach to try. Get hold of the "usbreset" program, which > I posted here: > > http://marc.theaimsgroup.com/?l=linux-usb-users&m=116827193506484&w=2 > > After plugging in your device, when the usual probing fails, do this: > Firs

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-15 Thread Alan Stern
On Wed, 10 Jan 2007, Vaclav Barta wrote: > On Tuesday 09 January 2007 21:27, Alan Stern wrote: > > On Tue, 9 Jan 2007, Vaclav Barta wrote: > > > mount: block device /dev/sda1 is write-protected, mounting read-only > > That's better than before. As I recall, you couldn't even read the > > partitio

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-10 Thread Vaclav Barta
On Tuesday 09 January 2007 21:27, Alan Stern wrote: > On Tue, 9 Jan 2007, Vaclav Barta wrote: > > mount: block device /dev/sda1 is write-protected, mounting read-only > That's better than before. As I recall, you couldn't even read the > partition table for /dev/sda, let alone try to mount /dev/sd

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-09 Thread Alan Stern
On Tue, 9 Jan 2007, Vaclav Barta wrote: > Both with and without the patch, I get sd[ab] with write protect on; > ``blockdev --rereadpt /dev/sda'' succeeds (or at least doesn't > complain) but ``mount -t vfat /dev/sda1 /mnt/stick'' still says > > mount: block device /dev/sda1 is write-protected,

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-09 Thread Vaclav Barta
On Sunday 07 January 2007 18:39, Alan Stern wrote: > So perhaps you can put sd_mod back where it belongs and plug the device in I actually had to put SCSI disk support back into kernel - I couldn't get /dev/sd[ab]1? with sd_mod.ko at all (it probably needs some configuration I don't have to kick

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-07 Thread Alan Stern
On Sun, 7 Jan 2007, Vaclav Barta wrote: > On Saturday 06 January 2007 23:15, Alan Stern wrote: > > On Sat, 6 Jan 2007, Vaclav Barta wrote: > > > Looks like the command succeeds when it's repeated persistently enough... > > Or maybe it wants to see some of those commands for /dev/sg1 before it > >

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-07 Thread Vaclav Barta
On Saturday 06 January 2007 23:15, Alan Stern wrote: > On Sat, 6 Jan 2007, Vaclav Barta wrote: > > Looks like the command succeeds when it's repeated persistently enough... > Or maybe it wants to see some of those commands for /dev/sg1 before it > will let /dev/sg0 work. Try doing something just a

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-06 Thread Alan Stern
On Sat, 6 Jan 2007, Vaclav Barta wrote: > On Thursday 04 January 2007 22:08, Alan Stern wrote: > > On Wed, 3 Jan 2007, Vaclav Barta wrote: > > All right. Here's a list of plscsi commands that are exactly equivalent > OK. Using both your patches, I've renamed sd_mod.ko, inserted the stick and > r

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-06 Thread Vaclav Barta
On Thursday 04 January 2007 22:08, Alan Stern wrote: > On Wed, 3 Jan 2007, Vaclav Barta wrote: > All right. Here's a list of plscsi commands that are exactly equivalent OK. Using both your patches, I've renamed sd_mod.ko, inserted the stick and ran modprobe sg . Then, the plscsi commands work as

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-05 Thread Vaclav Barta
On Thursday 04 January 2007 22:08, Alan Stern wrote: > However there is one significant difference between Linux and Windows > which may go some way toward explaining the write-protect values. To make > Linux work like Windows in this regard, apply the patch below. You should OK, that patch certa

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-04 Thread Alan Stern
On Wed, 3 Jan 2007, Vaclav Barta wrote: > On Tuesday 02 January 2007 23:21, Alan Stern wrote: > > 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

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-03 Thread Vaclav Barta
On Tuesday 02 January 2007 23:21, Alan Stern wrote: > 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

Re: [Linux-usb-users] Memory stick not working under Linux

2007-01-02 Thread Alan Stern
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 > > > > >

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-26 Thread Vaclav Barta
Hi, sorry for the late answer - festivities proved unavoidable... :-) On Monday 18 December 2006 20:42, Alan Stern wrote: > 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 eno

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-18 Thread Alan Stern
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 >

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-18 Thread Vaclav Barta
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 p

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-15 Thread Alan Stern
On Fri, 15 Dec 2006, Vaclav Barta wrote: > > Do you remember where you read this? > Sorry, no. Some kind of online discussion or howto about flash drives on > Linux > I read a few months ago... It said that since flash memory has a limited > number of writes, they should be mounted read-only by

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-15 Thread Vaclav Barta
On Thursday 14 December 2006 21:32, Alan Stern wrote: > On Thu, 14 Dec 2006, Vaclav Barta wrote: > > Dec 14 18:58:05 quanxi kernel: SCSI device sda: 982016 512-byte hdwr > > sectors (503 MB) > > Dec 14 18:58:05 quanxi kernel: sda: Write Protect is off > Obviously this is the LUN you want to use, wi

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-14 Thread Alan Stern
On Thu, 14 Dec 2006, Vaclav Barta wrote: > On Wednesday 13 December 2006 21:29, Alan Stern wrote: > > In fact the stick has 2 LUNs, but your usbmon log shows that Linux is > > looking at only the first one. Probably you don't have > > CONFIG_SCSI_MULTI_LUN set in your kernel. My guess is that th

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-14 Thread Vaclav Barta
On Wednesday 13 December 2006 21:29, Alan Stern wrote: > In fact the stick has 2 LUNs, but your usbmon log shows that Linux is > looking at only the first one. Probably you don't have > CONFIG_SCSI_MULTI_LUN set in your kernel. My guess is that the first LUN Indeed I didn't. I've turned it on and

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-13 Thread Alan Stern
On Wed, 13 Dec 2006, Vaclav Barta wrote: > On Wednesday 13 December 2006 16:02, Alan Stern wrote: > > > Dec 12 19:04:47 quanxi kernel: SCSI device sda: 982016 512-byte hdwr > > > sectors (503 MB) > > > Dec 12 19:04:47 quanxi kernel: sda: Write Protect is off > > > Dec 12 19:04:47 quanxi kernel: s

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-13 Thread Vaclav Barta
On Wednesday 13 December 2006 16:02, Alan Stern wrote: > > Dec 12 19:04:47 quanxi kernel: SCSI device sda: 982016 512-byte hdwr > > sectors (503 MB) > > Dec 12 19:04:47 quanxi kernel: sda: Write Protect is off > > Dec 12 19:04:47 quanxi kernel: sda:<6>sd 1:0:0:0: SCSI error: return > > code = 0x08

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-13 Thread Alan Stern
On Tue, 12 Dec 2006, Vaclav Barta wrote: > Hi, > > I have a USB 2.0 flash drive called "next alien" ("developed by Emgeton, > assembled in Taiwan, copyright Bell technology" - not very high-end, but it > looks funny :-) ) and identifying itself as "Nu Drive" (see the log below) > which I'd lik

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-13 Thread Vaclav Barta
> > I have a USB 2.0 flash drive called "next alien" ("developed by ... > > Not surprisingly, ``mount -t vfat /dev/sda /mnt/stick'' fails with > > mount: /dev/sda: can't read superblock > I always specify the partition, as in "mount /dev/sda1 /mnt/stick". > As an experiment, I tried "mount -t vfat

Re: [Linux-usb-users] Memory stick not working under Linux

2006-12-13 Thread David Relson
On Tue, 12 Dec 2006 19:21:00 +0100 Vaclav Barta wrote: > Hi, > > I have a USB 2.0 flash drive called "next alien" ("developed by > Emgeton, assembled in Taiwan, copyright Bell technology" - not very > high-end, but it looks funny :-) ) and identifying itself as "Nu > Drive" (see the log below) wh