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.
This commit is contained in:
Warner Losh 2018-11-13 23:53:24 +00:00
parent a760c50c9e
commit eea18fdb02
3 changed files with 0 additions and 20 deletions

View File

@ -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);

View File

@ -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);

View File

@ -131,12 +131,5 @@ struct error_desc {
/* ------------------------ */
#if (__FreeBSD_version >= 700000)
#include <sys/clock.h>
#define TWS_LOCAL_TIME (time_second - utc_offset())
#else
#include <machine/clock.h>
#define TWS_LOCAL_TIME (time_second - (tz_minuteswest * 60) - \
(wall_cmos_clock ? adjkerntz : 0))
#endif