diff options
| author | Andrew Thompson <thompsa@FreeBSD.org> | 2010-04-06 23:16:40 +0000 |
|---|---|---|
| committer | Andrew Thompson <thompsa@FreeBSD.org> | 2010-04-06 23:16:40 +0000 |
| commit | a67855641134e9beca3e3f48898f1f7e63a67711 (patch) | |
| tree | f9dc80cb233aef20e46848aeef43d4ff0f0e2de7 /sys/dev/usb | |
| parent | 3f3b0d48a9f65cf2bbc58988571398ab52f1e612 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/controller/ehci.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c index 952dd983edda..03ecc377c3ed 100644 --- a/sys/dev/usb/controller/ehci.c +++ b/sys/dev/usb/controller/ehci.c @@ -1340,25 +1340,22 @@ ehci_check_transfer(struct usb_xfer *xfer) } } else if (methods == &ehci_device_isoc_hs_methods) { ehci_itd_t *td; + uint8_t n = (xfer->nframes & 7); /* isochronous high speed transfer */ + /* check last transfer */ td = xfer->td_transfer_last; usb_pc_cpu_invalidate(td->page_cache); - status = - td->itd_status[0] | td->itd_status[1] | - td->itd_status[2] | td->itd_status[3] | - td->itd_status[4] | td->itd_status[5] | - td->itd_status[6] | td->itd_status[7]; + if (n == 0) + status = td->itd_status[7]; + else + status = td->itd_status[n-1]; /* also check first transfer */ td = xfer->td_transfer_first; usb_pc_cpu_invalidate(td->page_cache); - status |= - td->itd_status[0] | td->itd_status[1] | - td->itd_status[2] | td->itd_status[3] | - td->itd_status[4] | td->itd_status[5] | - td->itd_status[6] | td->itd_status[7]; + status |= td->itd_status[0]; /* if no transactions are active we continue */ if (!(status & htohc32(sc, EHCI_ITD_ACTIVE))) { |
