aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvscsi.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 83b5a174164c..4f906efb1519 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -548,6 +548,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
548 u64 *crq_as_u64 = (u64 *) &evt_struct->crq; 548 u64 *crq_as_u64 = (u64 *) &evt_struct->crq;
549 int request_status = 0; 549 int request_status = 0;
550 int rc; 550 int rc;
551 int srp_req = 0;
551 552
552 /* If we have exhausted our request limit, just fail this request, 553 /* If we have exhausted our request limit, just fail this request,
553 * unless it is for a reset or abort. 554 * unless it is for a reset or abort.
@@ -556,6 +557,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
556 * can handle more requests (can_queue) when we actually can't 557 * can handle more requests (can_queue) when we actually can't
557 */ 558 */
558 if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) { 559 if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) {
560 srp_req = 1;
559 request_status = 561 request_status =
560 atomic_dec_if_positive(&hostdata->request_limit); 562 atomic_dec_if_positive(&hostdata->request_limit);
561 /* If request limit was -1 when we started, it is now even 563 /* If request limit was -1 when we started, it is now even
@@ -630,7 +632,8 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
630 goto send_busy; 632 goto send_busy;
631 } 633 }
632 dev_err(hostdata->dev, "send error %d\n", rc); 634 dev_err(hostdata->dev, "send error %d\n", rc);
633 atomic_inc(&hostdata->request_limit); 635 if (srp_req)
636 atomic_inc(&hostdata->request_limit);
634 goto send_error; 637 goto send_error;
635 } 638 }
636 639
@@ -640,7 +643,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
640 unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); 643 unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev);
641 644
642 free_event_struct(&hostdata->pool, evt_struct); 645 free_event_struct(&hostdata->pool, evt_struct);
643 if (request_status != -1) 646 if (srp_req && request_status != -1)
644 atomic_inc(&hostdata->request_limit); 647 atomic_inc(&hostdata->request_limit);
645 return SCSI_MLQUEUE_HOST_BUSY; 648 return SCSI_MLQUEUE_HOST_BUSY;
646 649