IB/mlx5: Fix the locking of SRQ objects in ODP events
authorMoni Shoua <monis@mellanox.com>
Tue, 22 Jan 2019 06:48:40 +0000 (08:48 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Feb 2019 21:34:06 +0000 (14:34 -0700)
commit10f56242e3158f6c17579921ebbba4a0d5188dc2
tree2d7c18f2cfc4f3eb399bf966ff66febc8d97ac18
parente431a80a540960a10bd7de9e866776ba6f0612e6
IB/mlx5: Fix the locking of SRQ objects in ODP events

QP and SRQ objects are stored in different containers so the action to get
and lock a common resource during ODP event needs to address that.

While here get rid of 'refcount' and 'free' fields in mlx5_core_srq struct
and use the fields with same semantics in common structure.

Fixes: 032080ab43ac ("IB/mlx5: Lock QP during page fault handling")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/odp.c
drivers/infiniband/hw/mlx5/srq.h
drivers/infiniband/hw/mlx5/srq_cmd.c