On Wed, Nov 17, 2021 at 1:17 PM Leon Romanovsky <leon@xxxxxxxxxx> wrote: > > On Mon, Nov 15, 2021 at 11:15:19AM +0100, Jack Wang wrote: > > If the FW doesn't support MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT, > > mlx4 driver will fail the ib_setup_port_attrs, which is called > > from ib_register_device/enable_device_and_get, in the end leads > > to device not detected[1][2] > > > > To fix it, add a new mlx4_ib_hw_stats_ops1, w/o alloc_hw_port_stats > > if FW does not support MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT. > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=2014094 > > [2] https://lore.kernel.org/linux-rdma/CAMGffEn2wvEnmzc0xe=xYiCLqpphiHDBxCxqAELrBofbUAMQxw@xxxxxxxxxxxxxx/T/#t > > > > Fixes: 4b5f4d3fb408 ("RDMA: Split the alloc_hw_stats() ops to port and device variants") > > > > Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx> > > --- > > drivers/infiniband/hw/mlx4/main.c | 18 +++++++++++++++--- > > 1 file changed, 15 insertions(+), 3 deletions(-) > > Just a nitpick, no need for a blank line between Fixes line and SOB. > > Thanks, > Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx> Thanks for the review, I will remember not to add the blank line next time.