[SCSI] allow sleeping in ->eh_abort_handler()
[firefly-linux-kernel-4.4.55.git] / drivers / s390 / scsi / zfcp_scsi.c
index e21b547fd427836cc49bad40393c5643f184c5ba..6e4447598495c3a24d976e7da8fd07ae802bcf85 100644 (file)
@@ -433,7 +433,7 @@ zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id)
  *             FAILED  - otherwise
  */
 int
-zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
+__zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
 {
        int retval = SUCCESS;
        struct zfcp_fsf_req *new_fsf_req, *old_fsf_req;
@@ -575,7 +575,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
            *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[0];
        dbf_fsf_qual[1] =
            *(u64 *) & new_fsf_req->qtcb->header.fsf_status_qual.word[2];
-       zfcp_fsf_req_cleanup(new_fsf_req);
+       zfcp_fsf_req_free(new_fsf_req);
 #else
        retval = zfcp_fsf_req_wait_and_cleanup(new_fsf_req,
                                               ZFCP_UNINTERRUPTIBLE, &status);
@@ -611,6 +611,17 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
        return retval;
 }
 
+int
+zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
+{
+       int rc;
+       struct Scsi_Host *scsi_host = scpnt->device->host;
+       spin_lock_irq(scsi_host->host_lock);
+       rc = __zfcp_scsi_eh_abort_handler(scpnt);
+       spin_unlock_irq(scsi_host->host_lock);
+       return rc;
+}
+
 /*
  * function:   zfcp_scsi_eh_device_reset_handler
  *