From 3adcbdf1d8a05729f15df01c74474b7f6392245c Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 13 Nov 2018 23:53:24 +0000 Subject: [PATCH] Remove support for versions prior to FreeBSD 7.0 from twa(4) This was for pre-7.0 CAM support. Neither the CAM nor the busdma changes over the years have not been ifdef'd. The code cannot build on 6.x anymore. Support for 6.4 ended in 2010, so remove them. --- sys/dev/tws/tws.c | 2 -- sys/dev/tws/tws_cam.c | 11 ----------- sys/dev/tws/tws_services.h | 7 ------- 3 files changed, 20 deletions(-) diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index 6b89966e7033..6cb814533ac6 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -445,9 +445,7 @@ tws_setup_intr(struct tws_softc *sc, int irqs) if (!(sc->intr_handle[i])) { if ((error = bus_setup_intr(sc->tws_dev, sc->irq_res[i], INTR_TYPE_CAM | INTR_MPSAFE, -#if (__FreeBSD_version >= 700000) NULL, -#endif tws_intr, sc, &sc->intr_handle[i]))) { tws_log(sc, SETUP_INTR_RES); return(FAILURE); diff --git a/sys/dev/tws/tws_cam.c b/sys/dev/tws/tws_cam.c index f948af092819..a8d75cc8fc20 100644 --- a/sys/dev/tws/tws_cam.c +++ b/sys/dev/tws/tws_cam.c @@ -160,9 +160,7 @@ tws_cam_attach(struct tws_softc *sc) */ sc->sim = cam_sim_alloc(tws_action, tws_poll, "tws", sc, device_get_unit(sc->tws_dev), -#if (__FreeBSD_version >= 700000) &sc->sim_lock, -#endif tws_cam_depth, 1, devq); /* 1, 1, devq); */ if (sc->sim == NULL) { @@ -172,9 +170,7 @@ tws_cam_attach(struct tws_softc *sc) /* Register the bus. */ mtx_lock(&sc->sim_lock); if (xpt_bus_register(sc->sim, -#if (__FreeBSD_version >= 700000) sc->tws_dev, -#endif 0) != CAM_SUCCESS) { cam_sim_free(sc->sim, TRUE); /* passing true will free the devq */ sc->sim = NULL; /* so cam_detach will not try to free it */ @@ -269,7 +265,6 @@ tws_action(struct cam_sim *sim, union ccb *ccb) { TWS_TRACE_DEBUG(sc, "get tran settings", sim, ccb); -#if (__FreeBSD_version >= 700000 ) ccb->cts.protocol = PROTO_SCSI; ccb->cts.protocol_version = SCSI_REV_2; ccb->cts.transport = XPORT_SPI; @@ -279,10 +274,6 @@ tws_action(struct cam_sim *sim, union ccb *ccb) ccb->cts.xport_specific.spi.flags = CTS_SPI_FLAGS_DISC_ENB; ccb->cts.proto_specific.scsi.valid = CTS_SCSI_VALID_TQ; ccb->cts.proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB; -#else - ccb->cts.valid = (CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID); - ccb->cts.flags &= ~(CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB); -#endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -314,13 +305,11 @@ tws_action(struct cam_sim *sim, union ccb *ccb) strlcpy(ccb->cpi.sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(ccb->cpi.hba_vid, "3ware", HBA_IDLEN); strlcpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN); -#if (__FreeBSD_version >= 700000 ) ccb->cpi.transport = XPORT_SPI; ccb->cpi.transport_version = 2; ccb->cpi.protocol = PROTO_SCSI; ccb->cpi.protocol_version = SCSI_REV_2; ccb->cpi.maxio = TWS_MAX_IO_SIZE; -#endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); diff --git a/sys/dev/tws/tws_services.h b/sys/dev/tws/tws_services.h index 9fa3c3799994..22d0b50207dc 100644 --- a/sys/dev/tws/tws_services.h +++ b/sys/dev/tws/tws_services.h @@ -131,12 +131,5 @@ struct error_desc { /* ------------------------ */ -#if (__FreeBSD_version >= 700000) #include #define TWS_LOCAL_TIME (time_second - utc_offset()) -#else -#include -#define TWS_LOCAL_TIME (time_second - (tz_minuteswest * 60) - \ - (wall_cmos_clock ? adjkerntz : 0)) -#endif -