diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index a79e55f7fd6..56c781b3b0a 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.19 2007/10/09 23:03:30 krw Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.20 2007/10/20 03:37:05 krw Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -180,7 +180,7 @@ umass_scsi_cmd(struct scsi_xfer *xs) struct umass_softc *sc = sc_link->adapter_softc; struct scsi_generic *cmd; - int cmdlen, dir, s; + int cmdlen, dir, rslt, s; #ifdef UMASS_DEBUG microtime(&sc->tv); @@ -277,14 +277,16 @@ umass_scsi_cmd(struct scsi_xfer *xs) /* Return if command finishes early. */ done: xs->flags |= ITSDONE; + if (xs->flags & SCSI_POLL) + rslt = COMPLETE; + else + rslt = SUCCESSFULLY_QUEUED; s = splbio(); scsi_done(xs); splx(s); - if (xs->flags & SCSI_POLL) - return (COMPLETE); - else - return (SUCCESSFULLY_QUEUED); + + return (rslt); } void |