Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Abort default pipe too on detach before detachin...



details:   https://anonhg.NetBSD.org/src/rev/f5f103d403d8
branches:  trunk
changeset: 1007423:f5f103d403d8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Feb 19 16:00:28 2020 +0000

description:
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.

diffstat:

 sys/dev/usb/umass.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ce5518e5a4d1 -r f5f103d403d8 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Wed Feb 19 13:32:40 2020 +0000
+++ b/sys/dev/usb/umass.c       Wed Feb 19 16:00:28 2020 +0000
@@ -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 @@
                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);



Home | Main Index | Thread Index | Old Index