I made some experiences with a USB bluetooth device. What I did was
setting the device up and down (alternating "hciconfig hci0 up" and "hciconfig
hci0 down"). Doing this the USB INT endpoint from this device is added,
removed, added, removed, and so on. I am using a 2.4.21 kernel.

When the device is connected to a UHCI host controller and driver,
everything works fine.

When the device is connected to a OHCI host controller and driver, the
behaviour is different:
  hciconfig hci0 up   - works
  hciconfig hci0 down - works
  hciconfig hci0 up   - failure
  hciconfig hci0 up   - works
  hciconfig hci0 down - works
  hciconfig hci0 up   - failure
  ...
I tried different machines with different host controllers, the behaviour
was all the same.

Analysing the problem I found that the host controller returned a
data0/data1 toggle mismatch in the failure case.
After analysing the packets on the USB line I recognised that the USB
device does not reinit its toggling scheme with up and down commands.
After the first up it continues toggling forever. According to the spec
this behaviour should be correct.

I searched through the ohci driver and it seems that an INT endpoint
always starts with toggle 0, when added, and that the toggle state
is not saved, when removed. Please correct me if I am wrong.

The above failure always happens when the device toggle is different from
what the driver expects.

In the driver I found some code using usb_gettoggle() that might be
intended to address this problem, but without effect, because there is no
corresponding usb_settoggle() when an endpoint is removed.

I would like to know where the problem can be fixed best:
- Should each toggle state be tracked with usb_settoggle ?
- Could Bit 2 in ed->hwHeadP be saved somehow ?
- There is also a Bit in td->hwINFO used with toggling. Can this be used ?

Thank you in advace for your help.

Christian Gohmann




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to