mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
IB/Verbs: Use management helper rdma_cap_ib_smi()
Introduce helper rdma_cap_ib_smi() to help us check if the port of an IB device support Infiniband Subnet Management Interface. Signed-off-by: Michael Wang <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Tested-by: Ira Weiny <[email protected]> Reviewed-by: Sean Hefty <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Tested-by: Doug Ledford <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
c757dea816
commit
29541e3add
3 changed files with 17 additions and 2 deletions
|
|
@ -1789,6 +1789,21 @@ static inline bool rdma_cap_ib_mad(struct ib_device *device, u8 port_num)
|
|||
return rdma_ib_or_iboe(device, port_num);
|
||||
}
|
||||
|
||||
/**
|
||||
* rdma_cap_ib_smi - Check if the port of device has the capability Infiniband
|
||||
* Subnet Management Interface.
|
||||
*
|
||||
* @device: Device to be checked
|
||||
* @port_num: Port number of the device
|
||||
*
|
||||
* Return false when port of the device don't support Infiniband
|
||||
* Subnet Management Interface.
|
||||
*/
|
||||
static inline bool rdma_cap_ib_smi(struct ib_device *device, u8 port_num)
|
||||
{
|
||||
return rdma_protocol_ib(device, port_num);
|
||||
}
|
||||
|
||||
int ib_query_gid(struct ib_device *device,
|
||||
u8 port_num, int index, union ib_gid *gid);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue