]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: cq: use refcnt to disable/enable cq polling
authorWei Lin Guay <wei.lin.guay@oracle.com>
Mon, 31 Oct 2016 19:38:25 +0000 (20:38 +0100)
committerKnut Omang <knut.omang@oracle.com>
Fri, 11 Nov 2016 16:36:58 +0000 (17:36 +0100)
commitf1211b2ec7e1ce05136b97330b211c04dfe058f6
tree718a503e4bd9d7ff577c0aead96552b196b94a1f
parent3f02ea4f2e305b6f1ce8eab0bd92a0949dc5463f
sif: cq: use refcnt to disable/enable cq polling

Due to a hardware bug, sifdrv must clean up the cq
before it is being polled by the user. Thus, sifdrv
uses CQ_POLLING_NOT_ALLOWED bitmask to disable/enable
cq polling.

Nevertheless, the bit mask operation is not sufficient in
a shared cq scenario (many qps to one cq). The cq clean up
is performed by each qp and it might be performed concurrently.
As a result, the cq polling might be enabled before all qps
have clean up the cq.

Thus, this patch uses refcnt to disable/enable cq polling.
The CQ_POLLING_NOT_ALLOWED bitmask is kept in order to have
backward compatibility in the user library.

Orabug: 25038731

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_cq.c
drivers/infiniband/hw/sif/sif_int_user.h
drivers/infiniband/hw/sif/sif_r3.c