diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/iw_cxgb4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index b5678ac97393..d87e1650f643 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
@@ -196,7 +196,7 @@ static inline int c4iw_num_stags(struct c4iw_rdev *rdev) | |||
196 | return (int)(rdev->lldi.vr->stag.size >> 5); | 196 | return (int)(rdev->lldi.vr->stag.size >> 5); |
197 | } | 197 | } |
198 | 198 | ||
199 | #define C4IW_WR_TO (30*HZ) | 199 | #define C4IW_WR_TO (60*HZ) |
200 | 200 | ||
201 | struct c4iw_wr_wait { | 201 | struct c4iw_wr_wait { |
202 | struct completion completion; | 202 | struct completion completion; |
@@ -220,22 +220,21 @@ static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, | |||
220 | u32 hwtid, u32 qpid, | 220 | u32 hwtid, u32 qpid, |
221 | const char *func) | 221 | const char *func) |
222 | { | 222 | { |
223 | unsigned to = C4IW_WR_TO; | ||
224 | int ret; | 223 | int ret; |
225 | 224 | ||
226 | do { | 225 | if (c4iw_fatal_error(rdev)) { |
227 | ret = wait_for_completion_timeout(&wr_waitp->completion, to); | 226 | wr_waitp->ret = -EIO; |
228 | if (!ret) { | 227 | goto out; |
229 | printk(KERN_ERR MOD "%s - Device %s not responding - " | 228 | } |
230 | "tid %u qpid %u\n", func, | 229 | |
231 | pci_name(rdev->lldi.pdev), hwtid, qpid); | 230 | ret = wait_for_completion_timeout(&wr_waitp->completion, C4IW_WR_TO); |
232 | if (c4iw_fatal_error(rdev)) { | 231 | if (!ret) { |
233 | wr_waitp->ret = -EIO; | 232 | PDBG("%s - Device %s not responding (disabling device) - tid %u qpid %u\n", |
234 | break; | 233 | func, pci_name(rdev->lldi.pdev), hwtid, qpid); |
235 | } | 234 | rdev->flags |= T4_FATAL_ERROR; |
236 | to = to << 2; | 235 | wr_waitp->ret = -EIO; |
237 | } | 236 | } |
238 | } while (!ret); | 237 | out: |
239 | if (wr_waitp->ret) | 238 | if (wr_waitp->ret) |
240 | PDBG("%s: FW reply %d tid %u qpid %u\n", | 239 | PDBG("%s: FW reply %d tid %u qpid %u\n", |
241 | pci_name(rdev->lldi.pdev), wr_waitp->ret, hwtid, qpid); | 240 | pci_name(rdev->lldi.pdev), wr_waitp->ret, hwtid, qpid); |