On Thu, 23 Jun 2005, Clemens Ladisch wrote:

> "Budde, Marco" wrote:
> > I am just writing a Linux driver for one of
> > our products (based on a 8051 controller with
> > integrated USB core).
> >
> > I am using Linux 2.6.11.
> > ...
> > An problem occurs, when I unload the kernel module
> > (after booting the device) and reload it afterwards
> > (without disconnecting the device).
> > ...
> > When the driver sends a bulk transfer (1 byte) to
> > the device and tries to read back the result of the
> > command as a second bulk transfer (1 byte), this
> > second transfer hangs in 99% of all cases (till
> > the timeout expires).
> 
> It may be possible that the device and the driver disagree about
> the current state of the data toggle bit.
> 
> Do the following bulk transfers work?
> Does it work if you unload/reload the driver two times?
> 
> (Such a problem that happened with UHCI controllers on 2.4 kernels
> when an URB was canceled was supposed to be fixed on 2.6.)

Indeed, this sounds very much like a problem noted by Pete Zaitcev: 
Unloading and reloading the usb-storage module would cause certain CD-ROM 
drives to fail, precisely because of the toggle state.

When a driver is unloaded, usbcore sends a Set-Interface request to select 
altsetting 0 on the device.  This command is supposed to clear the data 
toggles and reset all the endpoints in the interface.  But some devices 
are defective and do not reset the toggles; apparently this device has 
that problem.

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to