From b9b256e49a1595b83c37af4e2bcdf2059934e5a3 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 6 Sep 2012 18:53:33 +0000 Subject: Remove NetBSD compat shims for drivers originally shared with NetBSD/pc98. NetBSD/pc98 was never merged into the main NetBSD tree and is no longer developed. Adding locking to these drivers would have made the compat shims hard to impossible to maintain, so remove the shims to ease future changes. These changes were verified by md5. Some additional shims can be removed that do affect the compiled results that I will probably do in another round. Approved by: nyan (tentatively) --- sys/dev/stg/tmc18c30.c | 50 ++++++++++++------------------------------- sys/dev/stg/tmc18c30_pccard.c | 2 +- sys/dev/stg/tmc18c30var.h | 10 --------- 3 files changed, 15 insertions(+), 47 deletions(-) (limited to 'sys/dev/stg') diff --git a/sys/dev/stg/tmc18c30.c b/sys/dev/stg/tmc18c30.c index cfea4aaeec2e..8e624d47fc5b 100644 --- a/sys/dev/stg/tmc18c30.c +++ b/sys/dev/stg/tmc18c30.c @@ -44,33 +44,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(__FreeBSD__) && __FreeBSD_version >= 500001 #include -#endif /* __FreeBSD__ */ #include #include #include #include -#ifdef __NetBSD__ -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ #include #include @@ -80,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#endif /* __FreeBSD__ */ /*************************************************** * USER SETTINGS @@ -301,7 +279,7 @@ stghw_attention(sc) sc->sc_busc |= BCTL_ATN; sc->sc_busimg |= BCTL_ATN; bus_space_write_1(sc->sc_iot, sc->sc_ioh, tmc_bctl, sc->sc_busimg); - SCSI_LOW_DELAY(10); + DELAY(10); } static void @@ -314,7 +292,7 @@ stghw_bus_reset(sc) bus_space_write_1(iot, ioh, tmc_ictl, 0); bus_space_write_1(iot, ioh, tmc_fctl, 0); stghw_bcr_write_1(sc, BCTL_RST); - SCSI_LOW_DELAY(100000); + DELAY(100000); stghw_bcr_write_1(sc, BCTL_BUSFREE); } @@ -454,7 +432,7 @@ stgprint(aux, name) if (name != NULL) printf("%s: scsibus ", name); - return UNCONF; + return 1; } void @@ -591,7 +569,7 @@ stg_pio_read(sc, ti, thold) break; if (sp->scp_datalen <= 0) break; - SCSI_LOW_DELAY(1); + DELAY(1); continue; } } @@ -691,7 +669,7 @@ stg_pio_write(sc, ti, thold) res = bus_space_read_2(iot, ioh, tmc_fdcnt); if (res > sc->sc_maxwsize / 2) { - SCSI_LOW_DELAY(1); + DELAY(1); continue; } } @@ -736,7 +714,7 @@ stg_negate_signal(struct stg_softc *sc, u_int8_t mask, u_char *s) if ((regv & mask) == 0) return 1; - SCSI_LOW_DELAY(STG_DELAY_INTERVAL); + DELAY(STG_DELAY_INTERVAL); } printf("%s: %s stg_negate_signal timeout\n", slp->sl_xname, s); @@ -763,7 +741,7 @@ stg_expect_signal(struct stg_softc *sc, u_int8_t phase, u_int8_t mask) if ((ph & mask) != 0) return 1; - SCSI_LOW_DELAY(STG_DELAY_INTERVAL); + DELAY(STG_DELAY_INTERVAL); } printf("%s: stg_expect_signal timeout\n", slp->sl_xname); @@ -857,13 +835,13 @@ stg_reselected(sc) if ((regv & (BSTAT_IO | BSTAT_SEL | BSTAT_BSY)) == (BSTAT_IO | BSTAT_SEL)) { - SCSI_LOW_DELAY(1); + DELAY(1); regv = bus_space_read_1(iot, ioh, tmc_bstat); if ((regv & (BSTAT_IO | BSTAT_SEL | BSTAT_BSY)) == (BSTAT_IO | BSTAT_SEL)) goto reselect_start; } - SCSI_LOW_DELAY(1); + DELAY(1); } printf("%s: reselction timeout I\n", slp->sl_xname); return EJUSTRETURN; @@ -886,7 +864,7 @@ reselect_start: regv = bus_space_read_1(iot, ioh, tmc_bstat); if ((regv & (BSTAT_SEL | BSTAT_BSY)) == BSTAT_BSY) goto reselected; - SCSI_LOW_DELAY(1); + DELAY(1); } printf("%s: reselction timeout II\n", slp->sl_xname); return EJUSTRETURN; @@ -983,10 +961,10 @@ stghw_select_targ_wait(sc, mu) { if ((bus_space_read_1(iot, ioh, tmc_bstat) & BSTAT_BSY) == 0) { - SCSI_LOW_DELAY(STGHW_SELECT_INTERVAL); + DELAY(STGHW_SELECT_INTERVAL); continue; } - SCSI_LOW_DELAY(1); + DELAY(1); if ((bus_space_read_1(iot, ioh, tmc_bstat) & BSTAT_BSY) != 0) { return 0; @@ -1060,7 +1038,7 @@ stgintr(arg) status, astatus); #ifdef KDB if (stg_debug > 1) - SCSI_LOW_DEBUGGER("stg"); + kdb_enter(KDB_WHY_CAM, "stg"); #endif /* KDB */ } #endif /* STG_DEBUG */ @@ -1398,7 +1376,7 @@ stg_timeout(sc) if (bus_space_read_2(iot, ioh, tmc_fdcnt) != 0) { - SCSI_LOW_DELAY(1); + DELAY(1); continue; } diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c index 079cfed0b7a9..1ed169cd31c7 100644 --- a/sys/dev/stg/tmc18c30_pccard.c +++ b/sys/dev/stg/tmc18c30_pccard.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include diff --git a/sys/dev/stg/tmc18c30var.h b/sys/dev/stg/tmc18c30var.h index 69e837fc6786..9dd52eeb4af7 100644 --- a/sys/dev/stg/tmc18c30var.h +++ b/sys/dev/stg/tmc18c30var.h @@ -44,15 +44,6 @@ struct stg_softc { struct scsi_low_softc sc_sclow; /* generic data */ -#ifdef __NetBSD__ - bus_space_tag_t sc_iot; - bus_space_tag_t sc_memt; - bus_space_handle_t sc_ioh; - - void *sc_ih; -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ bus_space_tag_t sc_iot; bus_space_tag_t sc_memt; bus_space_handle_t sc_ioh; @@ -65,7 +56,6 @@ struct stg_softc { struct resource *mem_res; void *stg_intrhand; -#endif /* __FreeBSD__ */ int sc_tmaxcnt; u_int sc_chip; /* chip type */ -- cgit v1.3