Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Nov 2018 23:53:25 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340418 - head/sys/dev/tws
Message-ID:  <201811132353.wADNrPWF094349@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Nov 13 23:53:24 2018
New Revision: 340418
URL: https://svnweb.freebsd.org/changeset/base/340418

Log:
  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.

Modified:
  head/sys/dev/tws/tws.c
  head/sys/dev/tws/tws_cam.c
  head/sys/dev/tws/tws_services.h

Modified: head/sys/dev/tws/tws.c
==============================================================================
--- head/sys/dev/tws/tws.c	Tue Nov 13 23:45:38 2018	(r340417)
+++ head/sys/dev/tws/tws.c	Tue Nov 13 23:53:24 2018	(r340418)
@@ -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);

Modified: head/sys/dev/tws/tws_cam.c
==============================================================================
--- head/sys/dev/tws/tws_cam.c	Tue Nov 13 23:45:38 2018	(r340417)
+++ head/sys/dev/tws/tws_cam.c	Tue Nov 13 23:53:24 2018	(r340418)
@@ -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);
 

Modified: head/sys/dev/tws/tws_services.h
==============================================================================
--- head/sys/dev/tws/tws_services.h	Tue Nov 13 23:45:38 2018	(r340417)
+++ head/sys/dev/tws/tws_services.h	Tue Nov 13 23:53:24 2018	(r340418)
@@ -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
-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811132353.wADNrPWF094349>