diff --git a/sys/dev/aic7xxx/aic7xxx_osm.h b/sys/dev/aic7xxx/aic7xxx_osm.h index c81a1b2b301d..3456e99ded97 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.h +++ b/sys/dev/aic7xxx/aic7xxx_osm.h @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.h#10 $ * * $FreeBSD$ */ @@ -42,7 +42,9 @@ #include #include #include /* For device_t */ +#if __FreeBSD_version >= 500000 #include +#endif #include #include #include @@ -188,6 +190,7 @@ struct scb_platform_data { }; /********************************* Byte Order *********************************/ +#if __FreeBSD_version >= 500000 #define ahc_htobe16(x) htobe16(x) #define ahc_htobe32(x) htobe32(x) #define ahc_htobe64(x) htobe64(x) @@ -201,8 +204,28 @@ struct scb_platform_data { #define ahc_le16toh(x) le16toh(x) #define ahc_le32toh(x) le32toh(x) #define ahc_le64toh(x) le64toh(x) +#else +#define ahc_htobe16(x) (x) +#define ahc_htobe32(x) (x) +#define ahc_htobe64(x) (x) +#define ahc_htole16(x) (x) +#define ahc_htole32(x) (x) +#define ahc_htole64(x) (x) + +#define ahc_be16toh(x) (x) +#define ahc_be32toh(x) (x) +#define ahc_be64toh(x) (x) +#define ahc_le16toh(x) (x) +#define ahc_le32toh(x) (x) +#define ahc_le64toh(x) (x) +#endif /***************************** Core Includes **********************************/ +#if AHC_REG_PRETTY_PRINT +#define AIC_DEBUG_REGISTERS 1 +#else +#define AIC_DEBUG_REGISTERS 0 +#endif #include /*************************** Device Access ************************************/ @@ -238,6 +261,11 @@ static __inline void ahc_done_lockinit(struct ahc_softc *); static __inline void ahc_done_lock(struct ahc_softc *, unsigned long *flags); static __inline void ahc_done_unlock(struct ahc_softc *, unsigned long *flags); +/* Lock held during ahc_list manipulation and ahc softc frees */ +static __inline void ahc_list_lockinit(void); +static __inline void ahc_list_lock(unsigned long *flags); +static __inline void ahc_list_unlock(unsigned long *flags); + static __inline void ahc_lockinit(struct ahc_softc *ahc) { @@ -271,6 +299,21 @@ ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags) { } +/* Lock held during ahc_list manipulation and ahc softc frees */ +static __inline void +ahc_list_lockinit() +{ +} + +static __inline void +ahc_list_lock(unsigned long *flags) +{ +} + +static __inline void +ahc_list_unlock(unsigned long *flags) +{ +} /****************************** OS Primitives *********************************/ #define ahc_delay DELAY