Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39793
b: refs/heads/master
c: 1f5c23e
h: refs/heads/master
i:
  39791: 8ac1976
v: v3
  • Loading branch information
Arthur Kepner authored and Roland Dreier committed Oct 17, 2006
1 parent a6bdeab commit 7321272
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ef93dddfe11a72ab98a37ac4ef20ad681b008b0
refs/heads/master: 1f5c23e2c10d642a23aa3ebb449670a5184b6aab
7 changes: 7 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <linux/init.h>
#include <linux/hardirq.h>

#include <asm/io.h>

#include <rdma/ib_pack.h>

#include "mthca_dev.h"
Expand Down Expand Up @@ -210,6 +212,11 @@ static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq,
mthca_write64(doorbell,
dev->kar + MTHCA_CQ_DOORBELL,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
/*
* Make sure doorbells don't leak out of CQ spinlock
* and reach the HCA out of order:
*/
mmiowb();
}
}

Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <linux/string.h>
#include <linux/slab.h>

#include <asm/io.h>

#include <rdma/ib_verbs.h>
#include <rdma/ib_cache.h>
#include <rdma/ib_pack.h>
Expand Down Expand Up @@ -1732,6 +1734,11 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
mthca_write64(doorbell,
dev->kar + MTHCA_SEND_DOORBELL,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
/*
* Make sure doorbells don't leak out of SQ spinlock
* and reach the HCA out of order:
*/
mmiowb();
}

qp->sq.next_ind = ind;
Expand Down Expand Up @@ -1851,6 +1858,12 @@ int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
qp->rq.next_ind = ind;
qp->rq.head += nreq;

/*
* Make sure doorbells don't leak out of RQ spinlock and reach
* the HCA out of order:
*/
mmiowb();

spin_unlock_irqrestore(&qp->rq.lock, flags);
return err;
}
Expand Down Expand Up @@ -2112,6 +2125,12 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
}

/*
* Make sure doorbells don't leak out of SQ spinlock and reach
* the HCA out of order:
*/
mmiowb();

spin_unlock_irqrestore(&qp->sq.lock, flags);
return err;
}
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <linux/slab.h>
#include <linux/string.h>

#include <asm/io.h>

#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"
Expand Down Expand Up @@ -595,6 +597,12 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
}

/*
* Make sure doorbells don't leak out of SRQ spinlock and
* reach the HCA out of order:
*/
mmiowb();

spin_unlock_irqrestore(&srq->lock, flags);
return err;
}
Expand Down

0 comments on commit 7321272

Please sign in to comment.