summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1998-09-18 00:46:42 +0000
committermjacob <mjacob@FreeBSD.org>1998-09-18 00:46:42 +0000
commit4cc465448df7c96076c53511536521851b35c503 (patch)
tree95d12b309dc4f7d4076f366ff144da4a4351c54a /sys/dev/isp
parent0cf3eaddd68dfd9c67a82679cb4ffa11a8c011aa (diff)
downloadFreeBSD-src-4cc465448df7c96076c53511536521851b35c503.zip
FreeBSD-src-4cc465448df7c96076c53511536521851b35c503.tar.gz
(requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver
that had depended on it for compilation within or without CAM to use __FreeBSD_version instead).
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp_freebsd.c3
-rw-r--r--sys/dev/isp/isp_freebsd.h23
-rw-r--r--sys/dev/isp/isp_pci.c15
3 files changed, 19 insertions, 22 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 37bbf13..f3935be 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -34,7 +34,8 @@
*/
#include <dev/isp/isp_freebsd.h>
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
+
static void isp_async __P((void *, u_int32_t, struct cam_path *, void *));
static void isp_poll __P((struct cam_sim *));
static void isp_action __P((struct cam_sim *, union ccb *));
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 98c93c1..6677b7c 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -35,14 +35,18 @@
#define _ISP_FREEBSD_H
#define ISP_PLATFORM_VERSION_MAJOR 0
-#define ISP_PLATFORM_VERSION_MINOR 96
+#define ISP_PLATFORM_VERSION_MINOR 97
-#include "opt_scsi.h"
-#ifdef SCSI_CAM
+#include <sys/param.h>
+
+#ifndef __FreeBSD_version
+#define __FreeBSD_version 226000
+#endif
+
+#if __FreeBSD_version >= 300004
#include <dev/isp/isp_freebsd_cam.h>
#else
-#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/buf.h>
@@ -55,15 +59,6 @@
#include <vm/pmap.h>
#include <sys/kernel.h>
-/*
- * Now that __FreeBSD_version is in sys/param.h, we can
- * automatically handle pre-3.0 cases.
- */
-
-#ifndef __FreeBSD_version
-#define __FreeBSD_version 226000
-#endif
-
#define ISP_SCSI_XFER_T struct scsi_xfer
struct isposinfo {
char name[8];
@@ -167,5 +162,5 @@ extern void isp_attach __P((struct ispsoftc *));
#define PVS "Qlogic ISP Driver, FreeBSD Non-Cam"
-#endif /* !SCSI_CAM */
+#endif /* __FreeBSD_version >= 300004 */
#endif /* _ISP_FREEBSD_H */
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index f0d7a75..29ac3ab 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -44,7 +44,7 @@
#include <pci/pcireg.h>
#include <pci/pcivar.h>
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
#include <machine/bus.h>
@@ -55,7 +55,7 @@ static void isp_pci_wr_reg __P((struct ispsoftc *, int, u_int16_t));
static int isp_pci_mbxdma __P((struct ispsoftc *));
static int isp_pci_dmasetup __P((struct ispsoftc *, ISP_SCSI_XFER_T *,
ispreq_t *, u_int8_t *, u_int8_t));
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
static void
isp_pci_dmateardown __P((struct ispsoftc *, ISP_SCSI_XFER_T *, u_int32_t));
#else
@@ -133,7 +133,7 @@ static void isp_pci_attach __P((pcici_t config_d, int unit));
/* This distinguishing define is not right, but it does work */
-#ifndef SCSI_CAM
+#if __FreeBSD_version < 300004
#define IO_SPACE_MAPPING 0
#define MEM_SPACE_MAPPING 1
typedef int bus_space_tag_t;
@@ -168,7 +168,7 @@ struct isp_pcisoftc {
pcici_t pci_id;
bus_space_tag_t pci_st;
bus_space_handle_t pci_sh;
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
bus_dma_tag_t parent_dmat;
bus_dma_tag_t cntrol_dmat;
bus_dmamap_t cntrol_dmap;
@@ -302,7 +302,7 @@ isp_pci_attach(config_id, unit)
return;
}
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
if (bus_dma_tag_create(NULL, 0, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, 1<<24,
255, 1<<24, 0, &pcs->parent_dmat) != 0) {
@@ -411,7 +411,7 @@ isp_pci_wr_reg(isp, regoff, val)
}
}
-#ifdef SCSI_CAM
+#if __FreeBSD_version >= 300004
static void isp_map_rquest __P((void *, bus_dma_segment_t *, int, int));
static void isp_map_result __P((void *, bus_dma_segment_t *, int, int));
static void isp_map_fcscrt __P((void *, bus_dma_segment_t *, int, int));
@@ -758,7 +758,8 @@ isp_pci_dmateardown(isp, ccb, handle)
bus_dmamap_unload(pci->parent_dmat, *dp);
}
-#else /* SCSI_CAM */
+#else /* __FreeBSD_version >= 300004 */
+
static int
isp_pci_mbxdma(isp)
OpenPOWER on IntegriCloud