aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index e21b547fd427..6965992ddbbf 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -433,7 +433,7 @@ zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id)
433 * FAILED - otherwise 433 * FAILED - otherwise
434 */ 434 */
435int 435int
436zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) 436__zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
437{ 437{
438 int retval = SUCCESS; 438 int retval = SUCCESS;
439 struct zfcp_fsf_req *new_fsf_req, *old_fsf_req; 439 struct zfcp_fsf_req *new_fsf_req, *old_fsf_req;
@@ -575,7 +575,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
575 *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[0]; 575 *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[0];
576 dbf_fsf_qual[1] = 576 dbf_fsf_qual[1] =
577 *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[2]; 577 *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[2];
578 zfcp_fsf_req_cleanup(new_fsf_req); 578 zfcp_fsf_req_free(new_fsf_req);
579#else 579#else
580 retval = zfcp_fsf_req_wait_and_cleanup(new_fsf_req, 580 retval = zfcp_fsf_req_wait_and_cleanup(new_fsf_req,
581 ZFCP_UNINTERRUPTIBLE, &status); 581 ZFCP_UNINTERRUPTIBLE, &status);
@@ -611,6 +611,17 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
611 return retval; 611 return retval;
612} 612}
613 613
614int
615zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
616{
617 int rc;
618 struct Scsi_Host *scsi_host = scpnt->device->host;
619 spin_lock_irq(scsi_host->host_lock);
620 rc = __zfcp_scsi_eh_abort_handler(scpnt);
621 spin_unlock_irq(scsi_host->host_lock);
622 return rc;
623}
624
614/* 625/*
615 * function: zfcp_scsi_eh_device_reset_handler 626 * function: zfcp_scsi_eh_device_reset_handler
616 * 627 *
@@ -625,8 +636,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
625 struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata; 636 struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata;
626 struct Scsi_Host *scsi_host = scpnt->device->host; 637 struct Scsi_Host *scsi_host = scpnt->device->host;
627 638
628 spin_unlock_irq(scsi_host->host_lock);
629
630 if (!unit) { 639 if (!unit) {
631 ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n"); 640 ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n");
632 retval = SUCCESS; 641 retval = SUCCESS;
@@ -669,7 +678,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
669 retval = SUCCESS; 678 retval = SUCCESS;
670 } 679 }
671 out: 680 out:
672 spin_lock_irq(scsi_host->host_lock);
673 return retval; 681 return retval;
674} 682}
675 683
@@ -723,8 +731,6 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt)
723 struct zfcp_unit *unit; 731 struct zfcp_unit *unit;
724 struct Scsi_Host *scsi_host = scpnt->device->host; 732 struct Scsi_Host *scsi_host = scpnt->device->host;
725 733
726 spin_unlock_irq(scsi_host->host_lock);
727
728 unit = (struct zfcp_unit *) scpnt->device->hostdata; 734 unit = (struct zfcp_unit *) scpnt->device->hostdata;
729 ZFCP_LOG_NORMAL("bus reset because of problems with " 735 ZFCP_LOG_NORMAL("bus reset because of problems with "
730 "unit 0x%016Lx\n", unit->fcp_lun); 736 "unit 0x%016Lx\n", unit->fcp_lun);
@@ -732,7 +738,6 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt)
732 zfcp_erp_wait(unit->port->adapter); 738 zfcp_erp_wait(unit->port->adapter);
733 retval = SUCCESS; 739 retval = SUCCESS;
734 740
735 spin_lock_irq(scsi_host->host_lock);
736 return retval; 741 return retval;
737} 742}
738 743
@@ -750,8 +755,6 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
750 struct zfcp_unit *unit; 755 struct zfcp_unit *unit;
751 struct Scsi_Host *scsi_host = scpnt->device->host; 756 struct Scsi_Host *scsi_host = scpnt->device->host;
752 757
753 spin_unlock_irq(scsi_host->host_lock);
754
755 unit = (struct zfcp_unit *) scpnt->device->hostdata; 758 unit = (struct zfcp_unit *) scpnt->device->hostdata;
756 ZFCP_LOG_NORMAL("host reset because of problems with " 759 ZFCP_LOG_NORMAL("host reset because of problems with "
757 "unit 0x%016Lx\n", unit->fcp_lun); 760 "unit 0x%016Lx\n", unit->fcp_lun);
@@ -759,7 +762,6 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
759 zfcp_erp_wait(unit->port->adapter); 762 zfcp_erp_wait(unit->port->adapter);
760 retval = SUCCESS; 763 retval = SUCCESS;
761 764
762 spin_lock_irq(scsi_host->host_lock);
763 return retval; 765 return retval;
764} 766}
765 767