From: Jack Morgenstein Date: Sun, 30 Aug 2009 14:16:13 +0000 (+0300) Subject: sdp: incorrect SDP_FMR_SIZE on 32-bit machines X-Git-Tag: v4.1.12-92~264^2~5^2~248 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=524ed5f9e68f1c46778cf18e9334cd08ffcd4808;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h index b7403970f6694..d973f52532613 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 )