Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46222
b: refs/heads/master
c: 1033ff6
h: refs/heads/master
v: v3
  • Loading branch information
Ishai Rabinovitz authored and Roland Dreier committed Feb 4, 2007
1 parent 89d32d2 commit 3dbd2b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 062dbb69f32b9ccea701b30f8cc0049482e6211f
refs/heads/master: 1033ff670d49760604f5d4c73a1b60741863a406
7 changes: 7 additions & 0 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ static int srp_reconnect_target(struct srp_target_port *target)
target->tx_head = 0;
target->tx_tail = 0;

target->qp_in_error = 0;
ret = srp_connect_target(target);
if (ret)
goto err;
Expand Down Expand Up @@ -878,6 +879,7 @@ 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);
target->qp_in_error = 1;
break;
}

Expand Down Expand Up @@ -1337,6 +1339,8 @@ static int srp_abort(struct scsi_cmnd *scmnd)

printk(KERN_ERR "SRP abort called\n");

if (target->qp_in_error)
return FAILED;
if (srp_find_req(target, scmnd, &req))
return FAILED;
if (srp_send_tsk_mgmt(target, req, SRP_TSK_ABORT_TASK))
Expand Down Expand Up @@ -1365,6 +1369,8 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)

printk(KERN_ERR "SRP reset_device called\n");

if (target->qp_in_error)
return FAILED;
if (srp_find_req(target, scmnd, &req))
return FAILED;
if (srp_send_tsk_mgmt(target, req, SRP_TSK_LUN_RESET))
Expand Down Expand Up @@ -1801,6 +1807,7 @@ static ssize_t srp_create_target(struct class_device *class_dev,
goto err_free;
}

target->qp_in_error = 0;
ret = srp_connect_target(target);
if (ret) {
printk(KERN_ERR PFX "Connection failed\n");
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ struct srp_target_port {
struct completion done;
int status;
enum srp_target_state state;
int qp_in_error;
};

struct srp_iu {
Expand Down

0 comments on commit 3dbd2b0

Please sign in to comment.