From 6836c0bd288fc28fd4f319c9e2aba09c6e20b3be Mon Sep 17 00:00:00 2001 From: augustss Date: Fri, 10 Nov 2000 14:11:49 +0000 Subject: [PATCH] Update frlengths after a isoc transfer. Suggested by Yuri --- sys/dev/usb/ohci.c | 3 ++- sys/dev/usb/uhci.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 9874b55026ab..82fa6251a6ab 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.93 2000/08/17 23:18:56 augustss Exp $ */ +/* $NetBSD: ohci.c,v 1.94 2000/11/10 14:11:49 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -1285,6 +1285,7 @@ ohci_softintr(struct usbd_bus *bus) (struct ohci_pipe *)xfer->pipe; if (sitd->flags & OHCI_CALL_DONE) { opipe->u.iso.inuse -= xfer->nframes; + /* XXX update frlengths with actual length */ /* XXX xfer->actlen = actlen; */ xfer->status = USBD_NORMAL_COMPLETION; usb_transfer_complete(xfer); diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 3477a0240071..c08d2d7d1464 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.125 2000/09/23 21:00:10 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.126 2000/11/10 14:11:49 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -1329,7 +1329,7 @@ uhci_idone(uhci_intr_info_t *ii) if (xfer->nframes != 0) { /* Isoc transfer, do things differently. */ uhci_soft_td_t **stds = upipe->u.iso.stds; - int i, n, nframes; + int i, n, nframes, len; DPRINTFN(5,("uhci_idone: ii=%p isoc ready\n", ii)); @@ -1347,7 +1347,9 @@ uhci_idone(uhci_intr_info_t *ii) if (++n >= UHCI_VFRAMELIST_COUNT) n = 0; status = le32toh(std->td.td_status); - actlen += UHCI_TD_GET_ACTLEN(status); + len = UHCI_TD_GET_ACTLEN(status); + xfer->frlengths[i] = len; + actlen += len; } upipe->u.iso.inuse -= nframes; xfer->actlen = actlen;