summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/mem.c
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2010-09-10 11:15:25 -0500
committerRoland Dreier <rolandd@cisco.com>2010-09-28 10:46:34 -0700
commitaadc4df3087a33ca7fc37f91a024e7b7efdafa75 (patch)
tree41e5da5350ce779d1f6058329166ab9da0cc4c61 /drivers/infiniband/hw/cxgb4/mem.c
parent9e8d1fa3420f489da8a5da47c026511aa71fa50b (diff)
downloadblackbird-op-linux-aadc4df3087a33ca7fc37f91a024e7b7efdafa75.tar.gz
blackbird-op-linux-aadc4df3087a33ca7fc37f91a024e7b7efdafa75.zip
RDMA/cxgb4: Centralize the wait logic
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/mem.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/mem.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index f61562cc7413..273ffe49525a 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -103,14 +103,7 @@ static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len,
len -= C4IW_MAX_INLINE_SIZE;
}
- wait_event_timeout(wr_wait.wait, wr_wait.done, C4IW_WR_TO);
- if (!wr_wait.done) {
- printk(KERN_ERR MOD "Device %s not responding!\n",
- pci_name(rdev->lldi.pdev));
- rdev->flags = T4_FATAL_ERROR;
- ret = -EIO;
- } else
- ret = wr_wait.ret;
+ ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, __func__);
return ret;
}
OpenPOWER on IntegriCloud