[Midnightbsd-cvs] src: dev/wi: Remove legacy freebsd support.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jan 18 14:29:08 EST 2009


Log Message:
-----------
Remove legacy freebsd support.  Switch to "MidnightBSD" os name.

Modified Files:
--------------
    src/sys/dev/aha:
        aha.c (r1.2 -> r1.3)
    src/sys/dev/ahb:
        ahb.c (r1.4 -> r1.5)
    src/sys/dev/aic:
        aic.c (r1.2 -> r1.3)
    src/sys/dev/aic7xxx:
        aic79xx.c (r1.1.1.3 -> r1.2)
        aic79xx_osm.h (r1.1.1.3 -> r1.2)
        aic7xxx.c (r1.1.1.3 -> r1.2)
        aic7xxx_osm.h (r1.1.1.3 -> r1.2)
        aic_osm_lib.c (r1.1.1.3 -> r1.2)
        aic_osm_lib.h (r1.1.1.3 -> r1.2)
    src/sys/dev/wds:
        wd7000.c (r1.2 -> r1.3)
    src/sys/dev/wi:
        if_wireg.h (r1.2 -> r1.3)

-------------- next part --------------
Index: ahb.c
===================================================================
RCS file: /home/cvs/src/sys/dev/ahb/ahb.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -L sys/dev/ahb/ahb.c -L sys/dev/ahb/ahb.c -u -r1.4 -r1.5
--- sys/dev/ahb/ahb.c
+++ sys/dev/ahb/ahb.c
@@ -1229,7 +1229,7 @@
 		cpi->initiator_id = ahb->scsi_id;
 		cpi->bus_id = cam_sim_bus(sim);
 		cpi->base_transfer_speed = 3300;
-		strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+		strncpy(cpi->sim_vid, "MidnightBSD", SIM_IDLEN);
 		strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
 		cpi->unit_number = cam_sim_unit(sim);
Index: aic.c
===================================================================
RCS file: /home/cvs/src/sys/dev/aic/aic.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -L sys/dev/aic/aic.c -L sys/dev/aic/aic.c -u -r1.2 -r1.3
--- sys/dev/aic/aic.c
+++ sys/dev/aic/aic.c
@@ -287,7 +287,7 @@
                 cpi->initiator_id = aic->initiator;
                 cpi->bus_id = cam_sim_bus(sim);
 		cpi->base_transfer_speed = 3300;
-                strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+                strncpy(cpi->sim_vid, "MidnightBSD", SIM_IDLEN);
                 strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
                 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
                 cpi->unit_number = cam_sim_unit(sim);
Index: aic_osm_lib.c
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic_osm_lib.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic_osm_lib.c -L sys/dev/aic7xxx/aic_osm_lib.c -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic_osm_lib.c
+++ sys/dev/aic7xxx/aic_osm_lib.c
@@ -131,23 +131,6 @@
 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
 }
 
Index: aic79xx_osm.h
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic79xx_osm.h,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic79xx_osm.h -L sys/dev/aic7xxx/aic79xx_osm.h -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic79xx_osm.h
+++ sys/dev/aic7xxx/aic79xx_osm.h
@@ -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>
@@ -59,13 +57,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>
Index: aic7xxx_osm.h
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic7xxx_osm.h,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic7xxx_osm.h -L sys/dev/aic7xxx/aic7xxx_osm.h -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic7xxx_osm.h
+++ sys/dev/aic7xxx/aic7xxx_osm.h
@@ -42,20 +42,14 @@
 #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
@@ -67,13 +61,8 @@
 #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>
Index: aic79xx.c
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic79xx.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic79xx.c -L sys/dev/aic7xxx/aic79xx.c -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic79xx.c
+++ sys/dev/aic7xxx/aic79xx.c
@@ -2234,7 +2234,6 @@
 			printerror = 0;
 		} else if (ahd_sent_msg(ahd, AHDMSG_1B,
 					MSG_BUS_DEV_RESET, TRUE)) {
-#ifdef __FreeBSD__
 			/*
 			 * Don't mark the user's request for this BDR
 			 * as completing with CAM_BDR_SENT.  CAM3
@@ -2246,7 +2245,6 @@
 					  CAM_LUN_WILDCARD, SCB_LIST_NULL,
 					  ROLE_INITIATOR))
 				aic_set_transaction_status(scb, CAM_REQ_CMP);
-#endif
 			ahd_handle_devreset(ahd, &devinfo, CAM_LUN_WILDCARD,
 					    CAM_BDR_SENT, "Bus Device Reset",
 					    /*verbose_level*/0);
@@ -5225,23 +5223,11 @@
 {
 	struct  ahd_softc *ahd;
 
-#ifndef	__FreeBSD__
-	ahd = malloc(sizeof(*ahd), M_DEVBUF, M_NOWAIT);
-	if (!ahd) {
-		printf("aic7xxx: cannot malloc softc!\n");
-		free(name, M_DEVBUF);
-		return NULL;
-	}
-#else
 	ahd = device_get_softc((device_t)platform_arg);
-#endif
 	memset(ahd, 0, sizeof(*ahd));
 	ahd->seep_config = malloc(sizeof(*ahd->seep_config),
 				  M_DEVBUF, M_NOWAIT);
 	if (ahd->seep_config == NULL) {
-#ifndef	__FreeBSD__
-		free(ahd, M_DEVBUF);
-#endif
 		free(name, M_DEVBUF);
 		return (NULL);
 	}
@@ -5427,9 +5413,6 @@
 		free(ahd->seep_config, M_DEVBUF);
 	if (ahd->saved_stack != NULL)
 		free(ahd->saved_stack, M_DEVBUF);
-#ifndef __FreeBSD__
-	free(ahd, M_DEVBUF);
-#endif
 	return;
 }
 
Index: aic7xxx.c
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic7xxx.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic7xxx.c -L sys/dev/aic7xxx/aic7xxx.c -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic7xxx.c
+++ sys/dev/aic7xxx/aic7xxx.c
@@ -1280,7 +1280,6 @@
 				printerror = 0;
 			} else if (ahc_sent_msg(ahc, AHCMSG_1B,
 						MSG_BUS_DEV_RESET, TRUE)) {
-#ifdef __FreeBSD__
 				/*
 				 * Don't mark the user's request for this BDR
 				 * as completing with CAM_BDR_SENT.  CAM3
@@ -1294,7 +1293,6 @@
 						  ROLE_INITIATOR)) {
 					aic_set_transaction_status(scb, CAM_REQ_CMP);
 				}
-#endif
 				ahc_compile_devinfo(&devinfo,
 						    initiator_role_id,
 						    target,
@@ -3903,23 +3901,11 @@
 	struct  ahc_softc *ahc;
 	int	i;
 
-#ifndef	__FreeBSD__
-	ahc = malloc(sizeof(*ahc), M_DEVBUF, M_NOWAIT);
-	if (!ahc) {
-		printf("aic7xxx: cannot malloc softc!\n");
-		free(name, M_DEVBUF);
-		return NULL;
-	}
-#else
 	ahc = device_get_softc((device_t)platform_arg);
-#endif
 	memset(ahc, 0, sizeof(*ahc));
 	ahc->seep_config = malloc(sizeof(*ahc->seep_config),
 				  M_DEVBUF, M_NOWAIT);
 	if (ahc->seep_config == NULL) {
-#ifndef	__FreeBSD__
-		free(ahc, M_DEVBUF);
-#endif
 		free(name, M_DEVBUF);
 		return (NULL);
 	}
@@ -4112,9 +4098,6 @@
 		free(ahc->name, M_DEVBUF);
 	if (ahc->seep_config != NULL)
 		free(ahc->seep_config, M_DEVBUF);
-#ifndef __FreeBSD__
-	free(ahc, M_DEVBUF);
-#endif
 	return;
 }
 
Index: aic_osm_lib.h
===================================================================
RCS file: /home/cvs/src/sys/dev/aic7xxx/aic_osm_lib.h,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -L sys/dev/aic7xxx/aic_osm_lib.h -L sys/dev/aic7xxx/aic_osm_lib.h -u -r1.1.1.3 -r1.2
--- sys/dev/aic7xxx/aic_osm_lib.h
+++ sys/dev/aic7xxx/aic_osm_lib.h
@@ -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,21 +82,6 @@
 #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;
@@ -125,17 +107,11 @@
 }
 
 /****************************** Kernel Threads ********************************/
-#if __FreeBSD_version > 500005
 #define	aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
 	kthread_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, 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,		\
@@ -145,16 +121,6 @@
 			   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)
@@ -186,11 +152,7 @@
 #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,
Index: wd7000.c
===================================================================
RCS file: /home/cvs/src/sys/dev/wds/wd7000.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -L sys/dev/wds/wd7000.c -L sys/dev/wds/wd7000.c -u -r1.2 -r1.3
--- sys/dev/wds/wd7000.c
+++ sys/dev/wds/wd7000.c
@@ -1225,7 +1225,7 @@
 		cpi->hba_misc = 0;
 		cpi->bus_id = cam_sim_bus(sim);
 		cpi->base_transfer_speed = 3300;
-		strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+		strncpy(cpi->sim_vid, "MidnightBSD", SIM_IDLEN);
 		strncpy(cpi->hba_vid, "WD/FDC", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
 		cpi->unit_number = cam_sim_unit(sim);
Index: aha.c
===================================================================
RCS file: /home/cvs/src/sys/dev/aha/aha.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -L sys/dev/aha/aha.c -L sys/dev/aha/aha.c -u -r1.2 -r1.3
--- sys/dev/aha/aha.c
+++ sys/dev/aha/aha.c
@@ -993,7 +993,7 @@
 		cpi->initiator_id = aha->scsi_id;
 		cpi->bus_id = cam_sim_bus(sim);
 		cpi->base_transfer_speed = 3300;
-		strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+		strncpy(cpi->sim_vid, "MidnightBSD", SIM_IDLEN);
 		strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
 		cpi->unit_number = cam_sim_unit(sim);
Index: if_wireg.h
===================================================================
RCS file: /home/cvs/src/sys/dev/wi/if_wireg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -L sys/dev/wi/if_wireg.h -L sys/dev/wi/if_wireg.h -u -r1.2 -r1.3
--- sys/dev/wi/if_wireg.h
+++ sys/dev/wi/if_wireg.h
@@ -84,12 +84,12 @@
 #ifdef __NetBSD__
 #define OS_STRING_NAME	"NetBSD"
 #endif
-#ifdef __FreeBSD__
-#define OS_STRING_NAME	"FreeBSD"
-#endif
 #ifdef __OpenBSD__
 #define OS_STRING_NAME	"OpenBSD"
 #endif
+#ifdef __MidnightBSD__
+#define OS_STRING_NAME "MidnightBSD"
+#endif
 
 #define WI_DEFAULT_NODENAME	OS_STRING_NAME " WaveLAN/IEEE node"
 


More information about the Midnightbsd-cvs mailing list