summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-09-13 10:32:41 +0000
committerriastradh <riastradh@NetBSD.org>2022-09-13 10:32:41 +0000
commita50cb576d1c573cb8e6376bc07bd00fb9fe2ad66 (patch)
treed080252bbba12874db19e5495e0c7c644fe2936b /sys/dev/usb
parentaca97603f45f74ac45ea605ff8ad2fae8a3291b4 (diff)
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.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usbdi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 841249e6d9f..28dd31f81c1 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -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 *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.
*/