RDMA/cxgb3: Propagate HW page size capabilities
authorJon Mason <jon@opengridcomputing.com>
Tue, 15 Jul 2008 06:48:49 +0000 (23:48 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 15 Jul 2008 06:48:49 +0000 (23:48 -0700)
cxgb3 does not currently report the page size capabilities, and
incorrectly reports them internally.

This version changes the bit-shifting to a static value (per Steve's
request).

Signed-off-by: Jon Mason <jon@opengridcomputing.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/cxio_hal.h
drivers/infiniband/hw/cxgb3/iwch.c
drivers/infiniband/hw/cxgb3/iwch_provider.c

index a9ff32c36211617f73f08e2b4678a0b785529101..656fe47bc84f94ea2d1af60e2d916be85a69cd47 100644 (file)
@@ -55,6 +55,7 @@
 #define T3_MAX_CQ_DEPTH 8192
 #define T3_MAX_NUM_STAG (1<<15)
 #define T3_MAX_MR_SIZE 0x100000000ULL
+#define T3_PAGESIZE_MASK 0xffff000  /* 4KB-128MB */
 
 #define T3_STAG_UNSET 0xffffffff
 
index 06086256ca1dbdc2d7f0897718b766fc79cf230a..4489c89d6710c6b22c478f4b7742ff0ff4688576 100644 (file)
@@ -80,7 +80,7 @@ static void rnic_init(struct iwch_dev *rnicp)
        rnicp->attr.max_mem_regs = cxio_num_stags(&rnicp->rdev);
        rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE;
        rnicp->attr.max_pds = T3_MAX_NUM_PD - 1;
-       rnicp->attr.mem_pgsizes_bitmask = 0x7FFF;       /* 4KB-128MB */
+       rnicp->attr.mem_pgsizes_bitmask = T3_PAGESIZE_MASK;
        rnicp->attr.max_mr_size = T3_MAX_MR_SIZE;
        rnicp->attr.can_resize_wq = 0;
        rnicp->attr.max_rdma_reads_per_qp = 8;
index 18a6609f5e0155b9964a1be0e5dfad154f56702d..249d99f4a3cbafb77e22a8255e92e8c375b8a3a5 100644 (file)
@@ -1130,6 +1130,7 @@ static int iwch_query_device(struct ib_device *ibdev,
        props->hw_ver = dev->rdev.t3cdev_p->type;
        props->fw_ver = fw_vers_string_to_u64(dev);
        props->device_cap_flags = dev->device_cap_flags;
+       props->page_size_cap = dev->attr.mem_pgsizes_bitmask;
        props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor;
        props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device;
        props->max_mr_size = dev->attr.max_mr_size;