On Mon, 5 Jul 2004, Torsten Scherer wrote:

> On Friday 02 July 2004 18:03, Alan Stern wrote:
> 
> > It's pretty clear from your log that the culprit here is the /etc/hotplug/
> > block.agent program.  It's issuing 512-byte INQUIRY commands which cause
> > the device to crash.
> 
> are you referring to the `L' argument in
> 
> messages1.ok-nohotplug:
> usb-storage: Command INQUIRY (6 bytes)
> usb-storage:  12 00 00 00 24 00
> usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
> 
> versus
> 
> messages2.ko-hotplug
> usb-storage: Command INQUIRY (6 bytes)
> usb-storage:  12 01 80 00 ff 00
> usb-storage: Bulk Command S 0x43425355 T 0xd L 512 F 128 Trg 0 LUN 0 CL 6
> 
> ?

That's right.

> > Your unusual_devs.h entry bypasses the issue by filtering out all INQUIRYs, 
> > but that's not a good solution. The correct approach is to fix that hotplug 
> > program.
> 
> do you think this is a *bug* in the hotplug program, or is it "just" that i'm 
> using one that doesn't fit to the kernel version?

This has nothing to do with the kernel.  And it's not really a bug in the 
hotplug program either.  If anything, it's a bug in your device -- it 
ought to accept an INQUIRY command with a length of 255, but instead it 
crashes.

Windows only uses 36-byte INQUIRYs, and lots of manufacturers only test 
their products against Windows.  Not much you can do about it.

> i take it that there must be some way for the hotplug script to determine 
> which size to use, or at least some reason why to use 512 bytes, because 
> i've got two other usb devices which work just fine with this script.
> 
> if this ends up with "no, there is no way of determining that" and "usually 
> devices are expected to tolerate whatever request comes in" then we're back 
> at unusual_devs.h i'd say.

Not at all.  The program should always use length = 36.  Or better yet, 
get the information it needs without using an INQUIRY command at all -- 
most of it is available elsewhere in the kernel.

> > Can you provide information about which hotplug package you are using, or
> > where the block.agent program comes from?
> 
> puuuh... it's the one from suse 9.1, no idea what version - i'll look it up.
> 
> since suse uses to patch stuff on their own it may well be that they've 
> included a broken one.
> 
> cheers,
> tesche
> 
> ps: the 2.6.0-test11 i mentioned as working has a suse 9.0 linux, so it may 
> well have a different hotplug.

I looked at the Sourceforge page for the hotplug project on Friday.  The 
current version no longer includes the block.agent program at all.  You 
could try upgrading and see it that helps.

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to