On Thu, Mar 04, 2004 at 01:16:46PM -0500, Alan Stern wrote:
> On Thu, 4 Mar 2004, Ullrich Sigwanz wrote:
> 
> > Hello,
> > 
> > After compiling a new 2.6 kernel my Hewlett Packard Scanner 4300C was no
> > longer detected.
> > The console output was usb_control/bulk_msg: timeout
> > 
> > I investigated the source code (and some posts) and found a difference in
> > the file of 2.6 compared to 2.4
> > 
> > In 2.4.21 drivers/usb/usb.c line 2157 was:
> > err = usb_get_string(dev, dev->string_langid, index, tbuf, 255);
> > 
> > Now in 2.6.0 drivers/usb/core/message.c line 1208:
> > err = usb_get_string(dev, dev->string_langid, index, tbuf, len);
> > 
> > after setting to parameter len = 255 the device worked right away.
> > 
> > My scanner apparently reports the string descriptor length incorrectly,
> > which leads to a global denial of the whole device.
> 
> This patch does essentially what you asked (it uses 256 instead of 255).  
> Requesting 256 bytes instead of the actual length of the string should not 
> involve any significant extra overhead, since the device will only 
> transmit the actual string contents.
> 
> In addition, the patch requests a full maxpacket-sized buffer when
> retrieving the list of languages, to prevent the possibility of a babble
> error.  This is in line with the policy recommended by Martin Diehl.
> 
> If there are no objections, I think this should be applied.

Hm, I think there were objections to applying this, correct?

So I'm not going to right now.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to