Module Name: src Committed By: martin Date: Sat Jul 18 15:09:29 UTC 2020
Modified Files: src/sys/dev/usb [netbsd-9]: usbdi.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1020): sys/dev/usb/usbdi.c: revision 1.203 for both usbd_transfer() and usbd_ar_pipe() be sure to reset the xfer ux_state to XFER_BUSY when removing from the queue. seems to fix an occasional panic i was seeing on pinebook and pinebookpro lately with axen(4). from riastradh@. XXX: pullup-9. To generate a diff of this commit: cvs rdiff -u -r1.182.4.4 -r1.182.4.5 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.182.4.4 src/sys/dev/usb/usbdi.c:1.182.4.5 --- src/sys/dev/usb/usbdi.c:1.182.4.4 Fri Apr 3 12:27:55 2020 +++ src/sys/dev/usb/usbdi.c Sat Jul 18 15:09:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.182.4.4 2020/04/03 12:27:55 martin Exp $ */ +/* $NetBSD: usbdi.c,v 1.182.4.5 2020/07/18 15:09:28 martin 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.182.4.4 2020/04/03 12:27:55 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.182.4.5 2020/07/18 15:09:28 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -337,6 +337,9 @@ usbd_transfer(struct usbd_xfer *xfer) USBHIST_LOG(usbdebug, "xfer failed: %s, reinserting", err, 0, 0, 0); usbd_lock_pipe(pipe); +#ifdef DIAGNOSTIC + xfer->ux_state = XFER_BUSY; +#endif SIMPLEQ_REMOVE_HEAD(&pipe->up_queue, ux_next); if (pipe->up_serialise) usbd_start_next(pipe); @@ -892,6 +895,9 @@ usbd_ar_pipe(struct usbd_pipe *pipe) "(methods = %#jx)", (uintptr_t)pipe, (uintptr_t)xfer, (uintptr_t)pipe->up_methods, 0); if (xfer->ux_status == USBD_NOT_STARTED) { +#ifdef DIAGNOSTIC + xfer->ux_state = XFER_BUSY; +#endif SIMPLEQ_REMOVE_HEAD(&pipe->up_queue, ux_next); } else { /* Make the HC abort it (and invoke the callback). */