kernel - Fix bulk transfer issue in USB/ohci
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jun 2012 19:24:07 +0000 (12:24 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jun 2012 19:24:07 +0000 (12:24 -0700)
* Fix a crash/panic in usb_transfer_complete() due to an incorrect
  xfer->actlen field.

* The field must be cleared at the beginning of a bulk transfer so
  the incremental completions can be added to it.

* Fixes ULPT when used w/OHCI.  ULPT still appears to have problems when
  used with EHCI.

sys/bus/usb/ohci.c

index b641d29..928f6dc 100644 (file)
@@ -2958,6 +2958,7 @@ ohci_device_bulk_start(usbd_xfer_handle xfer)
        }
 #endif
 
+       xfer->actlen = 0;
        len = xfer->length;
        endpt = xfer->pipe->endpoint->edesc->bEndpointAddress;
        isread = UE_GET_DIR(endpt) == UE_DIR_IN;