diff options
author | 2013-01-16 06:42:22 +0000 | |
---|---|---|
committer | 2013-01-16 06:42:22 +0000 | |
commit | d44d08587772aba21f1ff84cdb5fa38507f61091 (patch) | |
tree | f682adea5813085ca37b125bcd9dd7a0b9b31a9b /sys/dev/softraid.c | |
parent | Factor out code used to release ccbs from a workunit. (diff) | |
download | wireguard-openbsd-d44d08587772aba21f1ff84cdb5fa38507f61091.tar.xz wireguard-openbsd-d44d08587772aba21f1ff84cdb5fa38507f61091.zip |
Set resid to zero if the scsi transfer completed without error.
ok krw@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index a6ce2e3725c..92e8ccd23fb 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.282 2013/01/16 06:29:14 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.283 2013/01/16 06:42:22 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -2188,6 +2188,9 @@ sr_scsi_done(struct sr_discipline *sd, struct scsi_xfer *xs) { DNPRINTF(SR_D_DIS, "%s: sr_scsi_done: xs %p\n", DEVNAME(sd->sd_sc), xs); + if (xs->error == XS_NOERROR) + xs->resid = 0; + scsi_done(xs); } |