]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Don't hold spin lock while checking device state
authorParav Pandit <parav@mellanox.com>
Tue, 28 Aug 2018 11:45:29 +0000 (14:45 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 6 Sep 2018 19:35:15 +0000 (13:35 -0600)
commita3115bbdfc6dc9ba35372548978e70268f05a095
tree79d3f23d5f49cc70b9de88054849b71c4c1f64b5
parent1126e716afad30fa50b4a0deb1fa18f5291fdc3e
IB/mlx5: Don't hold spin lock while checking device state

mdev->state device state is not protected by the QP for which WRs are
being processed. Therefore, there is no need to hold spin lock while
checking mdev state.

Given that device fatal error is unlikely situation, wrap the condition
check with unlikely().

Additionally, kernel QP1 is also a kernel ULP for which soft CQEs needs
to be generated. Therefore, check for device fatal error before
processing QP1 work requests.

Fixes: d5260e682d9e ("IB/mlx5: Reset flow support for IB kernel ULPs")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c