diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-01-15 05:31:39 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-01-15 05:31:39 +0000 |
commit | 2761e5bb53a1d6d65150c51d5f84dc68bb1daf49 (patch) | |
tree | 276efc68e1c70f280685bcbb2f7885094b221b2f | |
parent | b60aa9823e739c74582e350bad5d6892ed2c1bbb (diff) |
Restore XS_BUSY delay behaviour for buf i/o. Same as for sync path.
ok dlg@
-rw-r--r-- | sys/scsi/cd.c | 13 | ||||
-rw-r--r-- | sys/scsi/sd.c | 13 | ||||
-rw-r--r-- | sys/scsi/ss.c | 13 | ||||
-rw-r--r-- | sys/scsi/ss_mustek.c | 13 | ||||
-rw-r--r-- | sys/scsi/ss_scanjet.c | 13 | ||||
-rw-r--r-- | sys/scsi/st.c | 13 |
6 files changed, 60 insertions, 18 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index b2dc1ad01d6..caee54f26aa 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.161 2010/01/12 23:33:57 dlg Exp $ */ +/* $OpenBSD: cd.c,v 1.162 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -738,16 +738,23 @@ cd_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 8017da081e1..9039252c951 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.180 2010/01/12 08:33:19 dlg Exp $ */ +/* $OpenBSD: sd.c,v 1.181 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -809,16 +809,23 @@ sd_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c index 17b28bde3a3..ecc76b995e5 100644 --- a/sys/scsi/ss.c +++ b/sys/scsi/ss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss.c,v 1.68 2010/01/12 23:33:57 dlg Exp $ */ +/* $OpenBSD: ss.c,v 1.69 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */ /* @@ -745,16 +745,23 @@ ssdone(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/scsi/ss_mustek.c b/sys/scsi/ss_mustek.c index 3cfae288753..ea80d2a8540 100644 --- a/sys/scsi/ss_mustek.c +++ b/sys/scsi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_mustek.c,v 1.18 2010/01/13 01:51:20 krw Exp $ */ +/* $OpenBSD: ss_mustek.c,v 1.19 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */ /* @@ -497,16 +497,23 @@ mustek_read_done(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/scsi/ss_scanjet.c b/sys/scsi/ss_scanjet.c index 81de50c455d..1f2a24484a4 100644 --- a/sys/scsi/ss_scanjet.c +++ b/sys/scsi/ss_scanjet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_scanjet.c,v 1.35 2010/01/13 01:51:20 krw Exp $ */ +/* $OpenBSD: ss_scanjet.c,v 1.36 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */ /* @@ -335,16 +335,23 @@ scanjet_read_done(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 58756f1f988..326a94c2051 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.91 2010/01/12 23:33:57 dlg Exp $ */ +/* $OpenBSD: st.c,v 1.92 2010/01/15 05:31:38 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1155,16 +1155,23 @@ st_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: if (scsi_interpret_sense(xs) != ERESTART) xs->retries = 0; + goto retry; - /* FALLTHROUGH */ case XS_BUSY: + if (xs->retries) { + if (scsi_delay(xs, 1) != ERESTART) + xs->retries = 0; + } + goto retry; + case XS_TIMEOUT: +retry: if (xs->retries--) { scsi_xs_exec(xs); return; } - /* FALLTHROUGH */ + default: bp->b_error = EIO; bp->b_flags |= B_ERROR; |