The diagnostic code doesn't track busy_free correctly when a
device gets removed. However, when the diagnostic check fails, it is much better to complete the free operation than to abort it, because this just causes an infinite loop.
This commit is contained in:
parent
cf2092aa79
commit
1fb16b2557
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ehci.c,v 1.121 2007/02/09 21:55:29 ad Exp $ */
|
||||
/* $NetBSD: ehci.c,v 1.122 2007/02/10 07:52:29 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004,2005 The NetBSD Foundation, Inc.
|
||||
@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.121 2007/02/09 21:55:29 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.122 2007/02/10 07:52:29 mlelstv Exp $");
|
||||
|
||||
#include "ohci.h"
|
||||
#include "uhci.h"
|
||||
@ -1139,12 +1139,10 @@ ehci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer)
|
||||
if (xfer->busy_free != XFER_BUSY) {
|
||||
printf("ehci_freex: xfer=%p not busy, 0x%08x\n", xfer,
|
||||
xfer->busy_free);
|
||||
return;
|
||||
}
|
||||
xfer->busy_free = XFER_FREE;
|
||||
if (!EXFER(xfer)->isdone) {
|
||||
printf("ehci_freex: !isdone\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SIMPLEQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ohci.c,v 1.180 2007/01/19 22:46:21 drochner Exp $ */
|
||||
/* $NetBSD: ohci.c,v 1.181 2007/02/10 07:52:29 mlelstv Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.180 2007/01/19 22:46:21 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.181 2007/02/10 07:52:29 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -999,7 +999,6 @@ ohci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer)
|
||||
if (xfer->busy_free != XFER_BUSY) {
|
||||
printf("ohci_freex: xfer=%p not busy, 0x%08x\n", xfer,
|
||||
xfer->busy_free);
|
||||
return;
|
||||
}
|
||||
xfer->busy_free = XFER_FREE;
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uhci.c,v 1.206 2007/01/19 22:46:21 drochner Exp $ */
|
||||
/* $NetBSD: uhci.c,v 1.207 2007/02/10 07:52:29 mlelstv Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.206 2007/01/19 22:46:21 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.207 2007/02/10 07:52:29 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -701,12 +701,10 @@ uhci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer)
|
||||
if (xfer->busy_free != XFER_BUSY) {
|
||||
printf("uhci_freex: xfer=%p not busy, 0x%08x\n", xfer,
|
||||
xfer->busy_free);
|
||||
return;
|
||||
}
|
||||
xfer->busy_free = XFER_FREE;
|
||||
if (!UXFER(xfer)->iinfo.isdone) {
|
||||
printf("uhci_freex: !isdone\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
SIMPLEQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.c,v 1.117 2007/01/29 01:52:45 hubertf Exp $ */
|
||||
/* $NetBSD: usbdi.c,v 1.118 2007/02/10 07:52:29 mlelstv Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.117 2007/01/29 01:52:45 hubertf Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.118 2007/02/10 07:52:29 mlelstv Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -770,7 +770,6 @@ usb_transfer_complete(usbd_xfer_handle xfer)
|
||||
if (xfer->busy_free != XFER_ONQU) {
|
||||
printf("usb_transfer_complete: xfer=%p not busy 0x%08x\n",
|
||||
xfer, xfer->busy_free);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user