mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
i40iw IB device registration fails with ENODEV.
ib_register_device
setup_device/setup_port_data
i40iw_port_immutable
ib_query_port
iw_query_port
ib_device_get_netdev(ENODEV)
ib_device_get_netdev() does not have a netdev associated
with the ibdev and thus fails.
Use ib_device_set_netdev() to associate netdev to ibdev
in i40iw before IB device registration.
Fixes: 4929116bdf ("RDMA/core: Add common iWARP query port")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Shiraz, Saleem <[email protected]>
Reviewed-by: Kamal Heib <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>