Randy.Dunlap wrote:
> On Tue, 11 Jun 2002, Svein E. Seldal wrote:
> 
> | If I ask for a invalid string, lets say index 100, the USB device stalls
> | (as it should), an USB exeption is printed into the syslog from the UCHI
> | driver, but the functions usb_string() or usb_get_string() functions
> | still returns 0. This leaves my driver totally unaware that the last
> | string request failed. Isnt this a bug?
> 
> I guess that your driver could treat a string length of 0 as
> an error.

Yes, it will suffice as a fix to the problem, but IMHO its a hack, not a 
fix...

I know that string descriptors must be at least two bytes because of the 
header, which will make usb_get_string() safe. But the usb_string() 
request would return 0 in both cases where empty string descriptor data 
are returned and where a non-existent (stalled) string descriptor is 
requested.

> What kernel version?
> What USB exception is logged?
> Can you post the log messages?
> 
> I don't see a path for usb_string() or usb_get_string() to
> return 0 unless the device returns 0 for the string length
> (instead of returning an error).

Kernel 2.4.18. The driver is a custom, unofficial driver made by me. 
BTW: Maybe I wasnt clear enough. Exception is probably the wrong term. 
Something-has-stalled is maybe better :)

Anyway, the kernel messages are as follows:


usb.c: registered new driver avrusb
avrusb: driver started
hub.c: USB new device connect on bus1/1, assigned device number 6
avrusb: probe vendor id 0x4242, device id 0x1201 ifnum: 0
usb.c: ignoring set_interface for dev 6, iface 0, alt 0
avrusb: device attach on 0
avrusb: ioctl(0)
avrusb:   cmd=Get string
avrusb:   String index: 1
avrusb:   String result: 35
avrusb: ioctl(0)
avrusb:   cmd=Get string
avrusb:   String index: 100
usb-uhci.c: interrupt, status 2, frame# 983
avrusb:   String result: 0


Hope this helps,
Svein



_______________________________________________________________

Multimillion Dollar Computer Inventory
Live Webcast Auctions Thru Aug. 2002 - http://www.cowanalexander.com/calendar



_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to