RDMA/irdma: Add missing read barriers
authorShiraz Saleem <shiraz.saleem@intel.com>
Tue, 11 Jul 2023 17:52:51 +0000 (12:52 -0500)
committerLeon Romanovsky <leon@kernel.org>
Mon, 17 Jul 2023 05:01:22 +0000 (08:01 +0300)
commit4984eb51453ff7eddee9e5ce816145be39c0ec5c
treef9d69baeb34327823104ff9c0dab987876faf0e0
parentd64b1ee12a168030fbb3e0aebf7bce49e9a07589
RDMA/irdma: Add missing read barriers

On code inspection, there are many instances in the driver where
CEQE and AEQE fields written to by HW are read without guaranteeing
that the polarity bit has been read and checked first.

Add a read barrier to avoid reordering of loads on the CEQE/AEQE fields
prior to checking the polarity bit.

Fixes: 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230711175253.1289-2-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/ctrl.c
drivers/infiniband/hw/irdma/puda.c
drivers/infiniband/hw/irdma/uk.c