2002-03-14 14:32:35

by Itai Nahshon

[permalink] [raw]
Subject: USB-Storage in 2.4.19-pre

I have used usb-storage with stock redhat kernels for some times. That is usable
with just few problems. Recently I switched to 2.4.17, and then to 2.4.19-pre1.

On the stock redhat kernels (up to the latest update 2.4.9-31) and on 2.4.17 I had to
umount the disk before shutdown. Normal shutdown did not unmount the disk cleanly.
It looks like the scsi layer lost access to the physical disk - maybe after unmouting
of usbdevfs. (even when I unmount the disk I had some scsi errors reported).

This problem was fixed with 2.4.19-pre1.

Now I'm trying the latest changes. 2.4.19-pre2-ac{3.4} and 2.4.19-pre3 and I cannot
use usb-storage at all. I get all kind of erros similar to these:

Mar 14 13:41:06 itai kernel: hub.c: USB new device connect on bus1/2, assigned device number 2
Mar 14 13:41:06 itai kernel: usb-uhci.c: interrupt, status 2, frame# 673
Mar 14 13:41:06 itai kernel: usb.c: USB device not responding, giving up (error=-84)
Mar 14 13:41:09 itai kernel: hub.c: USB new device connect on bus1/2, assigned device number 3
Mar 14 13:41:09 itai kernel: usb.c: USB device not responding, giving up (error=-84)


Switching back to 2.4.19-pre1 - It looks like the disk is reported too early. The Vendor-Model-Rev
fields are still empty. (Is it just cosmetics or a real problem?)

Mar 14 15:02:19 itai kernel: hub.c: USB new device connect on bus1/2, assigned device number 3
Mar 14 15:02:19 itai kernel: usb.c: USB device 3 (vend/prod 0x4e6/0x1) is not claimed by any active driver.
Mar 14 15:02:19 itai kernel: Initializing USB Mass Storage driver...
Mar 14 15:02:19 itai kernel: usb.c: registered new driver usb-storage
Mar 14 15:02:19 itai kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Mar 14 15:02:19 itai kernel: Vendor: Model: Rev:
Mar 14 15:02:19 itai kernel: Type: Direct-Access ANSI SCSI revision: 02
Mar 14 15:02:19 itai kernel: Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
Mar 14 15:02:20 itai kernel: SCSI device sdb: 33750865 512-byte hdwr sectors (17280 MB)
Mar 14 15:02:20 itai kernel: sdb: sdb1 sdb2 sdb4 < sdb5 >
Mar 14 15:02:20 itai kernel: USB Mass Storage support registered.

And from /proc/scsi/scsi:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Maxtor 9 Model: 1728D8 Rev: GAS5
Type: Direct-Access ANSI SCSI revision: 02

-- Itai


2002-03-14 21:30:38

by Greg KH

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Thu, Mar 14, 2002 at 04:32:09PM +0200, Itai Nahshon wrote:
> I have used usb-storage with stock redhat kernels for some times. That is usable
> with just few problems. Recently I switched to 2.4.17, and then to 2.4.19-pre1.
>
> On the stock redhat kernels (up to the latest update 2.4.9-31) and on 2.4.17 I had to
> umount the disk before shutdown. Normal shutdown did not unmount the disk cleanly.
> It looks like the scsi layer lost access to the physical disk - maybe after unmouting
> of usbdevfs. (even when I unmount the disk I had some scsi errors reported).
>
> This problem was fixed with 2.4.19-pre1.
>
> Now I'm trying the latest changes. 2.4.19-pre2-ac{3.4} and 2.4.19-pre3 and I cannot
> use usb-storage at all. I get all kind of erros similar to these:

<snip>

Can you try either the patch at:
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=101588420909194

Or just renaming your usbmodules binary to something else and see if the
problem goes away?

The USB initialization timing changed between 2.4.19-pre1 and -pre2,
fixing a lot of problems with devices that had previously not worked on
Linux, but worked fine on Windows. Turned out we were wrong on the
timing issues :)

Let me know if this helps or not.

thanks,

greg k-h

2002-03-14 23:21:22

by Itai Nahshon

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

No go. I still get that device not responding (error=-84).
If I understand your patch, disabling hotplug and loading
usb-storage manually shoud work. It isn't. Actually
I believe that it never got to call hotplug.
usbview does not see the device.

I forgot to say. On one of those computers where I do the testing
I have a USB mouse - which is working just fine.

-- Itai

On Thursday 14 March 2002 23:25 pm, Greg KH wrote:
> On Thu, Mar 14, 2002 at 04:32:09PM +0200, Itai Nahshon wrote:
> > I have used usb-storage with stock redhat kernels for some times. That is
> > usable with just few problems. Recently I switched to 2.4.17, and then to
> > 2.4.19-pre1.
> >
> > On the stock redhat kernels (up to the latest update 2.4.9-31) and on
> > 2.4.17 I had to umount the disk before shutdown. Normal shutdown did not
> > unmount the disk cleanly. It looks like the scsi layer lost access to the
> > physical disk - maybe after unmouting of usbdevfs. (even when I unmount
> > the disk I had some scsi errors reported).
> >
> > This problem was fixed with 2.4.19-pre1.
> >
> > Now I'm trying the latest changes. 2.4.19-pre2-ac{3.4} and 2.4.19-pre3
> > and I cannot use usb-storage at all. I get all kind of erros similar to
> > these:
>
> <snip>
>
> Can you try either the patch at:
> http://marc.theaimsgroup.com/?l=linux-usb-devel&m=101588420909194
>
> Or just renaming your usbmodules binary to something else and see if the
> problem goes away?
>
> The USB initialization timing changed between 2.4.19-pre1 and -pre2,
> fixing a lot of problems with devices that had previously not worked on
> Linux, but worked fine on Windows. Turned out we were wrong on the
> timing issues :)
>
> Let me know if this helps or not.
>
> thanks,
>
> greg k-h

2002-03-14 23:26:54

by Greg KH

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Fri, Mar 15, 2002 at 01:20:49AM +0200, Itai Nahshon wrote:
> No go. I still get that device not responding (error=-84).
> If I understand your patch, disabling hotplug and loading
> usb-storage manually shoud work. It isn't. Actually
> I believe that it never got to call hotplug.
> usbview does not see the device.

No the main problem is that usbmodules starts talking to the device
before it is initialized properly by the kernel driver, causing both
programs to get messed up, and then the device is usually in a
uninitialized state.

> I forgot to say. On one of those computers where I do the testing
> I have a USB mouse - which is working just fine.

Does that mouse work if you plug it into the same port that you are
plugging the drive into? I have noticed a lot more errors from flaky
hubs with the new code.

thanks,

greg k-h

2002-03-15 00:50:36

by Itai Nahshon

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Friday 15 March 2002 01:26 am, Greg KH wrote:
> On Fri, Mar 15, 2002 at 01:20:49AM +0200, Itai Nahshon wrote:
> > No go. I still get that device not responding (error=-84).
> > If I understand your patch, disabling hotplug and loading
> > usb-storage manually shoud work. It isn't. Actually
> > I believe that it never got to call hotplug.
> > usbview does not see the device.
>
> No the main problem is that usbmodules starts talking to the device
> before it is initialized properly by the kernel driver, causing both
> programs to get messed up, and then the device is usually in a
> uninitialized state.
>
> > I forgot to say. On one of those computers where I do the testing
> > I have a USB mouse - which is working just fine.
>
> Does that mouse work if you plug it into the same port that you are
> plugging the drive into? I have noticed a lot more errors from flaky
> hubs with the new code.
>
> thanks,
>
> greg k-h

That's on an ASUS CUV4X with 4 USB ports on the main board. Moving
things between ports do not make a difference - the mouse still works
and the disk does not. Perhaps the the flaky part i s the USB port in the
disk side. I could never make it work thru a hub - but then
it initialized correctly and failed only during data transfer.

I just put a scanner on he same system. The scanner is working OK
where the disk has failed.

Again, I do not see the disk usind usbview (or in /proc/bus/usb/devices)
so I believe the problem is more with detection than with initialization.

-- Itai



2002-03-15 18:26:29

by Greg KH

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Fri, Mar 15, 2002 at 02:50:15AM +0200, Itai Nahshon wrote:
>
> Again, I do not see the disk usind usbview (or in /proc/bus/usb/devices)
> so I believe the problem is more with detection than with initialization.

Sounds like it's a flaky USB device :)

Does this device work on any other machines?

thanks,

greg k-h

2002-03-15 22:23:39

by Itai Nahshon

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Friday 15 March 2002 20:26 pm, Greg KH wrote:
> On Fri, Mar 15, 2002 at 02:50:15AM +0200, Itai Nahshon wrote:
> > Again, I do not see the disk usind usbview (or in /proc/bus/usb/devices)
> > so I believe the problem is more with detection than with initialization.
>
> Sounds like it's a flaky USB device :)
>
> Does this device work on any other machines?

I use it on my computers at home and in the office. Very handy
when I want to share large data. It also worked on Windows 98
(with their supplied diricer on diskette from DataStor) until I
reformatted the disk as EXT3.

This is what I now have on USB (/proc/bus/usb/devices - Using 2.4.19-pre1).
If you believe it might help, I can also open the box and tell you exactly
what's on the adapter card (IIRC it's a Cypress processor but I'm not sure).

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=d000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04e6 ProdID=0001 Rev= 2.00
S: Manufacturer=Anchor Chips, Inc.
S: Product=Firmware FrameWorks
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=usb-storage
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc=118/900 us (13%), #Int= 1, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c001 Rev= 1.20
S: Manufacturer=Logitech
S: Product=USB-PS/2 Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 50mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=hid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl= 10ms

>
> thanks,
>
> greg k-h

2002-03-16 00:22:40

by Itai Nahshon

[permalink] [raw]
Subject: Re: USB-Storage in 2.4.19-pre

On Saturday 16 March 2002 00:23 am, Itai Nahshon wrote:
> On Friday 15 March 2002 20:26 pm, Greg KH wrote:
> > On Fri, Mar 15, 2002 at 02:50:15AM +0200, Itai Nahshon wrote:
> > > Again, I do not see the disk usind usbview (or in
> > > /proc/bus/usb/devices) so I believe the problem is more with detection
> > > than with initialization.
> >
> > Sounds like it's a flaky USB device :)
> >
> > Does this device work on any other machines?
>
> I use it on my computers at home and in the office. Very handy
> when I want to share large data. It also worked on Windows 98
> (with their supplied diricer on diskette from DataStor) until I
> reformatted the disk as EXT3.
>
I forgot to say, that's with different mainboards, At home that's
via694 based ASUS CUV4X. In the office it's a MicroStar (do not
remember model) MB with 440BX chipset and I'm sure I successfully
used that disk also on noname MB with i810 chipset. All systems
using Linux 2.4.x kernels.

-- Itai