summaryrefslogtreecommitdiffstats
path: root/sys/dev/nsp
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-09-10 18:49:49 +0000
committerjhb <jhb@FreeBSD.org>2012-09-10 18:49:49 +0000
commite8b429e1c01142a8519cb45be7b66c9f23690329 (patch)
tree247aba6fba3dbb9041c219b06545b228367dfea3 /sys/dev/nsp
parent29f227442cac272c9c7225f523e3dd479ef5c772 (diff)
downloadFreeBSD-src-e8b429e1c01142a8519cb45be7b66c9f23690329.zip
FreeBSD-src-e8b429e1c01142a8519cb45be7b66c9f23690329.tar.gz
Remove some more NetBSD compat shims and other unused bits from these
drivers: - Remove scsi_low_pisa.*, they were unused. - Remove <compat/netbsd/physio_proc.h> and calls to the stubs in that header. They were empty nops. - Retire sl_xname and use device_get_nameunit() and device_printf() with the underlying device_t instead. - Remove unused {ct,ncv,nsp,stg}print() functions. - Remove empty SOFT_INTR_REQUIRED() macro and the unused sl_irq member.
Diffstat (limited to 'sys/dev/nsp')
-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
3 files changed, 26 insertions, 52 deletions
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_ */
OpenPOWER on IntegriCloud