summaryrefslogtreecommitdiff
path: root/sys/dev/usb/umass.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-07-21 07:49:08 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-07-21 07:49:08 +0000
commit4a2ce4a6686993d21f223795682d59942f571218 (patch)
tree5302a6769123ad2b7c8730d55247eb4e2f7da633 /sys/dev/usb/umass.c
parentf15e7210a1d3236792cc40eedf50e2a4c41c344e (diff)
from netbsd, umass.c 1.116
When starting a bulk-only transfer, punt early if the device is going away. ok krw@
Diffstat (limited to 'sys/dev/usb/umass.c')
-rw-r--r--sys/dev/usb/umass.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index 734cff93434..4904a226f92 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass.c,v 1.31 2004/07/21 07:48:04 dlg Exp $ */
+/* $OpenBSD: umass.c,v 1.32 2004/07/21 07:49:07 dlg Exp $ */
/* $NetBSD: umass.c,v 1.98 2003/09/08 19:30:59 mycroft Exp $ */
/*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
@@ -849,6 +849,9 @@ umass_bbb_transfer(struct umass_softc *sc, int lun, void *cmd, int cmdlen,
("sc->sc_wire == 0x%02x wrong for umass_bbb_transfer\n",
sc->sc_wire));
+ if (sc->sc_dying)
+ return;
+
/* Be a little generous. */
sc->timeout = timeout + USBD_DEFAULT_TIMEOUT;