diff --git a/sys/dev/hptmv/mvOs.h b/sys/dev/hptmv/mvOs.h index e469e055537a..3325d14c7cc1 100644 --- a/sys/dev/hptmv/mvOs.h +++ b/sys/dev/hptmv/mvOs.h @@ -28,6 +28,19 @@ #ifndef __INCmvOsBsdh #define __INCmvOsBsdh +/* Taken out of the Makefile magic */ +#define __KERNEL__ 1 +#define KERNEL 1 +#define _KERNEL 1 +#define _FREEBSD_ 1 + +/* + * This binary object core for this driver is only for x86, so this constant + * will not change. + */ +#define BITS_PER_LONG 32 +#define DRIVER_VERSION "1.1" + #if DBG #define MV_DEBUG_LOG #endif diff --git a/sys/dev/hptmv/osbsd.h b/sys/dev/hptmv/osbsd.h index 4d9701dda17a..f9a41fcb73a4 100644 --- a/sys/dev/hptmv/osbsd.h +++ b/sys/dev/hptmv/osbsd.h @@ -116,7 +116,7 @@ typedef struct _READ_CAPACITY_DATA { #define PRD_TABLES_FOR_VBUS (MV_SATA_CHANNELS_NUM*MV_EDMA_QUEUE_LENGTH) typedef enum _SataEvent { - SATA_EVENT_NO_CHANGE = 0, + SATA_EVENT_NO_CHANGE = 0, SATA_EVENT_CHANNEL_CONNECTED, SATA_EVENT_CHANNEL_DISCONNECTED } SATA_EVENT; @@ -221,7 +221,6 @@ int hpt_add_disk_to_array(_VBUS_ARG DEVICEID idArray, DEVICEID idDisk); #define REBUILD_PARITY 2 #define VERIFY 3 -extern char DRIVER_VERSION[]; /**********************************************************/ static __inline struct cam_periph * hpt_get_periph(int path_id,int target_id) diff --git a/sys/modules/hptmv/Makefile b/sys/modules/hptmv/Makefile index 468232953c93..a444cd66a9e4 100644 --- a/sys/modules/hptmv/Makefile +++ b/sys/modules/hptmv/Makefile @@ -10,26 +10,13 @@ HPTMV= ${.CURDIR}/../../contrib/dev/hptmv KMOD= hptmv SRCS= opt_scsi.h opt_cam.h SRCS+= bus_if.h device_if.h pci_if.h -SRCS+= mv.c entry.c vers.c +SRCS+= mv.c entry.c SRCS+= ioctl.c hptproc.c gui_lib.c -OBJS+= raid.o +OBJS+= hptmvraid.o -raid.o: ${HPTMV}/i386-elf.raid.o.uu +hptmvraid.o: ${HPTMV}/i386-elf.raid.o.uu uudecode -p < ${HPTMV}/i386-elf.raid.o.uu > ${.TARGET} -# -# Driver version number. -# -.ifndef DRIVER_VERSION -DRIVER_VERSION = "1.1" -.endif - -vers.c: mv.o - @echo char DRIVER_VERSION[]=\"$(DRIVER_VERSION)\"\; > ${.OBJDIR}/$(.TARGET) - -# calculate system pointer size. -BITS_PER_LONG= 4 - # # Debug Options: # @@ -55,8 +42,6 @@ DEBUGOPT += -DDEBUG_LEVEL=1 DEBUGOPT += -DFOR_DEMO .endif -CFLAGS+= -D__KERNEL__=1 -DKERNEL=1 -D_KERNEL=1 -D_FREEBSD_=1 ${DEBUGOPT} \ - -DBITS_PER_LONG=$(BITS_PER_LONG) +CFLAGS+= ${DEBUGOPT} -CLEANFILES += vers.c .include