summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorIshai Rabinovitz <ishai@mellanox.co.il>2006-09-07 15:00:01 +0300
committerRoland Dreier <rolandd@cisco.com>2006-09-14 13:51:40 -0700
commitadd7afc756eddd5d02fd986d19e6300b3e1a5ae8 (patch)
tree78b79105cae9166ed194180dc9d6f3c8d4dc8fb3 /drivers/infiniband
parent63b98080daa35f0d682db04f4fb7ada010888752 (diff)
downloadop-kernel-dev-add7afc756eddd5d02fd986d19e6300b3e1a5ae8.zip
op-kernel-dev-add7afc756eddd5d02fd986d19e6300b3e1a5ae8.tar.gz
IB/srp: Don't schedule reconnect from srp
If there is a problem in the connection, the SCSI mid-layer will eventually call srp_reset_host(), which will call srp_reconnect(), so we do not need to schedule a call to srp_reconnect_work() from srp_completion(). Removing this prevents srp_reset_host() from failing if a reconnect scheduled from srp_completion() is already in progress, which in turn was causing crashes as both SCSI midlayer and srp_reconnect() were cancelling commands. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8257d5a..fd8344c 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -799,13 +799,6 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
}
-static void srp_reconnect_work(void *target_ptr)
-{
- struct srp_target_port *target = target_ptr;
-
- srp_reconnect_target(target);
-}
-
static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc)
{
struct srp_iu *iu;
@@ -858,7 +851,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
{
struct srp_target_port *target = target_ptr;
struct ib_wc wc;
- unsigned long flags;
ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
while (ib_poll_cq(cq, 1, &wc) > 0) {
@@ -866,10 +858,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
printk(KERN_ERR PFX "failed %s status %d\n",
wc.wr_id & SRP_OP_RECV ? "receive" : "send",
wc.status);
- spin_lock_irqsave(target->scsi_host->host_lock, flags);
- if (target->state == SRP_TARGET_LIVE)
- schedule_work(&target->work);
- spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
break;
}
@@ -1705,8 +1693,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
target->scsi_host = target_host;
target->srp_host = host;
- INIT_WORK(&target->work, srp_reconnect_work, target);
-
INIT_LIST_HEAD(&target->free_reqs);
INIT_LIST_HEAD(&target->req_queue);
for (i = 0; i < SRP_SQ_SIZE; ++i) {
OpenPOWER on IntegriCloud