mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
IB/core: Use rdma_cap_opa_mad to check for OPA
Use rdma_cap_opa_mad() to check for OPA to promote code reuse. Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
fefa06811c
commit
2ef7f2e270
@ -233,8 +233,7 @@ static void recv_handler(struct ib_mad_agent *agent,
|
|||||||
* On OPA devices it is okay to lose the upper 16 bits of LID as this
|
* On OPA devices it is okay to lose the upper 16 bits of LID as this
|
||||||
* information is obtained elsewhere. Mask off the upper 16 bits.
|
* information is obtained elsewhere. Mask off the upper 16 bits.
|
||||||
*/
|
*/
|
||||||
if (agent->device->port_immutable[agent->port_num].core_cap_flags &
|
if (rdma_cap_opa_mad(agent->device, agent->port_num))
|
||||||
RDMA_CORE_PORT_INTEL_OPA)
|
|
||||||
packet->mad.hdr.lid = ib_lid_be16(0xFFFF &
|
packet->mad.hdr.lid = ib_lid_be16(0xFFFF &
|
||||||
mad_recv_wc->wc->slid);
|
mad_recv_wc->wc->slid);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user