summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ct/bshw_machdep.c21
-rw-r--r--sys/dev/ct/ct.c42
-rw-r--r--sys/dev/ct/ct_isa.c2
-rw-r--r--sys/dev/ct/ct_machdep.h5
-rw-r--r--sys/dev/ct/ctvar.h1
-rw-r--r--sys/dev/ncv/ncr53c500.c52
-rw-r--r--sys/dev/ncv/ncr53c500_pccard.c1
-rw-r--r--sys/dev/ncv/ncr53c500hw.h2
-rw-r--r--sys/dev/ncv/ncr53c500var.h6
-rw-r--r--sys/dev/nsp/nsp.c70
-rw-r--r--sys/dev/nsp/nsp_pccard.c2
-rw-r--r--sys/dev/nsp/nspvar.h6
-rw-r--r--sys/dev/stg/tmc18c30.c73
-rw-r--r--sys/dev/stg/tmc18c30_isa.c1
-rw-r--r--sys/dev/stg/tmc18c30_pccard.c2
-rw-r--r--sys/dev/stg/tmc18c30_pci.c1
-rw-r--r--sys/dev/stg/tmc18c30_subr.c1
-rw-r--r--sys/dev/stg/tmc18c30var.h6
18 files changed, 93 insertions, 201 deletions
diff --git a/sys/dev/ct/bshw_machdep.c b/sys/dev/ct/bshw_machdep.c
index dacc1e0..674291e 100644
--- a/sys/dev/ct/bshw_machdep.c
+++ b/sys/dev/ct/bshw_machdep.c
@@ -53,9 +53,7 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
-#include <sys/module.h> /* XXX: Hack */
#include <cam/scsi/scsi_low.h>
#include <dev/ic/wd33c93reg.h>
@@ -115,8 +113,9 @@ bshw_bus_reset(ct)
/* open hardware busmaster mode */
if (hw->hw_dma_init != NULL && ((*hw->hw_dma_init)(ct)) != 0)
{
- printf("%s: change mode using external DMA (%x)\n",
- slp->sl_xname, (u_int)ct_cr_read_1(chp, 0x37));
+ device_printf(slp->sl_dev,
+ "change mode using external DMA (%x)\n",
+ (u_int)ct_cr_read_1(chp, 0x37));
}
/* clear hardware synch registers */
@@ -240,7 +239,7 @@ bshw_lc_smit_fstat(ct, wc, read)
}
}
- printf("%s: SMIT fifo status timeout\n", ct->sc_sclow.sl_xname);
+ device_printf(ct->sc_sclow.sl_dev, "SMIT fifo status timeout\n");
return EIO;
}
@@ -279,14 +278,15 @@ bshw_smit_xfer_stop(ct)
else if (count > bs->sc_sdatalen)
{
bad:
- printf("%s: smit_xfer_end: cnt error\n", slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "smit_xfer_end: cnt error\n");
slp->sl_error |= PDMAERR;
}
scsi_low_data_finish(slp);
}
else
{
- printf("%s: smit_xfer_end: phase miss\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "smit_xfer_end: phase miss\n");
slp->sl_error |= PDMAERR;
}
}
@@ -488,8 +488,9 @@ bshw_dma_xfer_stop(ct)
}
else if (count > (u_int) bs->sc_seglen)
{
- printf("%s: port data %x != seglen %x\n",
- slp->sl_xname, count, bs->sc_seglen);
+ device_printf(slp->sl_dev,
+ "port data %x != seglen %x\n",
+ count, bs->sc_seglen);
slp->sl_error |= PDMAERR;
}
@@ -497,7 +498,7 @@ bshw_dma_xfer_stop(ct)
}
else
{
- printf("%s: extra DMA interrupt\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "extra DMA interrupt\n");
slp->sl_error |= PDMAERR;
}
diff --git a/sys/dev/ct/ct.c b/sys/dev/ct/ct.c
index c990dfb..89fe351 100644
--- a/sys/dev/ct/ct.c
+++ b/sys/dev/ct/ct.c
@@ -50,9 +50,6 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
-#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
-
#include <cam/scsi/scsi_low.h>
#include <dev/ic/wd33c93reg.h>
@@ -348,17 +345,6 @@ ctprobesubr(chp, dvcfg, hsid, chipclk, chiprevp)
return 1;
}
-int
-ctprint(aux, name)
- void *aux;
- const char *name;
-{
-
- if (name != NULL)
- printf("%s: scsibus ", name);
- return 1;
-}
-
void
ctattachsubr(ct)
struct ct_softc *ct;
@@ -480,7 +466,6 @@ ct_world_start(ct, fdone)
scsi_low_bus_reset(slp);
cthw_chip_reset(chp, NULL, ct->sc_chipclk, slp->sl_hostid);
- SOFT_INTR_REQUIRED(slp);
return 0;
}
@@ -760,8 +745,8 @@ ct_phase_error(ct, scsi_status)
if (pep->pe_msg != NULL)
{
- printf("%s: phase error: %s",
- slp->sl_xname, pep->pe_msg);
+ device_printf(slp->sl_dev, "phase error: %s",
+ pep->pe_msg);
scsi_low_print(slp, slp->sl_Tnexus);
}
@@ -904,7 +889,7 @@ ct_unbusy(ct)
DELAY(CT_DELAY_INTERVAL);
}
- printf("%s: unbusy timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "unbusy timeout\n");
return EBUSY;
}
@@ -935,7 +920,6 @@ ctintr(arg)
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
struct targ_info *ti;
- struct physio_proc *pp;
struct buf *bp;
u_int derror, flags;
int len, satgo, error;
@@ -974,7 +958,7 @@ again:
if (ct_debug > 0)
{
scsi_low_print(slp, NULL);
- printf("%s: scsi_status 0x%x\n\n", slp->sl_xname,
+ device_printf(slp->sl_dev, "scsi_status 0x%x\n\n",
(u_int) scsi_status);
#ifdef KDB
if (ct_debug > 1)
@@ -1079,9 +1063,7 @@ common_data_phase:
slp->sl_flags |= HW_PDMASTART;
if ((ct->sc_xmode & CT_XMODE_PIO) != 0)
{
- pp = physio_proc_enter(bp);
error = (*ct->ct_pio_xfer_start) (ct);
- physio_proc_leave(pp);
if (error == 0)
{
ct->sc_dma |= CT_DMA_PIOSTART;
@@ -1105,7 +1087,8 @@ common_data_phase:
{
if (!(slp->sl_flags & HW_READ_PADDING))
{
- printf("%s: read padding required\n", slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "read padding required\n");
return 1;
}
}
@@ -1113,7 +1096,8 @@ common_data_phase:
{
if (!(slp->sl_flags & HW_WRITE_PADDING))
{
- printf("%s: write padding required\n", slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "write padding required\n");
return 1;
}
}
@@ -1134,8 +1118,8 @@ common_data_phase:
slp->sl_scp.scp_cmdlen,
SCSI_LOW_WRITE, &derror) != 0)
{
- printf("%s: scsi cmd xfer short\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "scsi cmd xfer short\n");
}
return 1;
@@ -1167,7 +1151,7 @@ common_data_phase:
case BSR_UNSPINFO0:
case BSR_UNSPINFO1:
- printf("%s: illegal bus phase (0x%x)\n", slp->sl_xname,
+ device_printf(slp->sl_dev, "illegal bus phase (0x%x)\n",
(u_int) scsi_status);
scsi_low_print(slp, ti);
return 1;
@@ -1187,8 +1171,8 @@ common_data_phase:
if (ct_xfer(ct, ti->ti_msgoutstr, len,
SCSI_LOW_WRITE, &derror) != 0)
{
- printf("%s: scsi msgout xfer short\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "scsi msgout xfer short\n");
}
SCSI_LOW_DEASSERT_ATN(slp);
ct->sc_atten = 0;
diff --git a/sys/dev/ct/ct_isa.c b/sys/dev/ct/ct_isa.c
index 12d4f52..ac93759 100644
--- a/sys/dev/ct/ct_isa.c
+++ b/sys/dev/ct/ct_isa.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <isa/isavar.h>
#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
#include <cam/scsi/scsi_low.h>
@@ -297,7 +296,6 @@ ct_isa_attach(device_t dev)
slp->sl_dev = dev;
slp->sl_hostid = bs->sc_hostid;
- slp->sl_irq = isa_get_irq(dev);
slp->sl_cfgflags = device_get_flags(dev);
s = splcam();
diff --git a/sys/dev/ct/ct_machdep.h b/sys/dev/ct/ct_machdep.h
index 2e069f5..ceba654 100644
--- a/sys/dev/ct/ct_machdep.h
+++ b/sys/dev/ct/ct_machdep.h
@@ -208,9 +208,4 @@ ct_cmdp_write_1(chp, val)
CT_BUS_WEIGHT(chp)
}
-#if defined(__i386__) && 0
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_CT_MACHDEP_H_ */
diff --git a/sys/dev/ct/ctvar.h b/sys/dev/ct/ctvar.h
index 35f02e3..052542e 100644
--- a/sys/dev/ct/ctvar.h
+++ b/sys/dev/ct/ctvar.h
@@ -132,6 +132,5 @@ struct ct_targ_info {
*****************************************************************/
int ctprobesubr(struct ct_bus_access_handle *, u_int, int, u_int, int *);
void ctattachsubr(struct ct_softc *);
-int ctprint(void *, const char *);
int ctintr(void *);
#endif /* !_CTVAR_H_ */
diff --git a/sys/dev/ncv/ncr53c500.c b/sys/dev/ncv/ncr53c500.c
index 0698707..3bbded4 100644
--- a/sys/dev/ncv/ncr53c500.c
+++ b/sys/dev/ncv/ncr53c500.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
#include <cam/scsi/scsi_low.h>
@@ -326,7 +325,7 @@ ncvhw_power(sc, flags)
if (flags == SCSI_LOW_POWDOWN)
{
- printf("%s power down\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "power down\n");
ncvhw_select_register_1(iot, ioh, &sc->sc_hw);
bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_POWDOWN);
}
@@ -335,13 +334,13 @@ ncvhw_power(sc, flags)
switch (sc->sc_rstep)
{
case 0:
- printf("%s resume step O\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "resume step O\n");
ncvhw_select_register_1(iot, ioh, &sc->sc_hw);
bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_ENGAGE);
break;
case 1:
- printf("%s resume step I\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "resume step I\n");
ncvhw_reset(iot, ioh, &sc->sc_hw);
ncvhw_init(iot, ioh, &sc->sc_hw);
break;
@@ -473,7 +472,6 @@ ncv_world_start(sc, fdone)
(bus_space_read_1(sc->sc_iot, sc->sc_ioh, cr0_istat) & INTR_SBR))
return ENODEV;
- SOFT_INTR_REQUIRED(slp);
return 0;
}
@@ -607,17 +605,6 @@ ncvprobesubr(iot, ioh, dvcfg, hsid)
return 1;
}
-int
-ncvprint(aux, name)
- void *aux;
- const char *name;
-{
-
- if (name != NULL)
- printf("%s: scsibus ", name);
- return 1;
-}
-
void
ncvattachsubr(sc)
struct ncv_softc *sc;
@@ -696,9 +683,9 @@ ncv_pdma_end(sc, ti)
bad:
if ((slp->sl_error & PDMAERR) == 0)
{
- printf("%s: stragne cnt hw 0x%x soft 0x%x\n",
- slp->sl_xname, len,
- slp->sl_scp.scp_datalen);
+ device_printf(slp->sl_dev,
+ "strange cnt hw 0x%x soft 0x%x\n", len,
+ slp->sl_scp.scp_datalen);
}
slp->sl_error |= PDMAERR;
}
@@ -706,7 +693,7 @@ bad:
}
else
{
- printf("%s: data phase miss\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "data phase miss\n");
slp->sl_error |= PDMAERR;
}
@@ -859,7 +846,7 @@ ncv_reselected(sc)
if ((bus_space_read_1(iot, ioh, cr0_sffl) & CR0_SFFLR_BMASK) != 2)
{
- printf("%s illegal fifo bytes\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "illegal fifo bytes\n");
scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "chip confused");
return EJUSTRETURN;
}
@@ -965,7 +952,6 @@ ncvintr(arg)
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
struct targ_info *ti;
- struct physio_proc *pp;
struct buf *bp;
u_int derror, flags;
int len;
@@ -1005,7 +991,7 @@ again:
if (ncv_debug)
{
scsi_low_print(slp, NULL);
- printf("%s st %x ist %x\n\n", slp->sl_xname,
+ device_printf(slp->sl_dev, "st %x ist %x\n\n",
status, ireason);
#ifdef KDB
if (ncv_debug > 1)
@@ -1087,8 +1073,8 @@ again:
ncv_target_nexus_establish(sc);
if ((status & PHASE_MASK) != MESSAGE_IN_PHASE)
{
- printf("%s: unexpected phase after reselect\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "unexpected phase after reselect\n");
slp->sl_error |= FATALIO;
scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1);
return 1;
@@ -1115,14 +1101,13 @@ again:
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
if (slp->sl_scp.scp_datalen <= 0)
{
if ((ireason & INTR_BS) == 0)
break;
if ((slp->sl_error & PDMAERR) == 0)
- printf("%s: data underrun\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "data underrun\n");
slp->sl_error |= PDMAERR;
if ((slp->sl_flags & HW_WRITE_PADDING) != 0)
@@ -1134,8 +1119,8 @@ again:
}
else
{
- printf("%s: write padding required\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "write padding required\n");
}
}
else
@@ -1148,7 +1133,6 @@ again:
}
ncv_pio_write(sc, slp->sl_scp.scp_data, len);
}
- physio_proc_leave(pp);
break;
case DATA_IN_PHASE: /* data in */
@@ -1158,14 +1142,13 @@ again:
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
if (slp->sl_scp.scp_datalen <= 0)
{
if ((ireason & INTR_BS) == 0)
break;
if ((slp->sl_error & PDMAERR) == 0)
- printf("%s: data overrun\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "data overrun\n");
slp->sl_error |= PDMAERR;
if ((slp->sl_flags & HW_READ_PADDING) != 0)
@@ -1176,8 +1159,8 @@ again:
}
else
{
- printf("%s: read padding required\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "read padding required\n");
break;
}
}
@@ -1191,7 +1174,6 @@ again:
}
ncv_pio_read(sc, slp->sl_scp.scp_data, len);
}
- physio_proc_leave(pp);
break;
case COMMAND_PHASE: /* cmd out */
diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c
index ae11067..72df586 100644
--- a/sys/dev/ncv/ncr53c500_pccard.c
+++ b/sys/dev/ncv/ncr53c500_pccard.c
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pccard/pccardvar.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/ncv/ncr53c500reg.h>
#include <dev/ncv/ncr53c500hw.h>
diff --git a/sys/dev/ncv/ncr53c500hw.h b/sys/dev/ncv/ncr53c500hw.h
index 7a4b337..7b9c844 100644
--- a/sys/dev/ncv/ncr53c500hw.h
+++ b/sys/dev/ncv/ncr53c500hw.h
@@ -36,8 +36,6 @@
#ifndef __NCR53C500HW_H_
#define __NCR53C500HW_H_
-#include <compat/netbsd/dvcfg.h>
-
#define NCV_HOSTID 7
#define NCV_NTARGETS 8
#define NCV_NLUNS 8
diff --git a/sys/dev/ncv/ncr53c500var.h b/sys/dev/ncv/ncr53c500var.h
index e465c85..85e3330 100644
--- a/sys/dev/ncv/ncr53c500var.h
+++ b/sys/dev/ncv/ncr53c500var.h
@@ -82,12 +82,6 @@ struct ncv_targ_info {
*****************************************************************/
int ncvprobesubr(bus_space_tag_t, bus_space_handle_t ioh, u_int, int);
void ncvattachsubr(struct ncv_softc *);
-int ncvprint(void *, const char *);
int ncvintr(void *);
-#if defined(__i386__) && 0
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_NCR53C500VAR_H_ */
diff --git a/sys/dev/nsp/nsp.c b/sys/dev/nsp/nsp.c
index b474585..3870d9b 100644
--- a/sys/dev/nsp/nsp.c
+++ b/sys/dev/nsp/nsp.c
@@ -54,9 +54,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/bus.h>
-#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
-
#include <cam/scsi/scsi_low.h>
#include <dev/nsp/nspreg.h>
#include <dev/nsp/nspvar.h>
@@ -229,7 +226,7 @@ nsp_expect_signal(struct nsp_softc *sc, u_int8_t curphase, u_int8_t mask)
DELAY(NSP_DELAY_INTERVAL);
}
- printf("%s: nsp_expect_signal timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "nsp_expect_signal timeout\n");
return -1;
}
@@ -463,7 +460,6 @@ nsp_world_start(sc, fdone)
nsphw_init(sc);
scsi_low_bus_reset(slp);
- SOFT_INTR_REQUIRED(slp);
return 0;
}
@@ -601,17 +597,6 @@ nspprobesubr(iot, ioh, dvcfg)
return 1;
}
-int
-nspprint(aux, name)
- void *aux;
- const char *name;
-{
-
- if (name != NULL)
- printf("%s: scsibus ", name);
- return 1;
-}
-
void
nspattachsubr(sc)
struct nsp_softc *sc;
@@ -761,8 +746,8 @@ nsp_pdma_end(sc, ti)
else
{
slp->sl_error |= PDMAERR;
- printf("%s len %x >= datalen %x\n",
- slp->sl_xname,
+ device_printf(slp->sl_dev,
+ "len %x >= datalen %x\n",
len, slp->sl_scp.scp_datalen);
}
}
@@ -772,8 +757,9 @@ nsp_pdma_end(sc, ti)
sc->sc_cnt > cb->ccb_scp.scp_datalen)
{
slp->sl_error |= PDMAERR;
- printf("%s: data read count error %x != %x (%x)\n",
- slp->sl_xname, sc->sc_cnt, cnt,
+ device_printf(slp->sl_dev,
+ "data read count error %x != %x (%x)\n",
+ sc->sc_cnt, cnt,
cb->ccb_scp.scp_datalen);
}
}
@@ -783,7 +769,7 @@ nsp_pdma_end(sc, ti)
else
{
- printf("%s data phase miss\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "data phase miss\n");
slp->sl_error |= PDMAERR;
}
}
@@ -834,8 +820,8 @@ nsp_read_fifo(sc, suspendio)
#ifdef NSP_DEBUG
if (res < sc->sc_cnt || res == (u_int) -1)
{
- printf("%s: strange fifo ack count 0x%x < 0x%x\n",
- slp->sl_xname, res, sc->sc_cnt);
+ device_printf(slp->sl_dev,
+ "strange fifo ack count 0x%x < 0x%x\n", res, sc->sc_cnt);
return 0;
}
#endif /* NSP_DEBUG */
@@ -845,8 +831,8 @@ nsp_read_fifo(sc, suspendio)
{
if ((slp->sl_error & PDMAERR) == 0)
{
- printf("%s: data overrun 0x%x > 0x%x\n",
- slp->sl_xname, res, slp->sl_scp.scp_datalen);
+ device_printf(slp->sl_dev, "data overrun 0x%x > 0x%x\n",
+ res, slp->sl_scp.scp_datalen);
}
slp->sl_error |= PDMAERR;
@@ -854,7 +840,7 @@ nsp_read_fifo(sc, suspendio)
if ((slp->sl_flags & HW_READ_PADDING) == 0)
{
- printf("%s: read padding required\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "read padding required\n");
return 0;
}
@@ -924,8 +910,9 @@ nsp_write_fifo(sc, suspendio)
#ifdef NSP_DEBUG
if ((slp->sl_scp.scp_datalen % WFIFO_CRIT) != 0)
{
- printf("%s: strange write length 0x%x\n",
- slp->sl_xname, slp->sl_scp.scp_datalen);
+ device_printf(slp->sl_dev,
+ "strange write length 0x%x\n",
+ slp->sl_scp.scp_datalen);
}
#endif /* NSP_DEBUG */
res = slp->sl_scp.scp_datalen % suspendio;
@@ -1071,7 +1058,7 @@ ReadLoop:
if ((-- tout) <= 0)
{
- printf("%s: nsp_pio_read: timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "nsp_pio_read: timeout\n");
return;
}
}
@@ -1183,7 +1170,7 @@ WriteLoop:
if ((-- tout) <= 0)
{
- printf("%s: nsp_pio_write: timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "nsp_pio_write: timeout\n");
return;
}
}
@@ -1215,7 +1202,7 @@ nsp_negate_signal(struct nsp_softc *sc, u_int8_t mask, u_char *s)
DELAY(NSP_DELAY_INTERVAL);
}
- printf("%s: %s nsp_negate_signal timeout\n", slp->sl_xname, s);
+ device_printf(slp->sl_dev, "%s nsp_negate_signal timeout\n", s);
return -1;
}
@@ -1329,9 +1316,9 @@ nsp_error(struct nsp_softc * sc, u_char *s, u_int8_t isrc, u_int8_t ph,
{
struct scsi_low_softc *slp = &sc->sc_sclow;
- printf("%s: %s\n", slp->sl_xname, s);
- printf("%s: isrc 0x%x scmon 0x%x irqphs 0x%x\n",
- slp->sl_xname, (u_int) isrc, (u_int) ph, (u_int) irqphs);
+ device_printf(slp->sl_dev, "%s\n", s);
+ device_printf(slp->sl_dev, "isrc 0x%x scmon 0x%x irqphs 0x%x\n",
+ (u_int) isrc, (u_int) ph, (u_int) irqphs);
}
static int
@@ -1404,8 +1391,8 @@ nsp_phase_match(struct nsp_softc *sc, u_int8_t phase, u_int8_t stat)
if ((stat & SCBUSMON_PHMASK) != phase)
{
- printf("%s: phase mismatch 0x%x != 0x%x\n",
- slp->sl_xname, (u_int) phase, (u_int) stat);
+ device_printf(slp->sl_dev, "phase mismatch 0x%x != 0x%x\n",
+ (u_int) phase, (u_int) stat);
return EINVAL;
}
@@ -1424,7 +1411,6 @@ nspintr(arg)
bus_space_tag_t bst = sc->sc_iot;
bus_space_handle_t bsh = sc->sc_ioh;
struct targ_info *ti;
- struct physio_proc *pp;
struct buf *bp;
u_int derror, flags;
int len, rv;
@@ -1572,8 +1558,8 @@ nspintr(arg)
nsp_target_nexus_establish(sc);
if ((ph & SCBUSMON_PHMASK) != PHASE_MSGIN)
{
- printf("%s: unexpected phase after reselect\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "unexpected phase after reselect\n");
slp->sl_error |= FATALIO;
scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1);
return 1;
@@ -1653,9 +1639,7 @@ nspintr(arg)
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
nsp_pio_write(sc, sc->sc_suspendio);
- physio_proc_leave(pp);
break;
case IRQPHS_DATAIN:
@@ -1665,9 +1649,7 @@ nspintr(arg)
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
nsp_pio_read(sc, sc->sc_suspendio);
- physio_proc_leave(pp);
break;
case IRQPHS_STATUS:
@@ -1864,7 +1846,7 @@ nsp_timeout(sc)
slp->sl_error |= PDMAERR;
if ((slp->sl_flags & HW_WRITE_PADDING) == 0)
{
- printf("%s: write padding required\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "write padding required\n");
break;
}
diff --git a/sys/dev/nsp/nsp_pccard.c b/sys/dev/nsp/nsp_pccard.c
index 0d2162b..08ed66f 100644
--- a/sys/dev/nsp/nsp_pccard.c
+++ b/sys/dev/nsp/nsp_pccard.c
@@ -48,14 +48,12 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
-#include <compat/netbsd/dvcfg.h>
#include <sys/bus.h>
#include <dev/pccard/pccardvar.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/nsp/nspreg.h>
#include <dev/nsp/nspvar.h>
diff --git a/sys/dev/nsp/nspvar.h b/sys/dev/nsp/nspvar.h
index 4aec87c..ec4fd44 100644
--- a/sys/dev/nsp/nspvar.h
+++ b/sys/dev/nsp/nspvar.h
@@ -91,12 +91,6 @@ struct nsp_targ_info {
*****************************************************************/
int nspprobesubr(bus_space_tag_t, bus_space_handle_t, u_int);
void nspattachsubr(struct nsp_softc *);
-int nspprint(void *, const char *);
int nspintr(void *);
-#if defined(__i386__) && 0
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_NSPVAR_H_ */
diff --git a/sys/dev/stg/tmc18c30.c b/sys/dev/stg/tmc18c30.c
index 8e624d4..336f81f 100644
--- a/sys/dev/stg/tmc18c30.c
+++ b/sys/dev/stg/tmc18c30.c
@@ -53,9 +53,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/bus.h>
-#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
-
#include <cam/scsi/scsi_low.h>
#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
@@ -349,7 +346,6 @@ stg_world_start(sc, fdone)
scsi_low_bus_reset(slp);
stghw_init(sc);
- SOFT_INTR_REQUIRED(slp);
return 0;
}
@@ -424,17 +420,6 @@ stgprobesubr(iot, ioh, dvcfg)
return 0;
}
-int
-stgprint(aux, name)
- void *aux;
- const char *name;
-{
-
- if (name != NULL)
- printf("%s: scsibus ", name);
- return 1;
-}
-
void
stgattachsubr(sc)
struct stg_softc *sc;
@@ -494,8 +479,8 @@ stg_pdma_end(sc, ti)
else
{
slp->sl_error |= PDMAERR;
- printf("%s len %x >= datalen %x\n",
- slp->sl_xname,
+ device_printf(slp->sl_dev,
+ "len %x >= datalen %x\n",
len, slp->sl_scp.scp_datalen);
}
}
@@ -505,8 +490,8 @@ stg_pdma_end(sc, ti)
if (len != 0)
{
slp->sl_error |= PDMAERR;
- printf("%s: len %x left in fifo\n",
- slp->sl_xname, len);
+ device_printf(slp->sl_dev,
+ "len %x left in fifo\n", len);
}
}
scsi_low_data_finish(slp);
@@ -514,7 +499,7 @@ stg_pdma_end(sc, ti)
else
{
- printf("%s data phase miss\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "data phase miss\n");
slp->sl_error |= PDMAERR;
}
@@ -583,8 +568,8 @@ stg_pio_read(sc, ti, thold)
slp->sl_error |= PDMAERR;
if ((slp->sl_flags & HW_READ_PADDING) == 0)
{
- printf("%s: read padding required\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "read padding required\n");
break;
}
@@ -612,7 +597,7 @@ stg_pio_read(sc, ti, thold)
}
if (tout <= 0)
- printf("%s: pio read timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "pio read timeout\n");
}
static void
@@ -694,7 +679,7 @@ stg_pio_write(sc, ti, thold)
}
if (tout <= 0)
- printf("%s: pio write timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "pio write timeout\n");
}
static int
@@ -717,7 +702,7 @@ stg_negate_signal(struct stg_softc *sc, u_int8_t mask, u_char *s)
DELAY(STG_DELAY_INTERVAL);
}
- printf("%s: %s stg_negate_signal timeout\n", slp->sl_xname, s);
+ device_printf(slp->sl_dev, "%s stg_negate_signal timeout\n", s);
return -1;
}
@@ -744,7 +729,7 @@ stg_expect_signal(struct stg_softc *sc, u_int8_t phase, u_int8_t mask)
DELAY(STG_DELAY_INTERVAL);
}
- printf("%s: stg_expect_signal timeout\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "stg_expect_signal timeout\n");
return -1;
}
@@ -819,7 +804,7 @@ stg_reselected(sc)
}
else if (slp->sl_Tnexus != NULL)
{
- printf("%s: unexpected termination\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "unexpected termination\n");
stg_disconnected(sc, slp->sl_Tnexus);
}
@@ -843,7 +828,7 @@ stg_reselected(sc)
}
DELAY(1);
}
- printf("%s: reselction timeout I\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "reselction timeout I\n");
return EJUSTRETURN;
reselect_start:
@@ -866,7 +851,7 @@ reselect_start:
goto reselected;
DELAY(1);
}
- printf("%s: reselction timeout II\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "reselction timeout II\n");
return EJUSTRETURN;
reselected:
@@ -996,7 +981,6 @@ stgintr(arg)
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
struct targ_info *ti;
- struct physio_proc *pp;
struct buf *bp;
u_int derror, flags;
int len, s;
@@ -1034,7 +1018,7 @@ stgintr(arg)
if (stg_debug)
{
scsi_low_print(slp, NULL);
- printf("%s: st %x ist %x\n\n", slp->sl_xname,
+ device_printf(slp->sl_dev, "st %x ist %x\n\n",
status, astatus);
#ifdef KDB
if (stg_debug > 1)
@@ -1151,8 +1135,8 @@ arb_fail:
stg_target_nexus_establish(sc);
if ((status & PHASE_MASK) != MESSAGE_IN_PHASE)
{
- printf("%s: unexpected phase after reselect\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev,
+ "unexpected phase after reselect\n");
slp->sl_error |= FATALIO;
scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1);
goto out;
@@ -1189,7 +1173,7 @@ arb_fail:
if (stg_xfer(sc, slp->sl_scp.scp_cmd, slp->sl_scp.scp_cmdlen,
COMMAND_PHASE, 0) != 0)
{
- printf("%s: CMDOUT short\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "CMDOUT short\n");
}
break;
@@ -1200,12 +1184,10 @@ arb_fail:
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
if ((sc->sc_icinit & ICTL_FIFO) != 0)
stg_pio_write(sc, ti, sc->sc_wthold);
else
stg_pio_write(sc, ti, 0);
- physio_proc_leave(pp);
break;
case DATA_IN_PHASE:
@@ -1215,12 +1197,10 @@ arb_fail:
scsi_low_attention(slp);
}
- pp = physio_proc_enter(bp);
if ((sc->sc_icinit & ICTL_FIFO) != 0)
stg_pio_read(sc, ti, sc->sc_rthold);
else
stg_pio_read(sc, ti, 0);
- physio_proc_leave(pp);
break;
case STATUS_PHASE:
@@ -1236,7 +1216,7 @@ arb_fail:
}
if (regv != bus_space_read_1(iot, ioh, tmc_rdata))
{
- printf("%s: STATIN: data mismatch\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "STATIN: data mismatch\n");
}
stg_negate_signal(sc, BSTAT_ACK, "statin<ACK>");
break;
@@ -1258,7 +1238,7 @@ arb_fail:
if (stg_xfer(sc, ti->ti_msgoutstr, len, MESSAGE_OUT_PHASE,
slp->sl_clear_atten) != 0)
{
- printf("%s: MSGOUT short\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "MSGOUT short\n");
}
else
{
@@ -1290,7 +1270,7 @@ arb_fail:
/* read data with ACK */
if (regv != bus_space_read_1(iot, ioh, tmc_rdata))
{
- printf("%s: MSGIN: data mismatch\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "MSGIN: data mismatch\n");
}
/* wait for the ack negated */
@@ -1303,14 +1283,14 @@ arb_fail:
break;
case BUSFREE_PHASE:
- printf("%s: unexpected disconnect\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "unexpected disconnect\n");
stg_disconnected(sc, ti);
break;
default:
slp->sl_error |= FATALIO;
- printf("%s: unknown phase bus %x intr %x\n",
- slp->sl_xname, status, astatus);
+ device_printf(slp->sl_dev, "unknown phase bus %x intr %x\n",
+ status, astatus);
break;
}
@@ -1338,7 +1318,7 @@ stg_timeout(sc)
if (sc->sc_ubf_timeout ++ == 0)
return 0;
- printf("%s: unexpected bus free detected\n", slp->sl_xname);
+ device_printf(slp->sl_dev, "unexpected bus free detected\n");
slp->sl_error |= FATALIO;
scsi_low_print(slp, slp->sl_Tnexus);
stg_disconnected(sc, slp->sl_Tnexus);
@@ -1360,8 +1340,7 @@ stg_timeout(sc)
slp->sl_error |= PDMAERR;
if ((slp->sl_flags & HW_WRITE_PADDING) == 0)
{
- printf("%s: write padding required\n",
- slp->sl_xname);
+ device_printf(slp->sl_dev, "write padding required\n");
break;
}
diff --git a/sys/dev/stg/tmc18c30_isa.c b/sys/dev/stg/tmc18c30_isa.c
index 6d90613..af61cfe 100644
--- a/sys/dev/stg/tmc18c30_isa.c
+++ b/sys/dev/stg/tmc18c30_isa.c
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c
index 1ed169c..bca458f 100644
--- a/sys/dev/stg/tmc18c30_pccard.c
+++ b/sys/dev/stg/tmc18c30_pccard.c
@@ -49,14 +49,12 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <machine/bus.h>
-#include <compat/netbsd/dvcfg.h>
#include <sys/bus.h>
#include <dev/pccard/pccardvar.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
diff --git a/sys/dev/stg/tmc18c30_pci.c b/sys/dev/stg/tmc18c30_pci.c
index 08443d0..4c8fb4c 100644
--- a/sys/dev/stg/tmc18c30_pci.c
+++ b/sys/dev/stg/tmc18c30_pci.c
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcivar.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
diff --git a/sys/dev/stg/tmc18c30_subr.c b/sys/dev/stg/tmc18c30_subr.c
index c1bf9c9..5c88ecd 100644
--- a/sys/dev/stg/tmc18c30_subr.c
+++ b/sys/dev/stg/tmc18c30_subr.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <cam/scsi/scsi_low.h>
-#include <cam/scsi/scsi_low_pisa.h>
#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
diff --git a/sys/dev/stg/tmc18c30var.h b/sys/dev/stg/tmc18c30var.h
index 9dd52ee..9ad698f 100644
--- a/sys/dev/stg/tmc18c30var.h
+++ b/sys/dev/stg/tmc18c30var.h
@@ -90,12 +90,6 @@ struct stg_targ_info {
*****************************************************************/
int stgprobesubr(bus_space_tag_t, bus_space_handle_t, u_int);
void stgattachsubr(struct stg_softc *);
-int stgprint(void *, const char *);
int stgintr(void *);
-#if defined(__i386__) && 0
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_TMC18C30VAR_H_ */
OpenPOWER on IntegriCloud