summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/siop.c6
-rw-r--r--sys/dev/ic/siop_common.c29
-rw-r--r--sys/dev/ic/siopreg.h4
-rw-r--r--sys/dev/ic/siopvar_common.h4
4 files changed, 20 insertions, 23 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 333f0d8f547..45c2f961c20 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.9 2001/06/24 22:00:01 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.10 2001/06/25 23:14:39 krw Exp $ */
/* $NetBSD: siop.c,v 1.39 2001/02/11 18:04:49 bouyer Exp $ */
/*
@@ -740,7 +740,7 @@ scintr:
if ((siop_target->flags & TARF_SYNC)
== 0) {
siop_target->status = TARST_OK;
- siop_print_info(xs->sc_link);
+ siop_print_info(sc, target);
/* no table to flush here */
CALL_SCRIPT(Ent_msgin_ack);
return 1;
@@ -756,7 +756,7 @@ scintr:
} else if (msg == MSG_EXTENDED &&
extmsg == MSG_EXT_SDTR) {
siop_target->status = TARST_OK;
- siop_print_info(xs->sc_link);
+ siop_print_info(sc, target);
/* no table to flush here */
CALL_SCRIPT(Ent_msgin_ack);
return 1;
diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c
index 50dc9f2e4d2..a067860bf67 100644
--- a/sys/dev/ic/siop_common.c
+++ b/sys/dev/ic/siop_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_common.c,v 1.7 2001/06/24 18:28:10 krw Exp $ */
+/* $OpenBSD: siop_common.c,v 1.8 2001/06/25 23:14:40 krw Exp $ */
/* $NetBSD: siop_common.c,v 1.12 2001/02/11 18:04:50 bouyer Exp $ */
/*
@@ -155,7 +155,7 @@ siop_setuptables(siop_cmd)
siop_sdtr_msg(siop_cmd, 1, sc->min_st_sync, sc->maxoff);
} else {
sc->targets[target]->status = TARST_OK;
- siop_print_info(xs->sc_link);
+ siop_print_info(sc, target);
}
} else if (sc->targets[target]->status == TARST_OK &&
(targ_flags & TARF_TAG) &&
@@ -251,7 +251,7 @@ siop_ppr_neg(siop_cmd)
(siop_target->id & 0xff));
siop_target->status = TARST_OK;
- siop_print_info(siop_cmd->xs->sc_link);
+ siop_print_info(sc, target);
return (SIOP_NEG_ACK);
}
@@ -301,7 +301,7 @@ siop_wdtr_neg(siop_cmd)
printf("%s: rejecting invalid wide negotiation from "
"target %d (%d)\n", sc->sc_dev.dv_xname, target,
tables->msg_in[3]);
- siop_print_info(siop_cmd->xs->sc_link);
+ siop_print_info(sc, target);
tables->t_msgout.count= htole32(1);
tables->msg_out[0] = MSG_MESSAGE_REJECT;
return SIOP_NEG_MSGOUT;
@@ -317,7 +317,7 @@ siop_wdtr_neg(siop_cmd)
return SIOP_NEG_MSGOUT;
} else {
siop_target->status = TARST_OK;
- siop_print_info(siop_cmd->xs->sc_link);
+ siop_print_info(sc, target);
return SIOP_NEG_ACK;
}
} else {
@@ -338,7 +338,7 @@ siop_wdtr_neg(siop_cmd)
*/
if (siop_target->status != TARST_PROBING) {
siop_target->status = TARST_OK;
- siop_print_info(siop_cmd->xs->sc_link);
+ siop_print_info(sc, target);
}
siop_wdtr_msg(siop_cmd, 0, (siop_target->flags & TARF_ISWIDE) ?
MSG_EXT_WDTR_BUS_16_BIT : MSG_EXT_WDTR_BUS_8_BIT);
@@ -428,7 +428,7 @@ end:
if (siop_target->status != TARST_PROBING) {
siop_target->status = TARST_OK;
- siop_print_info(siop_cmd->xs->sc_link);
+ siop_print_info(sc, target);
}
if (send_msgout) {
@@ -682,21 +682,18 @@ siop_resetbus(sc)
* target->status is set to TARST_OK.
*/
void
-siop_print_info(sc_link)
- struct scsi_link *sc_link;
+siop_print_info(sc, target)
+ struct siop_softc *sc;
+ int target;
{
struct siop_target *siop_target;
- struct siop_softc *sc;
u_int8_t scf, offset;
- int scf_index, factors, target, i;
-
- sc = (struct siop_softc *)sc_link->adapter_softc;
- target = sc_link->target;
+ int scf_index, factors, i;
siop_target = sc->targets[target];
- printf("%s: negotiated %s%s%s%s%d bit ",
- ((struct device *)sc_link->device_softc)->dv_xname,
+ printf("%s: target %d now using %s%s%s%s%d bit ",
+ sc->sc_dev.dv_xname, target,
(siop_target->flags & TARF_TAG) ? "tagged " : "",
(siop_target->flags & TARF_ISDT) ? "DT " : "",
(siop_target->flags & TARF_ISQAS) ? "QAS " : "",
diff --git a/sys/dev/ic/siopreg.h b/sys/dev/ic/siopreg.h
index c7bfde8e2a8..cfaa758e086 100644
--- a/sys/dev/ic/siopreg.h
+++ b/sys/dev/ic/siopreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: siopreg.h,v 1.3 2001/04/15 06:01:29 krw Exp $ */
+/* $OpenBSD: siopreg.h,v 1.4 2001/06/25 23:14:40 krw Exp $ */
/* $NetBSD: siopreg.h,v 1.7 2000/10/06 16:35:13 bouyer Exp $ */
/*
@@ -131,7 +131,7 @@ static const struct period_factor period_factor[] __attribute__((__unused__)) =
#define SXFER_MO_SHIFT 0
#define SXFER_MO_MASK 0x1f
-#define SIOP_SDID 0x06 /* SCSI destiation ID, R/W */
+#define SIOP_SDID 0x06 /* SCSI destination ID, R/W */
#define SDID_ENCID_SHIFT 0
#define SDID_ENCID_MASK 0x07
diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h
index 79e2a9f6afb..6b2b8991b5d 100644
--- a/sys/dev/ic/siopvar_common.h
+++ b/sys/dev/ic/siopvar_common.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: siopvar_common.h,v 1.5 2001/06/24 18:28:10 krw Exp $ */
+/* $OpenBSD: siopvar_common.h,v 1.6 2001/06/25 23:14:40 krw Exp $ */
/* $NetBSD: siopvar_common.h,v 1.10 2001/01/26 21:58:56 bouyer Exp $ */
/*
@@ -209,7 +209,7 @@ void siop_ppr_msg __P((struct siop_cmd *, int, int, int));
#define SIOP_NEG_ACK 0x2
#define SIOP_NEG_MSGREJ 0x3
-void siop_print_info __P((struct scsi_link *));
+void siop_print_info __P((struct siop_softc *, int));
void siop_minphys __P((struct buf *));
void siop_sdp __P((struct siop_cmd *));
void siop_clearfifo __P((struct siop_softc *));