Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb In umass_detach set sc_dyring so that further at...



details:   https://anonhg.NetBSD.org/src/rev/17d063fcc92f
branches:  trunk
changeset: 823483:17d063fcc92f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Apr 25 05:36:03 2017 +0000

description:
In umass_detach set sc_dyring so that further attempts at transfers will
fail.  This fixes part of

PR/51129 (Disconnecting USB SD card without umount causes file operations to hang)

diffstat:

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

diffs (27 lines):

diff -r 8181eccb1b15 -r 17d063fcc92f sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Mon Apr 24 23:01:45 2017 +0000
+++ b/sys/dev/usb/umass.c       Tue Apr 25 05:36:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass.c,v 1.157 2016/11/21 08:27:30 skrll Exp $        */
+/*     $NetBSD: umass.c,v 1.158 2017/04/25 05:36:03 skrll Exp $        */
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.157 2016/11/21 08:27:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.158 2017/04/25 05:36:03 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -796,6 +796,8 @@
 
        DPRINTFM(UDMASS_USB, "sc %p detached", sc, 0, 0, 0);
 
+       sc->sc_dying = true;
+
        pmf_device_deregister(self);
 
        /* Abort the pipes to wake up any waiting processes. */



Home | Main Index | Thread Index | Old Index