[ofa-general] [PATCH] Set props->page_size_cap in ehca

Anton Blanchard anton at samba.org
Wed Aug 29 08:28:17 PDT 2007


Hi,

When inserting the ib_srp module, the ehca driver spits out an error:

ehca D.001.DQDXYCB-P1-C9: PU0007 EHCA_ERR:ehca_alloc_fmr unsupported fmr_attr->page_shift=9

The following code in ib_srp.c is causing it:

        /*
         * Use the smallest page size supported by the HCA, down to a
         * minimum of 512 bytes (which is the smallest sector that a
         * SCSI command will ever carry).
         */
        srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1);

Looks like we should be setting props->page_size_cap.

Compile tested only, I dont have any IB attached storage.

Signed-off-by: Anton Blanchard <anton at samba.org>
---

diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c
index fc19ef9..9ca2543 100644
--- a/drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c
@@ -77,6 +77,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
 	}
 
 	memset(props, 0, sizeof(struct ib_device_attr));
+	props->page_size_cap   = EHCA_PAGESIZE;
 	props->fw_ver          = rblock->hw_ver;
 	props->max_mr_size     = rblock->max_mr_size;
 	props->vendor_id       = rblock->vendor_id >> 8;



More information about the general mailing list