From: Mike Marciniszyn Date: Wed, 8 Feb 2017 13:25:56 +0000 (-0800) Subject: IB/hfi1: Correct defered count after processing qp_wait_list X-Git-Tag: MMI-PSA29.97-13-9~6131^2~43 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fcf1de5a79bfe8ee4c638bd3902d20cd59376de;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git IB/hfi1: Correct defered count after processing qp_wait_list The qp_wait_list processing leaves the defered ack count at its prior value. This can result in a premature send of an ack. Fixed by unconditionally reseting the defered ack count in hfi1_send_rc_ack(). Fixes: Commit 7c091e5c0685 ("staging/rdma/hfi1: add ACK coalescing logic") Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c index 809b26eb6d3c..1dd999e9349c 100644 --- a/drivers/infiniband/hw/hfi1/rc.c +++ b/drivers/infiniband/hw/hfi1/rc.c @@ -853,6 +853,10 @@ void hfi1_send_rc_ack(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp, struct ib_header hdr; struct ib_other_headers *ohdr; unsigned long flags; + struct hfi1_qp_priv *priv = qp->priv; + + /* clear the defer count */ + priv->r_adefered = 0; /* Don't send ACK or NAK if a RDMA read or atomic is pending. */ if (qp->s_flags & RVT_S_RESP_PENDING)