git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
drivers
/
infiniband
/
hw
/
mthca
/
mthca_srq.c
diff --git
a/drivers/infiniband/hw/mthca/mthca_srq.c
b/drivers/infiniband/hw/mthca/mthca_srq.c
index
a01f1a8
..
b292fef
100644
(file)
--- a/
drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/
drivers/infiniband/hw/mthca/mthca_srq.c
@@
-35,8
+35,6
@@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/string.h>
-#include <asm/io.h>
-
#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"
#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"
@@
-245,7
+243,6
@@
int mthca_alloc_srq(struct mthca_dev *dev, struct mthca_pd *pd,
spin_lock_init(&srq->lock);
srq->refcount = 1;
init_waitqueue_head(&srq->wait);
spin_lock_init(&srq->lock);
srq->refcount = 1;
init_waitqueue_head(&srq->wait);
- mutex_init(&srq->mutex);
if (mthca_is_memfree(dev))
mthca_arbel_init_srq_context(dev, pd, srq, mailbox->buf);
if (mthca_is_memfree(dev))
mthca_arbel_init_srq_context(dev, pd, srq, mailbox->buf);
@@
-372,14
+369,9
@@
int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
return -EINVAL;
if (attr_mask & IB_SRQ_LIMIT) {
return -EINVAL;
if (attr_mask & IB_SRQ_LIMIT) {
- u32 max_wr = mthca_is_memfree(dev) ? srq->max - 1 : srq->max;
- if (attr->srq_limit > max_wr)
+ if (attr->srq_limit > srq->max)
return -EINVAL;
return -EINVAL;
-
- mutex_lock(&srq->mutex);
ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit, &status);
ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit, &status);
- mutex_unlock(&srq->mutex);
-
if (ret)
return ret;
if (status)
if (ret)
return ret;
if (status)
@@
-595,12
+587,6
@@
int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
}
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;
}
spin_unlock_irqrestore(&srq->lock, flags);
return err;
}