diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-12-07 23:51:00 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-12-07 23:51:00 +0000 |
commit | 7069570fccb71ba67f3b1973c6a6c2b1d387a026 (patch) | |
tree | ac0121dc85f2b1f7450b3f1ae40aa7abf4cb397c /sys/dev | |
parent | d7ca8e25c239adadb43ab46a196d798c39e00d1e (diff) | |
download | FreeBSD-src-7069570fccb71ba67f3b1973c6a6c2b1d387a026.zip FreeBSD-src-7069570fccb71ba67f3b1973c6a6c2b1d387a026.tar.gz |
PH! Forgot to do my cross-compile check. Also now rearranged things so
the ENDIAN defines are consistent between mpt.h and mpt.c.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mpt/mpt.c | 15 | ||||
-rw-r--r-- | sys/dev/mpt/mpt.h | 16 |
2 files changed, 17 insertions, 14 deletions
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c index cf5c3f5..d246549 100644 --- a/sys/dev/mpt/mpt.c +++ b/sys/dev/mpt/mpt.c @@ -2611,8 +2611,9 @@ void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *sge) { MPT_2_HOST32(sge, FlagsLength); - MPT_2_HOST64(sge, u.Address64); -}; + MPT_2_HOST32(sge, u.Address64.Low); + MPT_2_HOST32(sge, u.Address64.High); +} void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *rp) @@ -2664,7 +2665,7 @@ mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *ioc2) int i; ioc2->CapabilitiesFlags = htole32(ioc2->CapabilitiesFlags); for (i = 0; i < MPI_IOC_PAGE_2_RAID_VOLUME_MAX; i++) { - MPT_2_HOST16(ioc2->RaidVolume[i].Reserved3); + MPT_2_HOST16(ioc2, RaidVolume[i].Reserved3); } } @@ -2680,14 +2681,16 @@ mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *volp) MPT_2_HOST32(volp, Reserved2); MPT_2_HOST32(volp, Reserved3); for (i = 0; i < MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX; i++) { - MPT_2_HOST16(volpd, PhysDisk[i].Reserved); + MPT_2_HOST16(volp, PhysDisk[i].Reserved); } } void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *vi) { - MPT_2_HOST16(vi, TotalBlocks); - MPT_2_HOST16(vi, BlocksRemaining); + MPT_2_HOST16(vi, TotalBlocks.High); + MPT_2_HOST16(vi, TotalBlocks.Low); + MPT_2_HOST16(vi, BlocksRemaining.High); + MPT_2_HOST16(vi, BlocksRemaining.Low); } #endif diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h index 7e81fe4..725572d 100644 --- a/sys/dev/mpt/mpt.h +++ b/sys/dev/mpt/mpt.h @@ -283,20 +283,20 @@ void mpt_map_rquest(void *, bus_dma_segment_t *, int, int); #define HOST_2_MPT32(ptr, tag) ptr->tag = htole32(ptr->tag) #define HOST_2_MPT16(ptr, tag) ptr->tag = htole16(ptr->tag) -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define mpt2host_sge_simple_union(x) do { ; } while (0) -#define mpt2host_iocfacts_reply(x) do { ; } while (0) -#define mpt2host_portfacts_reply(x) do { ; } while (0) -#define mpt2host_config_page_ioc2(x) do { ; } while (0) -#define mpt2host_config_page_raid_vol_0(x) do { ; } while (0) -#define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0) -#else +#if _BYTE_ORDER == _BIG_ENDIAN void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *); void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *); void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *); void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *); void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *); void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *); +#else +#define mpt2host_sge_simple_union(x) do { ; } while (0) +#define mpt2host_iocfacts_reply(x) do { ; } while (0) +#define mpt2host_portfacts_reply(x) do { ; } while (0) +#define mpt2host_config_page_ioc2(x) do { ; } while (0) +#define mpt2host_config_page_raid_vol_0(x) do { ; } while (0) +#define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0) #endif /**************************** MPI Transaction State ***************************/ |