diff options
author | mav <mav@FreeBSD.org> | 2012-08-01 17:31:31 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-08-01 17:31:31 +0000 |
commit | d35997f97e5bca6ac7e1dffebc4f7bc0bf4a168e (patch) | |
tree | 79e17377a681fc12123cfa9b9acf9d7ba8fdaf18 /sys/dev/mps/mpsvar.h | |
parent | 58f7ae85c74dabb278901c6e1c4afae9578733f2 (diff) | |
download | FreeBSD-src-d35997f97e5bca6ac7e1dffebc4f7bc0bf4a168e.zip FreeBSD-src-d35997f97e5bca6ac7e1dffebc4f7bc0bf4a168e.tar.gz |
Several fixes to allow firmware/BIOS flash access from user-level:
- remove special handling of zero length transfers in mpi_pre_fw_upload();
- add missing MPS_CM_FLAGS_DATAIN flag in mpi_pre_fw_upload();
- move mps_user_setup_request() call into proper place;
- increase user command timeout from 30 to 60 seconds;
- avoid NULL dereference panic in case of firmware crash.
Set max DMA segment size to 24bit, as MPI SGE supports it.
Use mps_add_dmaseg() to add empty SGE instead of custom code.
Tune endianness safety.
Reviewed by: Desai, Kashyap <Kashyap.Desai@lsi.com>
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/dev/mps/mpsvar.h')
-rw-r--r-- | sys/dev/mps/mpsvar.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h index 2acb75b..ac0f0da 100644 --- a/sys/dev/mps/mpsvar.h +++ b/sys/dev/mps/mpsvar.h @@ -32,7 +32,7 @@ #ifndef _MPSVAR_H #define _MPSVAR_H -#define MPS_DRIVER_VERSION "14.00.00.01-fbsd" +#define MPS_DRIVER_VERSION "14.00.00.02-fbsd" #define MPS_DB_MAX_WAIT 2500 @@ -627,15 +627,15 @@ do { \ static __inline void mps_from_u64(uint64_t data, U64 *mps) { - (mps)->High = (uint32_t)((data) >> 32); - (mps)->Low = (uint32_t)((data) & 0xffffffff); + (mps)->High = htole32((uint32_t)((data) >> 32)); + (mps)->Low = htole32((uint32_t)((data) & 0xffffffff)); } static __inline uint64_t mps_to_u64(U64 *data) { - return (((uint64_t)data->High << 32) | data->Low); + return (((uint64_t)le32toh(data->High) << 32) | le32toh(data->Low)); } static __inline void |