Module Name:    src
Committed By:   skrll
Date:           Tue Apr 25 05:36:03 UTC 2017

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

Log Message:
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)


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 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.157 src/sys/dev/usb/umass.c:1.158
--- src/sys/dev/usb/umass.c:1.157	Mon Nov 21 08:27:30 2016
+++ src/sys/dev/usb/umass.c	Tue Apr 25 05:36:03 2017
@@ -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 @@ umass_detach(device_t self, int flags)
 
 	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. */

Reply via email to