Module Name:    src
Committed By:   riastradh
Date:           Fri Feb 14 16:47:11 UTC 2020

Modified Files:
        src/sys/dev/usb: uhci.c

Log Message:
Initialize xfer->ux_status in uhci_root_intr_start.

Otherwise, it will be USBD_NOT_STARTED, so usbd_ar_pipe will skip
calling upm_abort.

Candidate fix for PR kern/54963, same problem as reported at:
https://mail-index.NetBSD.org/current-users/2020/02/13/msg037740.html


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/sys/dev/usb/uhci.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/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.290 src/sys/dev/usb/uhci.c:1.291
--- src/sys/dev/usb/uhci.c:1.290	Wed Feb 12 16:02:01 2020
+++ src/sys/dev/usb/uhci.c	Fri Feb 14 16:47:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.290 2020/02/12 16:02:01 riastradh Exp $	*/
+/*	$NetBSD: uhci.c,v 1.291 2020/02/14 16:47:11 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.290 2020/02/12 16:02:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.291 2020/02/14 16:47:11 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -3850,6 +3850,7 @@ uhci_root_intr_abort(struct usbd_xfer *x
 		return;
 
 	KASSERT(sc->sc_intr_xfer == xfer);
+	KASSERT(xfer->ux_status == USBD_IN_PROGRESS);
 	xfer->ux_status = USBD_CANCELLED;
 #ifdef DIAGNOSTIC
 	UHCI_XFER2UXFER(xfer)->ux_isdone = true;
@@ -3907,7 +3908,8 @@ uhci_root_intr_start(struct usbd_xfer *x
 	if (!polling)
 		mutex_exit(&sc->sc_lock);
 
-	return USBD_IN_PROGRESS;
+	xfer->ux_status = USBD_IN_PROGRESS;
+	return xfer->ux_status;
 }
 
 /* Close the root interrupt pipe. */

Reply via email to