diff options
author | Ira Weiny <ira.weiny@intel.com> | 2015-06-06 14:38:29 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-12 14:49:17 -0400 |
commit | 337877a466bb8b0c51f4fa727eeef7d734665632 (patch) | |
tree | 3d05512e358f2fe92e15db23a2b7bc18312f116b /drivers/infiniband/hw/ocrdma/ocrdma_main.c | |
parent | da2dfaa3a35cb5b68fc6ab2e442339de03cacd09 (diff) | |
download | linux-stable-337877a466bb8b0c51f4fa727eeef7d734665632.tar.gz linux-stable-337877a466bb8b0c51f4fa727eeef7d734665632.tar.bz2 linux-stable-337877a466bb8b0c51f4fa727eeef7d734665632.zip |
IB/core: Add ability for drivers to report an alternate MAD size.
Add max MAD size to the device immutable data set and have all drivers that
support MADs report the current IB MAD size (IB_MGMT_MAD_SIZE) to the core.
Verify MAD size data in both the MAD core and when reading the immutable data.
OPA drivers will report alternate MAD sizes in subsequent patches.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_main.c')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index f55289869357..8a1398b253a2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -30,6 +30,7 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_user_verbs.h> #include <rdma/ib_addr.h> +#include <rdma/ib_mad.h> #include <linux/netdevice.h> #include <net/addrconf.h> @@ -215,6 +216,7 @@ static int ocrdma_port_immutable(struct ib_device *ibdev, u8 port_num, immutable->pkey_tbl_len = attr.pkey_tbl_len; immutable->gid_tbl_len = attr.gid_tbl_len; immutable->core_cap_flags = RDMA_CORE_PORT_IBA_ROCE; + immutable->max_mad_size = IB_MGMT_MAD_SIZE; return 0; } |