Module Name:    src
Committed By:   riastradh
Date:           Wed Feb 19 16:00:28 UTC 2020

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

Log Message:
Abort default pipe too on detach before detaching children.

This ensures that pending xfers on the default pipe will be aborted
before we wait for children, which, in the case of scsibus -> sd,
means waiting for pending xfers to complete -- xfers that may never
complete if something is wedged.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/dev/usb/umass.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/umass.c
diff -u src/sys/dev/usb/umass.c:1.176 src/sys/dev/usb/umass.c:1.177
--- src/sys/dev/usb/umass.c:1.176	Fri Dec  6 07:12:39 2019
+++ src/sys/dev/usb/umass.c	Wed Feb 19 16:00:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.176 2019/12/06 07:12:39 maxv Exp $	*/
+/*	$NetBSD: umass.c,v 1.177 2020/02/19 16:00:28 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.176 2019/12/06 07:12:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.177 2020/02/19 16:00:28 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -809,6 +809,7 @@ umass_detach(device_t self, int flags)
 		if (sc->sc_pipe[i] != NULL)
 			usbd_abort_pipe(sc->sc_pipe[i]);
 	}
+	usbd_abort_default_pipe(sc->sc_udev);
 
 	/* Do we really need reference counting?  Perhaps in ioctl() */
 	mutex_enter(&sc->sc_lock);

Reply via email to