PERFORCE change 113184 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jan 19 22:57:09 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113184
Change 113184 by hselasky at hselasky_mini_itx on 2007/01/19 22:56:34
Fix another bug introduced by change 113175. If the transfer
descriptor is active, return the previous "status" value when
when for loop exits in "ehci_non_isoc_done()".
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#18 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/ehci.c#18 (text+ko) ====
@@ -1037,6 +1037,7 @@
static void
ehci_non_isoc_done(struct usbd_xfer *xfer)
{
+ uint32_t temp;
u_int32_t status = 0;
u_int32_t actlen = 0;
u_int16_t len = 0;
@@ -1058,19 +1059,21 @@
td = td->obj_next)
{
usbd_page_sync(td->page, BUS_DMASYNC_PREREAD);
- status = le32toh(td->qtd_status);
+ temp = le32toh(td->qtd_status);
usbd_page_sync(td->page, BUS_DMASYNC_POSTREAD);
- if (status & EHCI_QTD_ACTIVE) {
+ if (temp & EHCI_QTD_ACTIVE) {
/* if there are left over TDs
* the toggle needs to be updated
*/
xfer->pipe->toggle_next =
- (status & EHCI_QTD_SET_TOGGLE(1)) ? 1 : 0;
+ (temp & EHCI_QTD_SET_TOGGLE(1)) ? 1 : 0;
break;
}
+ status = temp;
+
len = EHCI_QTD_GET_BYTES(status);
if (len <= td->len) {
More information about the p4-projects
mailing list