summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2019-03-12 08:13:51 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2019-03-12 08:13:51 +0000
commit5b97b2ae6b54a314dd963e917b33b49f7f9f7b9b (patch)
treecc674c8534fc057cfd9795b1abc8663341d3790f /sys
parent7e0ec59dce1a06e439673a64c6b4cc908f10c5d1 (diff)
uhci: Fix delayed completions for isochronous transfers.
When an isochronous transfer of n frames is scheduled, the last frame i.e. frame number (n - 1) must be set to generate an interrupt. ok mpi
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 89a8c301ef1..b4f43044561 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.146 2019/03/11 17:50:09 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.147 2019/03/12 08:13:50 ratchov Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -2188,7 +2188,7 @@ uhci_device_isoc_start(struct usbd_xfer *xfer)
#endif
/* Find the last TD */
- i = ux->curframe + xfer->nframes;
+ i = ux->curframe + (xfer->nframes - 1);
if (i >= UHCI_VFRAMELIST_COUNT)
i -= UHCI_VFRAMELIST_COUNT;
end = upipe->u.iso.stds[i];