aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes.h
diff options
context:
space:
mode:
authorDon Wood <donald.e.wood@intel.com>2009-04-08 17:21:02 -0400
committerRoland Dreier <rolandd@cisco.com>2009-04-08 17:21:02 -0400
commit7a5efb62f6ae366cefac6be475434906c5061e15 (patch)
tree834615c1a5928d196aec846cfe2742cea168a78c /drivers/infiniband/hw/nes/nes.h
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
RDMA/nes: Fix incorrect casts on 32-bit architectures
The were some incorrect casts to unsigned long that caused 64-bit values to be truncated on 32-bit architectures and made the driver pass invalid adresses and lengths to the hardware. The problems were primarily seen with kernels with highmem configured but some could show up in non-highmem kernels, too. Signed-off-by: Don Wood <donald.e.wood@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.h')
-rw-r--r--drivers/infiniband/hw/nes/nes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index 04b12ad23390..17621de54a9f 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -289,8 +289,8 @@ static inline __le32 get_crc_value(struct nes_v4_quad *nes_quad)
289static inline void 289static inline void
290set_wqe_64bit_value(__le32 *wqe_words, u32 index, u64 value) 290set_wqe_64bit_value(__le32 *wqe_words, u32 index, u64 value)
291{ 291{
292 wqe_words[index] = cpu_to_le32((u32) ((unsigned long)value)); 292 wqe_words[index] = cpu_to_le32((u32) value);
293 wqe_words[index + 1] = cpu_to_le32((u32)(upper_32_bits((unsigned long)value))); 293 wqe_words[index + 1] = cpu_to_le32(upper_32_bits(value));
294} 294}
295 295
296static inline void 296static inline void