Author: imp Date: Wed Feb 26 19:39:59 2020 New Revision: 358354 URL: https://svnweb.freebsd.org/changeset/base/358354
Log: Remove support for FreeBSD 4-7. It's doubtful this driver would still work unchanged there. Compile tested only because I no longer have ahc/ahd devices. Modified: head/sys/dev/aic7xxx/aic79xx_osm.h head/sys/dev/aic7xxx/aic7xxx_osm.h head/sys/dev/aic7xxx/aic_osm_lib.c head/sys/dev/aic7xxx/aic_osm_lib.h Modified: head/sys/dev/aic7xxx/aic79xx_osm.h ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_osm.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic79xx_osm.h Wed Feb 26 19:39:59 2020 (r358354) @@ -43,9 +43,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> /* For device_t */ -#if __FreeBSD_version >= 500000 #include <sys/endian.h> -#endif #include <sys/eventhandler.h> #include <sys/kernel.h> #include <sys/malloc.h> @@ -60,13 +58,8 @@ #include <sys/rman.h> -#if __FreeBSD_version >= 500000 #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> -#else -#include <pci/pcireg.h> -#include <pci/pcivar.h> -#endif #include <cam/cam.h> #include <cam/cam_ccb.h> Modified: head/sys/dev/aic7xxx/aic7xxx_osm.h ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx_osm.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic7xxx_osm.h Wed Feb 26 19:39:59 2020 (r358354) @@ -42,39 +42,22 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> /* For device_t */ -#if __FreeBSD_version >= 500000 #include <sys/endian.h> -#endif #include <sys/eventhandler.h> #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/queue.h> -#if __FreeBSD_version < 500000 -#include <pci.h> -#else -#define NPCI 1 -#endif - -#if NPCI > 0 #define AIC_PCI_CONFIG 1 -#endif #include <machine/bus.h> #include <machine/endian.h> #include <machine/resource.h> #include <sys/rman.h> -#if NPCI > 0 -#if __FreeBSD_version >= 500000 #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> -#else -#include <pci/pcireg.h> -#include <pci/pcivar.h> -#endif -#endif #include <cam/cam.h> #include <cam/cam_ccb.h> Modified: head/sys/dev/aic7xxx/aic_osm_lib.c ============================================================================== --- head/sys/dev/aic7xxx/aic_osm_lib.c Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic_osm_lib.c Wed Feb 26 19:39:59 2020 (r358354) @@ -128,23 +128,6 @@ aic_recovery_thread(void *arg) void aic_calc_geometry(struct ccb_calc_geometry *ccg, int extended) { -#if __FreeBSD_version >= 500000 cam_calc_geometry(ccg, extended); -#else - uint32_t size_mb; - uint32_t secs_per_cylinder; - - size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size); - if (size_mb > 1024 && extended) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccg->ccb_h.status = CAM_REQ_CMP; -#endif } Modified: head/sys/dev/aic7xxx/aic_osm_lib.h ============================================================================== --- head/sys/dev/aic7xxx/aic_osm_lib.h Wed Feb 26 19:39:52 2020 (r358353) +++ head/sys/dev/aic7xxx/aic_osm_lib.h Wed Feb 26 19:39:59 2020 (r358354) @@ -36,9 +36,7 @@ */ /******************************** OS Includes *********************************/ -#if __FreeBSD_version >= 500000 #include <sys/mutex.h> -#endif /*************************** Library Symbol Mapping ***************************/ #define AIC_LIB_ENTRY_CONCAT(x, prefix) prefix ## x @@ -71,7 +69,6 @@ #define AIC_SHUTDOWN_RECOVERY AIC_CONST_ENTRY(_SHUTDOWN_RECOVERY) /********************************* Byte Order *********************************/ -#if __FreeBSD_version >= 500000 #define aic_htobe16(x) htobe16(x) #define aic_htobe32(x) htobe32(x) #define aic_htobe64(x) htobe64(x) @@ -85,22 +82,7 @@ #define aic_le16toh(x) le16toh(x) #define aic_le32toh(x) le32toh(x) #define aic_le64toh(x) le64toh(x) -#else -#define aic_htobe16(x) (x) -#define aic_htobe32(x) (x) -#define aic_htobe64(x) (x) -#define aic_htole16(x) (x) -#define aic_htole32(x) (x) -#define aic_htole64(x) (x) -#define aic_be16toh(x) (x) -#define aic_be32toh(x) (x) -#define aic_be64toh(x) (x) -#define aic_le16toh(x) (x) -#define aic_le32toh(x) (x) -#define aic_le64toh(x) (x) -#endif - /************************* Forward Declarations *******************************/ typedef device_t aic_dev_softc_t; typedef union ccb *aic_io_ctx_t; @@ -125,22 +107,11 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) } /****************************** Kernel Threads ********************************/ -#if __FreeBSD_version > 500005 -#if __FreeBSD_version > 800001 #define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#else -#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#endif -#else -#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, fmtstr, arg) -#endif /******************************* Bus Space/DMA ********************************/ -#if __FreeBSD_version >= 501102 #define aic_dma_tag_create(aic, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -150,16 +121,6 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) maxsize, nsegments, maxsegsz, flags, \ busdma_lock_mutex, &aic->platform_data->mtx, \ dma_tagp) -#else -#define aic_dma_tag_create(aic, parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) \ - bus_dma_tag_create(parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) -#endif #define aic_dma_tag_destroy(aic, tag) \ bus_dma_tag_destroy(tag) @@ -191,11 +152,7 @@ aic_wakeup_recovery_thread(struct aic_softc *aic) #include AIC_CORE_INCLUDE /***************************** Timer Facilities *******************************/ -#if __FreeBSD_version >= 500000 #define aic_timer_init(timer) callout_init(timer, /*mpsafe*/1) -#else -#define aic_timer_init callout_init -#endif #define aic_timer_stop callout_stop static __inline void aic_timer_reset(aic_timer_t *, u_int, _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"