* Correct removal of failed transfers by applying the address mask. As the head

pointer also contains the toggle carry and the halt bit (which was obviously
  always set as the endpoint had an error) the address comparison failed and
  the head was dead in the water with all further transfers timing out until
  a subsequet cancel cleaned the mess up again.
* Add the OHCI host controller driver to the image as it should now be fully
  functional except for isochronous transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-05-19 20:41:58 +00:00
parent 30a396ab42
commit 5b03912b5f
2 changed files with 5 additions and 3 deletions

View File

@ -149,7 +149,7 @@ AddFilesToHaikuImage beos system add-ons kernel busses ide
AddFilesToHaikuImage beos system add-ons kernel busses scsi
: ahci ;
AddFilesToHaikuImage beos system add-ons kernel busses usb
: <usb>uhci <usb>ehci ;
: <usb>uhci <usb>ohci <usb>ehci ;
AddFilesToHaikuImage beos system add-ons kernel console : vga_text ;
AddFilesToHaikuImage beos system add-ons kernel debugger
: <kdebug>hangman <kdebug>invalidate_on_exit ;

View File

@ -992,7 +992,8 @@ OHCI::_FinishTransfers()
// break the descriptor chain on the last descriptor
transfer->last_descriptor->next_logical_descriptor = NULL;
TRACE(("usb_ohci: transfer %p done\n", transfer));
TRACE(("usb_ohci: transfer %p done with status 0x%08lx\n",
transfer, callbackStatus));
// if canceled the callback has already been called
if (!transfer->canceled) {
@ -1240,7 +1241,8 @@ OHCI::_RemoveTransferFromEndpoint(transfer_data *transfer)
ohci_endpoint_descriptor *endpoint = transfer->endpoint;
ohci_general_td *descriptor = transfer->first_descriptor;
while (descriptor) {
if (endpoint->head_physical_descriptor == descriptor->physical_address) {
if ((endpoint->head_physical_descriptor & OHCI_ENDPOINT_HEAD_MASK)
== descriptor->physical_address) {
// This descriptor caused the halt. Advance the head pointer. This
// will either move the head to the next valid transfer that can
// then be restarted, or it will move the head to the tail when