Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Shake out some bugs from the callout changes.
details: https://anonhg.NetBSD.org/src/rev/f047173fd72d
branches: trunk
changeset: 484038:f047173fd72d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Mar 23 18:59:10 2000 +0000
description:
Shake out some bugs from the callout changes.
diffstat:
sys/dev/usb/uhci.c | 9 ++++++++-
sys/dev/usb/usbdi.c | 12 +++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diffs (63 lines):
diff -r 4113b34e1991 -r f047173fd72d sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Thu Mar 23 17:51:51 2000 +0000
+++ b/sys/dev/usb/uhci.c Thu Mar 23 18:59:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.89 2000/03/23 07:01:46 thorpej Exp $ */
+/* $NetBSD: uhci.c,v 1.90 2000/03/23 18:59:10 thorpej Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -853,6 +853,9 @@
ii = malloc(sizeof(uhci_intr_info_t), M_USBHC, M_NOWAIT);
}
ii->sc = sc;
+#if defined(__NetBSD__)
+ callout_init(&ii->timeout_handle);
+#endif
#if defined(__FreeBSD__)
callout_handle_init(&ii->timeout_handle);
#endif
@@ -864,6 +867,10 @@
uhci_free_intr_info(ii)
uhci_intr_info_t *ii;
{
+#if defined(__NetBSD__) && defined(DIAGNOSTIC)
+ if (callout_pending(&ii->timeout_handle))
+ panic("uhci_free_intr_info: pending callout");
+#endif
LIST_INSERT_HEAD(&uhci_ii_free, ii, list); /* and put on free list */
}
diff -r 4113b34e1991 -r f047173fd72d sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c Thu Mar 23 17:51:51 2000 +0000
+++ b/sys/dev/usb/usbdi.c Thu Mar 23 18:59:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.65 2000/03/08 15:34:10 augustss Exp $ */
+/* $NetBSD: usbdi.c,v 1.66 2000/03/23 18:59:10 thorpej Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -384,6 +384,10 @@
if (xfer == NULL)
return (NULL);
xfer->device = dev;
+#if defined(__NetBSD__)
+ callout_init(&xfer->timo_handle);
+ callout_init(&xfer->abort_handle);
+#endif
DPRINTFN(5,("usbd_alloc_xfer() = %p\n", xfer));
return (xfer);
}
@@ -395,6 +399,12 @@
DPRINTFN(5,("usbd_free_xfer: %p\n", xfer));
if (xfer->rqflags & (URQ_DEV_DMABUF | URQ_AUTO_DMABUF))
usbd_free_buffer(xfer);
+#if defined(__NetBSD__) && defined(DIAGNOSTIC)
+ if (callout_pending(&xfer->timo_handle))
+ panic("usbd_free_xfer: timo_handle pending");
+ if (callout_pending(&xfer->abort_handle))
+ panic("usbd_free_xfer: abort_handle pending");
+#endif
xfer->device->bus->methods->freex(xfer->device->bus, xfer);
return (USBD_NORMAL_COMPLETION);
}
Home |
Main Index |
Thread Index |
Old Index