]> git.karo-electronics.de Git - linux-beck.git/commitdiff
IB/ehca: Fix bitmask handling for lock_hcalls
authorAlexander Schmidt <alexs@linux.vnet.ibm.com>
Thu, 10 Jun 2010 09:06:53 +0000 (09:06 +0000)
committerRoland Dreier <rolandd@cisco.com>
Mon, 19 Jul 2010 20:23:32 +0000 (13:23 -0700)
Fix reading hcall locking capability bit from device capabilities.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_main.c

index ecb51b396c42d2a3b85e7dd29e40a28e412455cc..cfc4de7a5da4700b6b0b74f6010f63ff878208c5 100644 (file)
@@ -360,7 +360,8 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
         * a firmware property, so it's valid across all adapters
         */
        if (ehca_lock_hcalls == -1)
-               ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC);
+               ehca_lock_hcalls = !EHCA_BMASK_GET(HCA_CAP_H_ALLOC_RES_SYNC,
+                                       shca->hca_cap);
 
        /* translate supported MR page sizes; always support 4K */
        shca->hca_cap_mr_pgsize = EHCA_PAGESIZE;