From 240de1bd24604969a565fffab19cac746055b1d7 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Wed, 11 Aug 2004 04:18:35 +0000 Subject: from netbsd-bugs, pr 26547: Transfers should only be removed if they haven't already completed --- sys/dev/usb/ohci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 11b77de62d6..480ad720484 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.48 2004/08/11 04:17:22 dlg Exp $ */ +/* $OpenBSD: ohci.c,v 1.49 2004/08/11 04:18:34 dlg Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -2248,7 +2248,9 @@ ohci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) for (; p->xfer == xfer; p = n) { hit |= headp == p->physaddr; n = p->nexttd; - ohci_free_std(sc, p); + if (OHCI_TD_GET_CC(le32toh(p->td.td_flags)) == + OHCI_CC_NOT_ACCESSED) + ohci_free_std(sc, p); } /* Zap headp register if hardware pointed inside the xfer. */ if (hit) { -- cgit v1.2.3