diff options
author | Selvin Xavier <selvin.xavier@emulex.com> | 2014-06-10 10:02:13 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 18:07:36 -0400 |
commit | 31dbdd9af58c63c7f8376a0fa680f5fc1b6cce98 (patch) | |
tree | a6d096308dc817e9ce4194ba4aec804294de2185 /drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |
parent | f50f31e42fb772b62e209cf6ff5254b1bc02b756 (diff) |
RDMA/ocrdma: Query and initalize the PFC SL
This patch implements routine to query the PFC priority from the
adapter port.
Following are the changes implemented:
* A new FW command is implemented to query the operational/admin DCBX
configuration from the FW and obtain active priority(service
level).
* Adds support for the async event reported by FW when the PFC
priority changes. Service level is re-initialized during modify_qp
or create_ah, based on this event.
* Maintain SL value in ocrdma_dev structure and refer that as and
when needed.
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_ah.c')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index d4cc01f10c01..a023234d4b92 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |||
@@ -100,6 +100,8 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) | |||
100 | if (!(attr->ah_flags & IB_AH_GRH)) | 100 | if (!(attr->ah_flags & IB_AH_GRH)) |
101 | return ERR_PTR(-EINVAL); | 101 | return ERR_PTR(-EINVAL); |
102 | 102 | ||
103 | if (atomic_cmpxchg(&dev->update_sl, 1, 0)) | ||
104 | ocrdma_init_service_level(dev); | ||
103 | ah = kzalloc(sizeof(*ah), GFP_ATOMIC); | 105 | ah = kzalloc(sizeof(*ah), GFP_ATOMIC); |
104 | if (!ah) | 106 | if (!ah) |
105 | return ERR_PTR(-ENOMEM); | 107 | return ERR_PTR(-ENOMEM); |