From 524ed5f9e68f1c46778cf18e9334cd08ffcd4808 Mon Sep 17 00:00:00 2001 From: Jack Morgenstein Date: Sun, 30 Aug 2009 17:16:13 +0300 Subject: [PATCH] sdp: incorrect SDP_FMR_SIZE on 32-bit machines On 32-bit machines, sizeof (u64 *) is 4 bytes (size of a ***pointer***). However, the max SDP FMR pool size should be PAGE_SIZE / sizeof(an mtt entry) -- and mtt entries are u64's (or __be64's). This resulted in SDP requesting twice as many entries per pool on 32-bit machines as could fit on a single page -- with the result that the fmr pool allocation failed at driver startup. Signed-off-by: Jack Morgenstein --- drivers/infiniband/ulp/sdp/sdp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h index b7403970f669..d973f5253261 100644 --- a/drivers/infiniband/ulp/sdp/sdp.h +++ b/drivers/infiniband/ulp/sdp/sdp.h @@ -29,7 +29,7 @@ #define SDP_TX_SIZE 0x40 #define SDP_RX_SIZE 0x40 -#define SDP_FMR_SIZE (PAGE_SIZE / sizeof(u64 *)) +#define SDP_FMR_SIZE (PAGE_SIZE / sizeof(u64)) #define SDP_FMR_POOL_SIZE 1024 #define SDP_FMR_DIRTY_SIZE ( SDP_FMR_POOL_SIZE / 4 ) -- 2.50.1