Hi, Pete! On Tue, 2007-07-24 at 13:09 -0700, Pete Zaitcev wrote: > On Tue, 24 Jul 2007 01:55:26 -0400, Pavel Roskin <[EMAIL PROTECTED]> wrote:
> > I was able to check that the data buffer remains unchanged even though > > the data size is not 0. Actually, the return code is 0, which indicates > > that 0 bytes have been read. But why? And why is it not an error? It turns out usb_control_msg() returns 0 in two cases where it returns -EPIPE in Linux 2.6.22. Return value 0 is not expected to be an error, which prevents second stage of the firmware download, normally triggered by an error reading the firmware version. Since the firmware version is not loaded, other usb_control_msg() calls fail as well in the same fashion, by returning 0. Treating return code 0 as an error fixes the driver in Linux 2.6.23-rc1. However, I think it's wrong to return 0 if more than 0 bytes were requested. usb_control_msg() is synchronous, and the caller is supposed to wait for the data. If the function returns and the data is not there, it should be an error IMHO. > I looked at the changes in -rc1 and the only two vaguely suspicious areas > are the suspend and the ehci_hcd. So, I'm afraid someone has to bisect. Oh well. I'll try. > The URB_SHORT_NOT_OK flag is not default. I don't remember exactly why. I guess you mean that the temporary URB in usb_internal_control_msg() should use that flag? That sounds like a good idea, at least on the surface. > > I'll appreciate if some of the USB developers have a brief look at the > > driver. Sure, I can debug deeper into usb_control_msg(), but most > > likely the driver is just doing something stupid. > > > > The patch for the kernel: > > http://80211libre.org/at76/at76_usb.patch > > I don't see anything suspicious in the patch. Thanks! -- Regards, Pavel Roskin ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel