2003-02-20 21:20:33

by Oliver Graf

[permalink] [raw]
Subject: usb-storage fails to detect all luns after 2.4.19

Hi!

I've already mentioned this some time ago.

The problem: a multi device usb card reader is correctly detected with
its four subdevices with kernel 2.4.19(-acX). But any patch after this
fails to detect the subdevices.

Verbose output with 2.4.19-ac4 shows:
usb-storage: GetMaxLUN command result is 1, data is 3

2.4.21-pre4 gives:
usb-storage: GetMaxLUN command result is -32, data is 128
usb-storage: clearing endpoint halt for pipe 0x80000880

I tried to find the parts that changed between the version, but it seems
not to be rooted in usb-storage.

The call to usb_control_msg seems to timeout with the newer kernel
(just a wild guess!).

Finally I did a desparate modification: I return 3 from
usb_stor_Bulk_max_lun just before the endpoint is cleared. This got my
card reader up and running again, but it's very very dirty und certainly
breaks other usb storage devices (I don't own).

Anyone out there who knows the usb stuff better?

Regards,
Oliver.


2003-02-26 08:11:46

by Oliver Graf

[permalink] [raw]
Subject: Re: usb-storage fails to detect all luns after 2.4.19

Hi!

On Thu, Feb 20, 2003 at 10:30:37PM +0100, Oliver Graf wrote:
> The problem: a multi device usb card reader is correctly detected with
> its four subdevices with kernel 2.4.19(-acX). But any patch after this
> fails to detect the subdevices.
>
> Verbose output with 2.4.19-ac4 shows:
> usb-storage: GetMaxLUN command result is 1, data is 3
>
> 2.4.21-pre4 gives:
> usb-storage: GetMaxLUN command result is -32, data is 128
> usb-storage: clearing endpoint halt for pipe 0x80000880
>
> I tried to find the parts that changed between the version, but it seems
> not to be rooted in usb-storage.
>
> The call to usb_control_msg seems to timeout with the newer kernel
> (just a wild guess!).

It is a timeout:
usb-storage: New GUID 04831307fffe9ffffffffe97
usb-uhci.c: interrupt, status 2, frame# 1765
usb_control/bulk_msg: timeout
usb-storage: GetMaxLUN command result is -110, data is 128

> Finally I did a desparate modification: I return 3 from
> usb_stor_Bulk_max_lun just before the endpoint is cleared. This got my
> card reader up and running again, but it's very very dirty und certainly
> breaks other usb storage devices (I don't own).

A patch which defines a new unusual_dev is appended. But it's still
dirty, cause it sets max_lun to 3 for this device. It should be seen as
a workaround not as something that should go into the kernel.

If someone more elaborate needs more debug output to find the real
problem, feel free to contact me.

Regards,
Oliver.


Attachments:
(No filename) (1.44 kB)
usbstor-tevion.diff (1.49 kB)
Download all attachments