summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2013-01-16 06:42:23 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2013-01-16 06:42:23 +0000
commite49d6153378445e33f52e36468ef7885ab1b56ce (patch)
treef95b7967b871fe891d206aa68480be3979e51e3a /sys
parent86011245cc4f8fc88420a96d7045e510339a4f6b (diff)
Set resid to zero if the scsi transfer completed without error.
ok krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c5
-rw-r--r--sys/dev/softraid_aoe.c4
-rw-r--r--sys/dev/softraid_concat.c3
-rw-r--r--sys/dev/softraid_crypto.c4
-rw-r--r--sys/dev/softraid_raid0.c3
-rw-r--r--sys/dev/softraid_raid1.c3
-rw-r--r--sys/dev/softraid_raid6.c6
-rw-r--r--sys/dev/softraid_raidp.c6
8 files changed, 13 insertions, 21 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);
}
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index c7d388bf6c2..f2cab3dc29c 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.28 2013/01/15 09:28:29 jsing Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.29 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -504,8 +504,6 @@ sr_aoe_request_done(struct aoe_req *ar, struct aoe_packet *ap)
else
xs->error = XS_NOERROR;
- xs->resid = 0;
-
sr_scsi_done(sd, xs);
}
splx(s);
diff --git a/sys/dev/softraid_concat.c b/sys/dev/softraid_concat.c
index 76185df0451..345f488f60c 100644
--- a/sys/dev/softraid_concat.c
+++ b/sys/dev/softraid_concat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_concat.c,v 1.5 2013/01/15 09:28:29 jsing Exp $ */
+/* $OpenBSD: softraid_concat.c,v 1.6 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
@@ -290,7 +290,6 @@ sr_concat_intr(struct buf *bp)
goto bad;
xs->error = XS_NOERROR;
- xs->resid = 0;
pend = 0;
TAILQ_FOREACH(wup, &sd->sd_wu_pendq, swu_link) {
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 39c8ed86fc2..f77df472ab1 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.84 2013/01/15 09:28:29 jsing Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.85 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -1400,8 +1400,6 @@ sr_crypto_finish_io(struct sr_workunit *wu)
DNPRINTF(SR_D_INTR, "%s: sr_crypto_finish_io: wu %x xs: %x\n",
DEVNAME(sc), wu, xs);
- xs->resid = 0;
-
if (wu->swu_cb_active == 1)
panic("%s: sr_crypto_finish_io", DEVNAME(sd->sd_sc));
TAILQ_FOREACH(ccb, &wu->swu_ccb, ccb_link) {
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c
index 3946e50900d..9b8228f27dc 100644
--- a/sys/dev/softraid_raid0.c
+++ b/sys/dev/softraid_raid0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid0.c,v 1.29 2013/01/15 09:28:29 jsing Exp $ */
+/* $OpenBSD: softraid_raid0.c,v 1.30 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
*
@@ -316,7 +316,6 @@ sr_raid0_intr(struct buf *bp)
goto bad;
xs->error = XS_NOERROR;
- xs->resid = 0;
pend = 0;
TAILQ_FOREACH(wup, &sd->sd_wu_pendq, swu_link) {
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 832bf76341a..8cb0b3b0d9e 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.35 2013/01/16 06:29:14 jsing Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.36 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -578,7 +578,6 @@ sr_raid1_intr(struct buf *bp)
}
xs->error = XS_NOERROR;
- xs->resid = 0;
pend = 0;
TAILQ_FOREACH(wup, &sd->sd_wu_pendq, swu_link) {
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c
index a7f34cda73e..33f7c7f56d6 100644
--- a/sys/dev/softraid_raid6.c
+++ b/sys/dev/softraid_raid6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid6.c,v 1.30 2013/01/16 06:29:14 jsing Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.31 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -801,10 +801,8 @@ sr_raid6_intr(struct buf *bp)
}
}
- if (xs != NULL) {
+ if (xs != NULL)
xs->error = XS_NOERROR;
- xs->resid = 0;
- }
pend = 0;
TAILQ_FOREACH(wup, &sd->sd_wu_pendq, swu_link) {
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 66cbb7e1fc5..0615d7bb06e 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.27 2013/01/16 06:29:14 jsing Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.28 2013/01/16 06:42:22 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -618,10 +618,8 @@ sr_raidp_intr(struct buf *bp)
}
}
- if (xs != NULL) {
+ if (xs != NULL)
xs->error = XS_NOERROR;
- xs->resid = 0;
- }
pend = 0;
TAILQ_FOREACH(wup, &sd->sd_wu_pendq, swu_link) {