Module Name: src
Committed By: riastradh
Date: Tue Sep 13 10:32:41 UTC 2022
Modified Files:
src/sys/dev/usb: usbdi.c
Log Message:
usbdi(9): Fix mistake in usbdi.c 1.244.
Need to clear ux_timeout_set only when we finally actually process
the timeout in usbdi_xfer_timeout_task, not in the callout which
schedules the task which asserts that the timeout is still set on
entry.
Must've exported the wrong version of my change from git.
To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/dev/usb/usbdi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.245 src/sys/dev/usb/usbdi.c:1.246
--- src/sys/dev/usb/usbdi.c:1.245 Tue Sep 13 09:47:17 2022
+++ src/sys/dev/usb/usbdi.c Tue Sep 13 10:32:41 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.245 2022/09/13 09:47:17 riastradh Exp $ */
+/* $NetBSD: usbdi.c,v 1.246 2022/09/13 10:32:41 riastradh Exp $ */
/*
* Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.245 2022/09/13 09:47:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.246 2022/09/13 10:32:41 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1642,6 +1642,15 @@ usbd_xfer_timeout_task(void *cookie)
goto out;
/*
+ * After this point, no further timeout probing will happen for
+ * the current incarnation of the timeout, so make the next
+ * usbd_xfer_schedule_timout schedule a new callout.
+ * usbd_xfer_probe_timeout has already processed any reset.
+ */
+ KASSERT(!xfer->ux_timeout_reset);
+ xfer->ux_timeout_set = false;
+
+ /*
* May have completed or been aborted, but we're the only one
* who can time it out. If it has completed or been aborted,
* no need to timeout.
@@ -1683,15 +1692,6 @@ usbd_xfer_probe_timeout(struct usbd_xfer
KASSERT(xfer->ux_timeout_set);
/*
- * After this point, no further timeout probing will happen for
- * the current incarnation of the timeout, so make the next
- * usbd_xfer_schedule_timout schedule a new callout.
- * usbd_xfer_probe_timeout has already processed any reset.
- */
- KASSERT(!xfer->ux_timeout_reset);
- xfer->ux_timeout_set = false;
-
- /*
* Neither callout nor task may be pending; they execute
* alternately in lock step.
*/