IB/mthca: Fix posting >255 recv WRs for Tavor
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Mon, 14 May 2007 04:26:51 +0000 (07:26 +0300)
committerRoland Dreier <rolandd@cisco.com>
Mon, 14 May 2007 21:10:34 +0000 (14:10 -0700)
Fix posting lists of > 255 receive WRs for Tavor: rq.next_ind must
be updated each doorbell, otherwise the next doorbell will use an
incorrect index.

Found by Ronni Zimmermann at Mellanox.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_qp.c

index fee60c852d1441e032293bab94c2d011cceb517a..72fabb822f1c0dbccdd797b02cd3625f415f9821 100644 (file)
@@ -1862,6 +1862,7 @@ int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
                                      dev->kar + MTHCA_RECEIVE_DOORBELL,
                                      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
 
+                       qp->rq.next_ind = ind;
                        qp->rq.head += MTHCA_TAVOR_MAX_WQES_PER_RECV_DB;
                        size0 = 0;
                }