[IB] mthca: report page size capability
authorJack Morgenstein <jackm@mellanox.co.il>
Sat, 5 Nov 2005 00:03:32 +0000 (16:03 -0800)
committerRoland Dreier <rolandd@cisco.com>
Sat, 5 Nov 2005 05:28:21 +0000 (21:28 -0800)
Report the device's real page size capability in mthca_query_device().

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_dev.h
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/mthca/mthca_provider.c

index e7e5d3b4f00481bb01a029eb1657d76b73c4eea4..808037f25c78c0ce51db7574ab18ca7cea986fdd 100644 (file)
@@ -154,6 +154,7 @@ struct mthca_limits {
        int      reserved_mcgs;
        int      num_pds;
        int      reserved_pds;
+       u32      page_size_cap;
        u32      flags;
        u8       port_width_cap;
 };
index 45c6328e780c4789244b42d190d55e9acf7ebb07..16594d1342df690b10e42286f69f618d18652f80 100644 (file)
@@ -181,6 +181,7 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim
        mdev->limits.reserved_uars      = dev_lim->reserved_uars;
        mdev->limits.reserved_pds       = dev_lim->reserved_pds;
        mdev->limits.port_width_cap     = dev_lim->max_port_width;
+       mdev->limits.page_size_cap      = ~(u32) (dev_lim->min_page_sz - 1);
        mdev->limits.flags              = dev_lim->flags;
 
        /* IB_DEVICE_RESIZE_MAX_WR not supported by driver.
index 6b0166668269fcc4db29fa598bc66cf5884f5876..e78259b2664b0be79f0f683175429db4b2cfd105 100644 (file)
@@ -90,6 +90,7 @@ static int mthca_query_device(struct ib_device *ibdev,
        memcpy(&props->node_guid,      out_mad->data + 12, 8);
 
        props->max_mr_size         = ~0ull;
+       props->page_size_cap       = mdev->limits.page_size_cap;
        props->max_qp              = mdev->limits.num_qps - mdev->limits.reserved_qps;
        props->max_qp_wr           = mdev->limits.max_wqes;
        props->max_sge             = mdev->limits.max_sg;