summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev/siop.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-02 06:44:48 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-02 06:44:48 +0000
commita1ab0133973a053ec8cb7034b5f525c772d2c6d6 (patch)
tree348052b6165a33d50f05b52e0989ec9095b81452 /sys/arch/amiga/dev/siop.c
parent357d854e83a35ee1bdb134546c9f0e8b086a8833 (diff)
Sync with NetBSD 9600430. The port has gone over a major -Wall treat
Diffstat (limited to 'sys/arch/amiga/dev/siop.c')
-rw-r--r--sys/arch/amiga/dev/siop.c148
1 files changed, 82 insertions, 66 deletions
diff --git a/sys/arch/amiga/dev/siop.c b/sys/arch/amiga/dev/siop.c
index cd95eeef8fa..fa6348db5e8 100644
--- a/sys/arch/amiga/dev/siop.c
+++ b/sys/arch/amiga/dev/siop.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: siop.c,v 1.6 1996/03/30 22:18:23 niklas Exp $ */
-/* $NetBSD: siop.c,v 1.29 1996/03/15 22:11:15 mhitch Exp $ */
+/* $OpenBSD: siop.c,v 1.7 1996/05/02 06:44:34 niklas Exp $ */
+/* $NetBSD: siop.c,v 1.32 1996/04/28 06:28:24 mhitch Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -59,8 +59,6 @@
#include <amiga/dev/siopreg.h>
#include <amiga/dev/siopvar.h>
-extern u_int kvtop();
-
/*
* SCSI delays
* In u-seconds, primarily for state changes on the SPC.
@@ -73,12 +71,16 @@ void siop_select __P((struct siop_softc *));
void siopabort __P((struct siop_softc *, siop_regmap_p, char *));
void sioperror __P((struct siop_softc *, siop_regmap_p, u_char));
void siopstart __P((struct siop_softc *));
+int siop_checkintr __P((struct siop_softc *, u_char, u_char, u_char, int *));
void siopreset __P((struct siop_softc *));
void siopsetdelay __P((int));
void siop_scsidone __P((struct siop_acb *, int));
void siop_sched __P((struct siop_softc *));
int siop_poll __P((struct siop_softc *, struct siop_acb *));
-int siopintr __P((struct siop_softc *));
+void siopintr __P((struct siop_softc *));
+void scsi_period_to_siop __P((struct siop_softc *, int));
+void siop_start __P((struct siop_softc *, int, int, u_char *, int, u_char *, int));
+void siop_dump_acb __P((struct siop_acb *));
/* 53C710 script */
const
@@ -189,7 +191,7 @@ siop_scsicmd(xs)
struct siop_acb *acb;
struct siop_softc *sc;
struct scsi_link *slp;
- int flags, s, i;
+ int flags, s;
slp = xs->sc_link;
sc = slp->adapter_softc;
@@ -264,7 +266,7 @@ siop_poll(sc, acb)
(SIOP_ISTAT_SIP | SIOP_ISTAT_DIP)) == 0) {
if (--i <= 0) {
#ifdef DEBUG
- printf ("waiting: tgt %d cmd %02x sbcl %02x dsp %x (+%x) dcmd %x ds %x timeout %d\n",
+ printf ("waiting: tgt %d cmd %02x sbcl %02x dsp %lx (+%lx) dcmd %lx ds %p timeout %d\n",
xs->sc_link->target, acb->cmd.opcode,
rp->siop_sbcl, rp->siop_dsp,
rp->siop_dsp - sc->sc_scriptspa,
@@ -308,11 +310,11 @@ siop_sched(sc)
{
struct scsi_link *slp;
struct siop_acb *acb;
- int stat, i;
+ int i;
#ifdef DEBUG
if (sc->sc_nexus) {
- printf("%s: siop_sched- nexus %x/%d ready %x/%d\n",
+ printf("%s: siop_sched- nexus %p/%d ready %p/%d\n",
sc->sc_dev.dv_xname, sc->sc_nexus,
sc->sc_nexus->xs->sc_link->target,
sc->ready_list.tqh_first,
@@ -361,16 +363,17 @@ siop_scsidone(acb, stat)
struct scsi_xfer *xs;
struct scsi_link *slp;
struct siop_softc *sc;
- int s, dosched = 0;
+ int dosched = 0;
-#ifdef DIAGNOSTIC
if (acb == NULL || (xs = acb->xs) == NULL) {
-/* panic("siop_scsidone"); */
- printf("siop_scsidone: sc_nexus NULL\n");
+#ifdef DIAGNOSTIC
+ printf("siop_scsidone: NULL acb or scsi_xfer\n");
+#if defined(DEBUG) && defined(DDB)
Debugger();
+#endif
+#endif
return;
}
-#endif
slp = xs->sc_link;
sc = slp->adapter_softc;
/*
@@ -481,7 +484,9 @@ siopabort(sc, rp, where)
siop_regmap_p rp;
char *where;
{
+#ifdef fix_this
int i;
+#endif
printf ("%s: abort %s: dstat %02x, sstat0 %02x sbcl %02x\n",
sc->sc_dev.dv_xname,
@@ -542,7 +547,7 @@ siopinitialize(sc)
* Also should verify that dev doesn't span non-contiguous
* physical pages.
*/
- sc->sc_scriptspa = kvtop(scripts);
+ sc->sc_scriptspa = kvtop((caddr_t)scripts);
/*
* malloc sc_acb to ensure that DS is on a long word boundary.
@@ -668,7 +673,7 @@ siopreset(sc)
sc->sc_nexus->xs->error = XS_DRIVER_STUFFUP;
siop_scsidone(sc->sc_nexus, sc->sc_nexus->stat[0]);
}
- while (acb = sc->nexus_list.tqh_first) {
+ while ((acb = sc->nexus_list.tqh_first) > 0) {
acb->xs->error = XS_DRIVER_STUFFUP;
siop_scsidone(acb, acb->stat[0]);
}
@@ -700,15 +705,17 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
int len;
{
siop_regmap_p rp = sc->sc_siopp;
- int i;
int nchain;
int count, tcount;
char *addr, *dmaend;
struct siop_acb *acb = sc->sc_nexus;
+#ifdef DEBUG
+ int i;
+#endif
#ifdef DEBUG
if (siop_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
- printf ("ACK! siop was busy: rp %x script %x dsa %x active %d\n",
+ printf ("ACK! siop was busy: rp %p script %p dsa %p active %ld\n",
rp, &scripts, &acb->ds, sc->sc_active);
printf ("istat %02x sfbr %02x lcrc %02x sien %02x dien %02x\n",
rp->siop_istat, rp->siop_sfbr, rp->siop_lcrc,
@@ -813,20 +820,20 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
if (nchain != 1 && len != 0 && siop_debug & 3) {
printf ("DMA chaining set: %d\n", nchain);
for (i = 0; i < nchain; ++i) {
- printf (" [%d] %8x %4x\n", i, acb->ds.chain[i].databuf,
+ printf (" [%d] %8p %lx\n", i, acb->ds.chain[i].databuf,
acb->ds.chain[i].datalen);
}
}
#endif
/* push data cache for all data the 53c710 needs to access */
- dma_cachectl (acb, sizeof (struct siop_acb));
+ dma_cachectl ((caddr_t)acb, sizeof (struct siop_acb));
dma_cachectl (cbuf, clen);
if (buf != NULL && len != 0)
dma_cachectl (buf, len);
#ifdef DEBUG
if (siop_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
- printf ("ACK! siop was busy at start: rp %x script %x dsa %x active %d\n",
+ printf ("ACK! siop was busy at start: rp %p script %p dsa %p active %ld\n",
rp, &scripts, &acb->ds, sc->sc_active);
#ifdef DDB
/*Debugger();*/
@@ -839,7 +846,7 @@ siop_start (sc, target, lun, cbuf, clen, buf, len)
sc->sc_dev.dv_xname);
rp->siop_temp = 0;
rp->siop_sbcl = sc->sc_sync[target].sbcl;
- rp->siop_dsa = kvtop(&acb->ds);
+ rp->siop_dsa = kvtop((caddr_t)&acb->ds);
rp->siop_dsp = sc->sc_scriptspa;
SIOP_TRACE('s',1,0,0)
} else {
@@ -870,7 +877,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
{
siop_regmap_p rp = sc->sc_siopp;
struct siop_acb *acb = sc->sc_nexus;
- int target;
+ int target = 0;
int dfifo, dbc, sstat1;
dfifo = rp->siop_dfifo;
@@ -894,21 +901,23 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#endif
if (rp->siop_dsp && (rp->siop_dsp < sc->sc_scriptspa ||
rp->siop_dsp >= sc->sc_scriptspa + sizeof(scripts))) {
- printf ("%s: dsp not within script dsp %x scripts %x:%x",
+ printf ("%s: dsp not within script dsp %lx scripts %lx:%lx",
sc->sc_dev.dv_xname, rp->siop_dsp, sc->sc_scriptspa,
sc->sc_scriptspa + sizeof(scripts));
printf(" istat %x dstat %x sstat0 %x\n",
istat, dstat, sstat0);
+#ifdef DDB
Debugger();
+#endif
}
#endif
SIOP_TRACE('i',dstat,istat,(istat&SIOP_ISTAT_DIP)?rp->siop_dsps&0xff:sstat0);
if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff00) {
/* Normal completion status, or check condition */
#ifdef DEBUG
- if (rp->siop_dsa != kvtop(&acb->ds)) {
- printf ("siop: invalid dsa: %x %x\n", rp->siop_dsa,
- kvtop(&acb->ds));
+ if (rp->siop_dsa != kvtop((caddr_t)&acb->ds)) {
+ printf ("siop: invalid dsa: %lx %x\n", rp->siop_dsa,
+ kvtop((caddr_t)&acb->ds));
panic("*** siop DSA invalid ***");
}
#endif
@@ -998,31 +1007,31 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
if (siop_debug & 0x100) {
int i;
- printf ("Phase mismatch: curbuf %x curlen %x dfifo %x dbc %x sstat1 %x adjust %x sbcl %x starts %d acb %x\n",
+ printf ("Phase mismatch: curbuf %lx curlen %lx dfifo %x dbc %x sstat1 %x adjust %x sbcl %x starts %d acb %p\n",
acb->iob_curbuf, acb->iob_curlen, dfifo,
dbc, sstat1, adjust, rp->siop_sbcl, siopstarts, acb);
if (acb->ds.chain[1].datalen) {
for (i = 0; acb->ds.chain[i].datalen; ++i)
- printf("chain[%d] addr %x len %x\n",
+ printf("chain[%d] addr %p len %lx\n",
i, acb->ds.chain[i].databuf,
acb->ds.chain[i].datalen);
}
}
#endif
- dma_cachectl (acb, sizeof(*acb));
+ dma_cachectl ((caddr_t)acb, sizeof(*acb));
}
#ifdef DEBUG
SIOP_TRACE('m',rp->siop_sbcl,(rp->siop_dsp>>8),rp->siop_dsp);
if (siop_debug & 9)
- printf ("Phase mismatch: %x dsp +%x dcmd %x\n",
+ printf ("Phase mismatch: %x dsp +%lx dcmd %lx\n",
rp->siop_sbcl,
rp->siop_dsp - sc->sc_scriptspa,
*((long *)&rp->siop_dcmd));
#endif
if ((rp->siop_sbcl & SIOP_REQ) == 0) {
- printf ("Phase mismatch: REQ not asserted! %02x dsp %x\n",
+ printf ("Phase mismatch: REQ not asserted! %02x dsp %lx\n",
rp->siop_sbcl, rp->siop_dsp);
-#ifdef DEBUG
+#if defined(DEBUG) && defined(DDB)
Debugger();
#endif
}
@@ -1046,7 +1055,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
printf("%s: Select timeout with no active command?\n",
sc->sc_dev.dv_xname);
if (rp->siop_sbcl & SIOP_BSY) {
- printf ("ACK! siop was busy at timeout: rp %x script %x dsa %x\n",
+ printf ("ACK! siop was busy at timeout: rp %p script %p dsa %p\n",
rp, &scripts, &acb->ds);
printf(" sbcl %x sdid %x istat %x dstat %x sstat0 %x\n",
rp->siop_sbcl, rp->siop_sdid, istat, dstat, sstat0);
@@ -1096,7 +1105,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
rp->siop_dsps == 0xff02)) {
#ifdef DEBUG
if (siop_debug & 0x100)
- printf ("%s: ID %02x disconnected TEMP %x (+%x) curbuf %x curlen %x buf %x len %x dfifo %x dbc %x sstat1 %x starts %d acb %x\n",
+ printf ("%s: ID %02x disconnected TEMP %lx (+%lx) curbuf %lx curlen %lx buf %p len %lx dfifo %x dbc %x sstat1 %x starts %d acb %p\n",
sc->sc_dev.dv_xname, 1 << target, rp->siop_temp,
rp->siop_temp ? rp->siop_temp - sc->sc_scriptspa : 0,
acb->iob_curbuf, acb->iob_curlen,
@@ -1119,7 +1128,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
int n = rp->siop_temp - sc->sc_scriptspa;
if (acb->iob_curlen && acb->iob_curlen != acb->ds.chain[0].datalen)
- printf("%s: iob_curbuf/len already set? n %x iob %x/%x chain[0] %x/%x\n",
+ printf("%s: iob_curbuf/len already set? n %x iob %lx/%lx chain[0] %p/%lx\n",
sc->sc_dev.dv_xname, n, acb->iob_curbuf, acb->iob_curlen,
acb->ds.chain[0].databuf, acb->ds.chain[0].datalen);
if (n < Ent_datain)
@@ -1135,7 +1144,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef DEBUG
if (siop_debug & 0x100) {
printf("%s: TEMP offset %d", sc->sc_dev.dv_xname, n);
- printf(" curbuf %x curlen %x\n", acb->iob_curbuf,
+ printf(" curbuf %lx curlen %lx\n", acb->iob_curbuf,
acb->iob_curlen);
}
#endif
@@ -1168,7 +1177,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
if (i >= DMAMAXIO || acb->ds.chain[i].datalen == 0) {
printf("couldn't find saved data pointer: ");
- printf("curbuf %x curlen %x i %d\n",
+ printf("curbuf %lx curlen %lx i %d\n",
acb->iob_curbuf, acb->iob_curlen, i);
#ifdef DDB
Debugger();
@@ -1176,7 +1185,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
#ifdef DEBUG
if (siop_debug & 0x100)
- printf(" chain[0]: %x/%x -> %x/%x\n",
+ printf(" chain[0]: %p/%lx -> %lx/%lx\n",
acb->ds.chain[0].databuf,
acb->ds.chain[0].datalen,
acb->iob_curbuf,
@@ -1187,7 +1196,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
for (j = 1, ++i; i < DMAMAXIO && acb->ds.chain[i].datalen; ++i, ++j) {
#ifdef DEBUG
if (siop_debug & 0x100)
- printf(" chain[%d]: %x/%x -> %x/%x\n", j,
+ printf(" chain[%d]: %p/%lx -> %p/%lx\n", j,
acb->ds.chain[j].databuf,
acb->ds.chain[j].datalen,
acb->ds.chain[i].databuf,
@@ -1198,7 +1207,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
}
if (j < DMAMAXIO)
acb->ds.chain[j].datalen = 0;
- DCIAS(kvtop(&acb->ds.chain));
+ DCIAS(kvtop((caddr_t)&acb->ds.chain));
}
++sc->sc_tinfo[target].dconns;
/*
@@ -1224,7 +1233,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
sc->sc_sstat1 = rp->siop_sbcl; /* XXXX save current SBCL */
#ifdef DEBUG
if (siop_debug & 0x100)
- printf ("%s: target ID %02x reselected dsps %x\n",
+ printf ("%s: target ID %02x reselected dsps %lx\n",
sc->sc_dev.dv_xname, reselid,
rp->siop_dsps);
if ((rp->siop_sfbr & 0x80) == 0)
@@ -1256,27 +1265,27 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
sc->sc_flags |= acb->status;
acb->status = 0;
DCIAS(kvtop(&acb->stat[0]));
- rp->siop_dsa = kvtop(&acb->ds);
+ rp->siop_dsa = kvtop((caddr_t)&acb->ds);
rp->siop_sxfer = sc->sc_sync[acb->xs->sc_link->target].sxfer;
rp->siop_sbcl = sc->sc_sync[acb->xs->sc_link->target].sbcl;
break;
}
if (acb == NULL) {
- printf("%s: target ID %02x reselect nexus_list %x\n",
+ printf("%s: target ID %02x reselect nexus_list %p\n",
sc->sc_dev.dv_xname, reselid,
sc->nexus_list.tqh_first);
panic("unable to find reselecting device");
}
- dma_cachectl (acb, sizeof(*acb));
+ dma_cachectl ((caddr_t)acb, sizeof(*acb));
rp->siop_temp = 0;
rp->siop_dcntl |= SIOP_DCNTL_STD;
return (0);
}
if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff04) {
+#ifdef DEBUG
u_short ctest2 = rp->siop_ctest2;
/* reselect was interrupted (by Sig_P or select) */
-#ifdef DEBUG
if (siop_debug & 0x100 ||
(ctest2 & SIOP_CTEST2_SIGP) == 0)
printf ("%s: reselect interrupted (Sig_P?) scntl1 %x ctest2 %x sfbr %x istat %x/%x\n",
@@ -1285,6 +1294,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
#endif
/* XXX assumes it was not select */
if (sc->sc_nexus == NULL) {
+#ifdef DEBUG
printf("%s: reselect interrupted, sc_nexus == NULL\n",
sc->sc_dev.dv_xname);
#if 0
@@ -1293,12 +1303,13 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
Debugger();
#endif
#endif
+#endif
rp->siop_dcntl |= SIOP_DCNTL_STD;
return(0);
}
target = sc->sc_nexus->xs->sc_link->target;
rp->siop_temp = 0;
- rp->siop_dsa = kvtop(&sc->sc_nexus->ds);
+ rp->siop_dsa = kvtop((caddr_t)&sc->sc_nexus->ds);
rp->siop_sxfer = sc->sc_sync[target].sxfer;
rp->siop_sbcl = sc->sc_sync[target].sbcl;
rp->siop_dsp = sc->sc_scriptspa;
@@ -1330,7 +1341,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
if (sstat0 == 0 && dstat & SIOP_DSTAT_SIR) {
dma_cachectl (&acb->stat[0], 1);
dma_cachectl (&acb->msg[0], 1);
- printf ("SIOP interrupt: %x sts %x msg %x %x sbcl %x\n",
+ printf ("SIOP interrupt: %lx sts %x msg %x %x sbcl %x\n",
rp->siop_dsps, acb->stat[0], acb->msg[0], acb->msg[1],
rp->siop_sbcl);
siopreset (sc);
@@ -1350,11 +1361,11 @@ bad_phase:
* then panics.
* XXXX need to clean this up to print out the info, reset, and continue
*/
- printf ("siopchkintr: target %x ds %x\n", target, &acb->ds);
- printf ("scripts %x ds %x rp %x dsp %x dcmd %x\n", sc->sc_scriptspa,
- kvtop(&acb->ds), kvtop(rp), rp->siop_dsp,
+ printf ("siopchkintr: target %x ds %p\n", target, &acb->ds);
+ printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n", sc->sc_scriptspa,
+ kvtop((caddr_t)&acb->ds), kvtop((caddr_t)rp), rp->siop_dsp,
*((long *)&rp->siop_dcmd));
- printf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %x dsa %x sbcl %x sts %x msg %x %x sfbr %x\n",
+ printf ("siopchkintr: istat %x dstat %x sstat0 %x dsps %lx dsa %lx sbcl %x sts %x msg %x %x sfbr %x\n",
istat, dstat, sstat0, rp->siop_dsps, rp->siop_dsa,
rp->siop_sbcl, acb->stat[0], acb->msg[0], acb->msg[1], rp->siop_sfbr);
#ifdef DEBUG
@@ -1400,13 +1411,13 @@ siop_select(sc)
}
#ifdef DEBUG
if (siop_debug & 1)
- printf ("siop_select: target %x cmd %02x ds %x\n",
+ printf ("siop_select: target %x cmd %02x ds %p\n",
acb->xs->sc_link->target, acb->cmd.opcode,
&sc->sc_nexus->ds);
#endif
siop_start(sc, acb->xs->sc_link->target, acb->xs->sc_link->lun,
- &acb->cmd, acb->clen, acb->daddr, acb->dleft);
+ (u_char *)&acb->cmd, acb->clen, acb->daddr, acb->dleft);
return;
}
@@ -1415,7 +1426,7 @@ siop_select(sc)
* 53C710 interrupt handler
*/
-int
+void
siopintr (sc)
register struct siop_softc *sc;
{
@@ -1442,7 +1453,7 @@ siopintr (sc)
printf ("%s: intr istat %x dstat %x sstat0 %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0);
if (!sc->sc_active) {
- printf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x nexus %x status %x\n",
+ printf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x nexus %p status %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0,
sc->sc_nexus, sc->sc_nexus ? sc->sc_nexus->stat[0] : 0);
}
@@ -1451,7 +1462,7 @@ siopintr (sc)
#ifdef DEBUG
if (siop_debug & 5) {
DCIAS(kvtop(&sc->sc_nexus->stat[0]));
- printf ("%s: intr istat %x dstat %x sstat0 %x dsps %x sbcl %x sts %x msg %x\n",
+ printf ("%s: intr istat %x dstat %x sstat0 %x dsps %lx sbcl %x sts %x msg %x\n",
sc->sc_dev.dv_xname, istat, dstat, sstat0,
rp->siop_dsps, rp->siop_sbcl,
sc->sc_nexus->stat[0], sc->sc_nexus->msg[0]);
@@ -1490,10 +1501,15 @@ siopintr (sc)
* not be correct for other 53c710 boards.
*
*/
+void
scsi_period_to_siop (sc, target)
struct siop_softc *sc;
+ int target;
{
- int period, offset, i, sxfer, sbcl;
+ int period, offset, sxfer, sbcl = 0;
+#ifdef DEBUG_SYNC
+ int i;
+#endif
period = sc->sc_nexus->msg[4];
offset = sc->sc_nexus->msg[5];
@@ -1564,7 +1580,7 @@ siop_dump_acb(acb)
u_char *b = (u_char *) &acb->cmd;
int i;
- printf("acb@%x ", acb);
+ printf("acb@%p ", acb);
if (acb->xs == NULL) {
printf("<unused>\n");
return;
@@ -1574,10 +1590,10 @@ siop_dump_acb(acb)
for (i = acb->clen; i; --i)
printf(" %02x", *b++);
printf("\n");
- printf(" xs: %08x data %8x:%04x ", acb->xs, acb->xs->data,
+ printf(" xs: %p data %p:%04x ", acb->xs, acb->xs->data,
acb->xs->datalen);
- printf("va %8x:%04x ", acb->iob_buf, acb->iob_len);
- printf("cur %8x:%04x\n", acb->iob_curbuf, acb->iob_curlen);
+ printf("va %p:%lx ", acb->iob_buf, acb->iob_len);
+ printf("cur %lx:%lx\n", acb->iob_curbuf, acb->iob_curlen);
}
void
@@ -1593,23 +1609,23 @@ siop_dump(sc)
#if SIOP_TRACE_SIZE
siop_dump_trace();
#endif
- printf("%s@%x regs %x istat %x\n",
+ printf("%s@%p regs %p istat %x\n",
sc->sc_dev.dv_xname, sc, rp, rp->siop_istat);
- if (acb = sc->free_list.tqh_first) {
+ if ((acb = sc->free_list.tqh_first) > 0) {
printf("Free list:\n");
while (acb) {
siop_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
- if (acb = sc->ready_list.tqh_first) {
+ if ((acb = sc->ready_list.tqh_first) > 0) {
printf("Ready list:\n");
while (acb) {
siop_dump_acb(acb);
acb = acb->chain.tqe_next;
}
}
- if (acb = sc->nexus_list.tqh_first) {
+ if ((acb = sc->nexus_list.tqh_first) > 0) {
printf("Nexus list:\n");
while (acb) {
siop_dump_acb(acb);