Update frlengths after a isoc transfer.

Suggested by Yuri <yuri@tsoft.com>
This commit is contained in:
augustss 2000-11-10 14:11:49 +00:00
parent 1bfab105b0
commit 6836c0bd28
2 changed files with 7 additions and 4 deletions

View File

@ -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);

View File

@ -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;