summaryrefslogtreecommitdiffstats
path: root/sys/dev/ncv
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/ncv
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/ncv')
-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
4 files changed, 17 insertions, 44 deletions
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_ */
OpenPOWER on IntegriCloud