OSDN Git Service

iw_cxgb4: complete the cached SRQ buffers
authorRaju Rangoju <rajur@chelsio.com>
Wed, 6 Feb 2019 17:24:43 +0000 (22:54 +0530)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 9 Feb 2019 00:02:05 +0000 (17:02 -0700)
commit11a27e2121a544cae2dde62df9218b3d5d888a02
treee19e33bebb4bd219fb25179c51cf2af8ae3ce8e2
parente381a1cb650d97e213b5943c81bbcadf8f480962
iw_cxgb4: complete the cached SRQ buffers

If TP fetches an SRQ buffer but ends up not using it before the connection
is aborted, then it passes the index of that SRQ buffer to the host in
ABORT_REQ_RSS or ABORT_RPL CPL message.

But, if the srqidx field is zero in the received ABORT_RPL or
ABORT_REQ_RSS CPL, then we need to read the tcb.rq_start field to see if
it really did have an RQE cached. This works around a case where HW does
not include the srqidx in the ABORT_RPL/ABORT_REQ_RSS CPL.

The final value of rq_start is the one present in TCB with the
TF_RX_PDU_OUT bit cleared. So, we need to read the TCB, examine the
TF_RX_PDU_OUT (bit 49 of t_flags) in order to determine if there's a rx
PDU feedback event pending.

Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/t4.h