Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204168
b: refs/heads/master
c: f3a9c4d
h: refs/heads/master
v: v3
  • Loading branch information
Brian King authored and James Bottomley committed Jul 27, 2010
1 parent b5a2455 commit a360c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1117ef8aed95521f46dae3052c7120baae48c2bb
refs/heads/master: f3a9c4d76a955e331e88992cd3b1e1498c231d52
7 changes: 5 additions & 2 deletions trunk/drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
u64 *crq_as_u64 = (u64 *) &evt_struct->crq;
int request_status = 0;
int rc;
int srp_req = 0;

/* If we have exhausted our request limit, just fail this request,
* unless it is for a reset or abort.
Expand All @@ -556,6 +557,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
* can handle more requests (can_queue) when we actually can't
*/
if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) {
srp_req = 1;
request_status =
atomic_dec_if_positive(&hostdata->request_limit);
/* If request limit was -1 when we started, it is now even
Expand Down Expand Up @@ -630,7 +632,8 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
goto send_busy;
}
dev_err(hostdata->dev, "send error %d\n", rc);
atomic_inc(&hostdata->request_limit);
if (srp_req)
atomic_inc(&hostdata->request_limit);
goto send_error;
}

Expand All @@ -640,7 +643,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev);

free_event_struct(&hostdata->pool, evt_struct);
if (request_status != -1)
if (srp_req && request_status != -1)
atomic_inc(&hostdata->request_limit);
return SCSI_MLQUEUE_HOST_BUSY;

Expand Down

0 comments on commit a360c2f

Please sign in to comment.