summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_cq.c
diff options
context:
space:
mode:
authorRalph Campbell2007-11-09 04:53:01 +0100
committerRoland Dreier2008-01-25 23:15:28 +0100
commit733d12813bd36ed7c727686ac1164f92f87a14a2 (patch)
tree903cfeadcfd6e0ff129fc7736db526889ccf2f50 /drivers/infiniband/hw/ipath/ipath_cq.c
parentIB/ipath: Fix sendctrl locking (diff)
downloadkernel-qcow2-linux-733d12813bd36ed7c727686ac1164f92f87a14a2.tar.gz
kernel-qcow2-linux-733d12813bd36ed7c727686ac1164f92f87a14a2.tar.xz
kernel-qcow2-linux-733d12813bd36ed7c727686ac1164f92f87a14a2.zip
IB/ipath: Fix error returned from ib_resize_cq if new size smaller than # entries
The gen2_basic tests check for the errno value when a CQ is resized smaller than the number of outstanding completions queue on the CQ. This patch changes ib_ipath to return EINVAL which is what ib_mthca returns and what gen2_basic expects. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_cq.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c
index d1380c7a1703..a03bd28d9b48 100644
--- a/drivers/infiniband/hw/ipath/ipath_cq.c
+++ b/drivers/infiniband/hw/ipath/ipath_cq.c
@@ -421,7 +421,7 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
else
n = head - tail;
if (unlikely((u32)cqe < n)) {
- ret = -EOVERFLOW;
+ ret = -EINVAL;
goto bail_unlock;
}
for (n = 0; tail != head; n++) {