diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-16 06:42:23 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-16 06:42:23 +0000 |
commit | e49d6153378445e33f52e36468ef7885ab1b56ce (patch) | |
tree | f95b7967b871fe891d206aa68480be3979e51e3a /sys/dev/softraid.c | |
parent | 86011245cc4f8fc88420a96d7045e510339a4f6b (diff) |
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); } |