Date: Sun, 30 Sep 2007 15:45:33 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127024 for review Message-ID: <200709301545.l8UFjXpi005346@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127024 Change 127024 by hselasky@hselasky_laptop001 on 2007/09/30 15:44:38 1) Fix a small bug where the system would continue to scan the TD's even if the last one was stalled. 2) Optimise: Setting up the "td" variable two times in a row for non-isoc transfers does not make sense. 3) Add a comment. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uhci.c#32 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/uhci.c#32 (text+ko) ==== @@ -1145,6 +1145,8 @@ } if (status & UHCI_TD_STALLED) { + /* the transfer is finished */ + td = NULL; break; } @@ -1340,12 +1342,12 @@ DPRINTFN(15, ("xfer=%p checking transfer\n", xfer)); - td = xfer->td_transfer_last; - if(xfer->pipe->methods == &uhci_device_isoc_methods) { /* isochronous transfer */ + td = xfer->td_transfer_last; + usbd_page_dma_exit(td->page); status = le32toh(td->td_status); usbd_page_dma_enter(td->page); @@ -1669,6 +1671,8 @@ len_old = temp->len; precompute = 1; + /* software is used to detect short incoming transfers */ + if ((temp->td_token & htole32(UHCI_TD_PID)) == htole32(UHCI_TD_PID_IN)) { temp->td_status |= htole32(UHCI_TD_SPD); } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709301545.l8UFjXpi005346>
