diff options
| author | Michael Brown | 2011-02-16 19:38:26 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-02-17 02:25:10 +0100 |
| commit | e8c636fe75d6b797d2fe151f8534dea7bbc6d1c2 (patch) | |
| tree | e8799832b330cf1eff347d638959166e4ea588cd /src/drivers/infiniband | |
| parent | [hermon] Force link speed to SDR (diff) | |
| download | ipxe-e8c636fe75d6b797d2fe151f8534dea7bbc6d1c2.tar.gz ipxe-e8c636fe75d6b797d2fe151f8534dea7bbc6d1c2.tar.xz ipxe-e8c636fe75d6b797d2fe151f8534dea7bbc6d1c2.zip | |
[hermon] Add missing __attribute__ (( packed ))
On 64-bit builds, MLX_DECLARE_STRUCT() produces a structure that is
always a multiple of 64 bits long, causing the HCR structure to be
over-length by one dword. This in turn causes hermon_cmd() to write
beyond the end of the HCR, which causes commands to fail.
Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/infiniband')
| -rw-r--r-- | src/drivers/infiniband/mlx_bitops.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/infiniband/mlx_bitops.h b/src/drivers/infiniband/mlx_bitops.h index 5215f9a8a..0c3b54771 100644 --- a/src/drivers/infiniband/mlx_bitops.h +++ b/src/drivers/infiniband/mlx_bitops.h @@ -46,8 +46,8 @@ typedef unsigned char pseudo_bit_t; uint8_t bytes[ sizeof ( struct _structure ## _st ) / 8 ]; \ uint32_t dwords[ sizeof ( struct _structure ## _st ) / 32 ]; \ struct _structure ## _st *dummy[0]; \ - } u; \ - } + } __attribute__ (( packed )) u; \ + } __attribute__ (( packed )) /** Get pseudo_bit_t structure type from wrapper structure pointer */ #define MLX_PSEUDO_STRUCT( _ptr ) \ |
