|
@@ -275,8 +275,11 @@ ssize_t ib_uverbs_query_port(struct ib_uverbs_file *file,
|
|
|
resp.bad_pkey_cntr = attr.bad_pkey_cntr;
|
|
|
resp.qkey_viol_cntr = attr.qkey_viol_cntr;
|
|
|
resp.pkey_tbl_len = attr.pkey_tbl_len;
|
|
|
- resp.lid = attr.lid;
|
|
|
resp.sm_lid = attr.sm_lid;
|
|
|
+ if (rdma_cap_opa_ah(ib_dev, cmd.port_num))
|
|
|
+ resp.lid = OPA_TO_IB_UCAST_LID(attr.lid);
|
|
|
+ else
|
|
|
+ resp.lid = (u16)attr.lid;
|
|
|
resp.lmc = attr.lmc;
|
|
|
resp.max_vl_num = attr.max_vl_num;
|
|
|
resp.sm_sl = attr.sm_sl;
|