aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/cm.c
diff options
context:
space:
mode:
authorHariprasad S <hariprasad@chelsio.com>2015-09-08 09:56:57 +0530
committerDoug Ledford <dledford@redhat.com>2015-10-21 17:16:10 -0400
commit99718e59fa8425753a8ec2aceb9ec3faa865eeb6 (patch)
tree53794b91ef4c1013d71fba03889379e2429423cf /drivers/infiniband/hw/cxgb4/cm.c
parentIB/core: avoid 32-bit warning (diff)
downloadlinux-dev-99718e59fa8425753a8ec2aceb9ec3faa865eeb6.tar.xz
linux-dev-99718e59fa8425753a8ec2aceb9ec3faa865eeb6.zip
iw_cxgb4: detect fatal errors while creating listening filters
In c4iw_create_listen(), if we're using listen filters, then bail out of the busy loop if the device becomes fatally dead Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cm.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index debc39d2cbc2..24efe52f1d68 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -3260,6 +3260,10 @@ static int create_server4(struct c4iw_dev *dev, struct c4iw_listen_ep *ep)
sin->sin_addr.s_addr, sin->sin_port, 0,
ep->com.dev->rdev.lldi.rxq_ids[0], 0, 0);
if (err == -EBUSY) {
+ if (c4iw_fatal_error(&ep->com.dev->rdev)) {
+ err = -EIO;
+ break;
+ }
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(usecs_to_jiffies(100));
}