The results have been moderately successful, but under heavy load (ie: resetting 2-3 passed through bt usb adapters concurrently with shell loops) it will fail badly. My attempt at fixing this has been to add code in ohciStartOfFrame that tests the entire in flight list with ohciHasUrbBeenCanceled() and calls the cancellation function for any that have. At this point virtual box's OHCI driver realizes that the URB had been cancelled and discards it - along with the data the btusb driver is expecting.ītusb waits several seconds for the device to reply, but since the reply has been incorrectly discarded, it times out. Since the old interrupt URB is still attached on the host, it receives the data intended for the new URB. When hciconfig hci0 up is called, the guest OS submits new bulk and interrupt URBs and sends a control URB that should result in the interrupt URB completing and receiving a call back. ![]() The bulk URB is discarded because the closure of the bluetooth USB device results in disabling of bulk list processing - however, if a second USB device has URBs in flight, the bulk URB will also be incorrectly left attached to the host driver. However, virtual box's virtual OHCI driver appears to lack any method for intentionally cancelling an interrupt URB, so the interrupt URB is not discarded, it remains attached to the host's usbdevfs driver indefinitely. The guest OS performs the appropriate OHCI register fiddling to perform these cancellations, and the btusb driver receives callbacks indicating the URBs are cancelled. Hciconfig hci0 down invokes btusb's close() method which retracts the 3 URBs via usb_kill_anchored_urbs(). This appears to be translated into 2 URBs by the virtual box usb proxy layer - one interrupt URB and one bulk URB. The linux guest OS's btusb driver submits 3 URBs as part of its open() method. Hciconfig hci0 reset in the version of bluez we're using is the same as performing "hciconfig hci0 down hciconfig hci0 up". ![]() ![]() I'd like to add some additional findings to this bug report (the host OS is linux for my tests).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |