Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/dev/usb Pull up revision 1.104 (requested by mycrof...
details: https://anonhg.NetBSD.org/src/rev/471a6ba7fe76
branches: netbsd-2-0
changeset: 562179:471a6ba7fe76
user: tron <tron%NetBSD.org@localhost>
date: Fri Jul 23 15:46:53 2004 +0000
description:
Pull up revision 1.104 (requested by mycroft in ticket #688):
ugen_isoc_rintr() may recycle the xfer immediately. Therefore, we avoid
touching the xfer after calling the callback in usb_transfer_complete().
>From PR 25960.
diffstat:
sys/dev/usb/usbdi.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 68b6e46859ad -r 471a6ba7fe76 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c Fri Jul 23 15:45:15 2004 +0000
+++ b/sys/dev/usb/usbdi.c Fri Jul 23 15:46:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */
+/* $NetBSD: usbdi.c,v 1.103.8.1 2004/07/23 15:46:53 tron 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.103 2002/09/27 15:37:38 provos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.103.8.1 2004/07/23 15:46:53 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -758,6 +758,9 @@
{
usbd_pipe_handle pipe = xfer->pipe;
usb_dma_t *dmap = &xfer->dmabuf;
+ int sync = xfer->flags & USBD_SYNCHRONOUS;
+ int erred = xfer->status == USBD_CANCELLED ||
+ xfer->status == USBD_TIMEOUT;
int repeat = pipe->repeat;
int polling;
@@ -842,14 +845,12 @@
pipe->methods->done(xfer);
#endif
- if ((xfer->flags & USBD_SYNCHRONOUS) && !polling)
+ if (sync && !polling)
wakeup(xfer);
if (!repeat) {
/* XXX should we stop the queue on all errors? */
- if ((xfer->status == USBD_CANCELLED ||
- xfer->status == USBD_TIMEOUT) &&
- pipe->iface != NULL) /* not control pipe */
+ if (erred && pipe->iface != NULL) /* not control pipe */
pipe->running = 0;
else
usbd_start_next(pipe);
Home |
Main Index |
Thread Index |
Old Index