summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2024-11-04 18:27:15 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2024-11-04 18:27:15 +0000
commit42ec9afdec1a68761a20397e315c4a7cc6b68625 (patch)
tree8c6e3c8db5053227c0131f3c5ad9a4b3e5c07fce /sys
parentf3451cf0a2d3cbbcc868ed37d51f97be08ce4b9b (diff)
No need to duplicate the scsi_xfer timeout field in spc_acb.
Tested by & ok aoyama@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/luna88k/dev/mb89352.c11
-rw-r--r--sys/arch/luna88k/dev/mb89352var.h3
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c
index 1ae676b0536..259125a40f0 100644
--- a/sys/arch/luna88k/dev/mb89352.c
+++ b/sys/arch/luna88k/dev/mb89352.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mb89352.c,v 1.34 2022/08/29 02:58:13 jsg Exp $ */
+/* $OpenBSD: mb89352.c,v 1.35 2024/11/04 18:27:14 miod Exp $ */
/* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
@@ -419,7 +419,6 @@ spc_scsi_cmd(struct scsi_xfer *xs)
/* Initialize acb */
acb->xs = xs;
- acb->timeout = xs->timeout;
timeout_set(&xs->stimeout, spc_timeout, acb);
if (xs->flags & SCSI_RESET) {
@@ -453,9 +452,9 @@ spc_scsi_cmd(struct scsi_xfer *xs)
/* Not allowed to use interrupts, use polling instead */
s = splbio();
- if (spc_poll(sc, xs, acb->timeout)) {
+ if (spc_poll(sc, xs, xs->timeout)) {
spc_timeout(acb);
- if (spc_poll(sc, xs, acb->timeout))
+ if (spc_poll(sc, xs, xs->timeout))
spc_timeout(acb);
}
splx(s);
@@ -1724,7 +1723,7 @@ loop:
/* On our first connection, schedule a timeout. */
if ((acb->xs->flags & SCSI_POLL) == 0)
timeout_add_msec(&acb->xs->stimeout,
- acb->timeout);
+ acb->xs->timeout);
sc->sc_state = SPC_CONNECTED;
} else if ((ints & INTS_TIMEOUT) != 0) {
SPC_MISC(("selection timeout "));
@@ -1961,7 +1960,7 @@ spc_abort(struct spc_softc *sc, struct spc_acb *acb)
{
/* 2 secs for the abort */
- acb->timeout = SPC_ABORT_TIMEOUT;
+ acb->xs->timeout = SPC_ABORT_TIMEOUT;
acb->flags |= ACB_ABORT;
if (acb == sc->sc_nexus) {
diff --git a/sys/arch/luna88k/dev/mb89352var.h b/sys/arch/luna88k/dev/mb89352var.h
index 60ae5ebcf87..d7cf11e5588 100644
--- a/sys/arch/luna88k/dev/mb89352var.h
+++ b/sys/arch/luna88k/dev/mb89352var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mb89352var.h,v 1.10 2024/05/22 14:25:47 jsg Exp $ */
+/* $OpenBSD: mb89352var.h,v 1.11 2024/11/04 18:27:14 miod Exp $ */
/* $NetBSD: mb89352var.h,v 1.6 2003/08/02 12:48:09 tsutsui Exp $ */
/* NecBSD: mb89352var.h,v 1.4 1998/03/14 07:31:22 kmatsuda Exp */
@@ -87,7 +87,6 @@ struct spc_acb {
#define ACB_SENSE 0x04
#define ACB_ABORT 0x40
#define ACB_RESET 0x80
- int timeout;
};
/*