IB: Query ports via the core instead of direct into the driver
Change the drivers to call ib_query_port in their get port immutable handler instead of their own query port handler. Doing this required to set the core cap flags of this device before the ib_query_port call is made, since the IB core might need these caps to serve the port query. Drivers are ensured by the IB core that the port attributes passed to the port query verb implementation are zero, and hence we removed the zeroing from the drivers. This patch doesn't add any new functionality. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Acked-by: Adit Ranadive <aditr@vmware.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -1384,6 +1384,7 @@ static int query_port(struct rvt_dev_info *rdi, u8 port_num,
|
||||
struct hfi1_pportdata *ppd = &dd->pport[port_num - 1];
|
||||
u16 lid = ppd->lid;
|
||||
|
||||
/* props being zeroed by the caller, avoid zeroing it here */
|
||||
props->lid = lid ? lid : 0;
|
||||
props->lmc = ppd->lmc;
|
||||
/* OPA logical states match IB logical states */
|
||||
|
Reference in New Issue
Block a user