[SCSI] allow sleeping in ->eh_bus_reset_handler()
[deliverable/linux.git] / drivers / message / fusion / mptscsih.c
index c8492034cfe75acbc60bbdc1534fccb81d190d35..efae9be453706a4c53c0070f23ae9aa9bdc0eba8 100644 (file)
@@ -1707,7 +1707,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
        MPT_FRAME_HDR   *mf;
        u32              ctx2abort;
        int              scpnt_idx;
-       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /* If we can't locate our host adapter structure, return FAILED status.
         */
@@ -1755,7 +1754,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
 
        hd->abortSCpnt = SCpnt;
 
-       spin_unlock_irq(host_lock);
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
                SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun,
                ctx2abort, 2 /* 2 second timeout */)
@@ -1772,8 +1770,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
 
-               spin_lock_irq(host_lock);
-
                /* Unmap the DMA buffers, if any. */
                if (SCpnt->use_sg) {
                        pci_unmap_sg(ioc->pcidev, (struct scatterlist *) SCpnt->request_buffer,
@@ -1789,7 +1785,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
                mpt_free_msg_frame(ioc, mf);
                return FAILED;
        }
-       spin_lock_irq(host_lock);
        return SUCCESS;
 }
 
@@ -1806,7 +1801,6 @@ int
 mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
 {
        MPT_SCSI_HOST   *hd;
-       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /* If we can't locate our host adapter structure, return FAILED status.
         */
@@ -1823,7 +1817,6 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
        printk(KERN_WARNING MYNAM ": %s: >> Attempting target reset! (sc=%p)\n",
               hd->ioc->name, SCpnt);
 
-       spin_unlock_irq(host_lock);
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
                SCpnt->device->channel, SCpnt->device->id,
                0, 0, 5 /* 5 second timeout */)
@@ -1835,12 +1828,10 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
                                hd->ioc->name, SCpnt);
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
-               spin_lock_irq(host_lock);
                return FAILED;
        }
-       spin_lock_irq(host_lock);
-       return SUCCESS;
 
+       return SUCCESS;
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -1874,7 +1865,6 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
                hd->timeouts++;
 
        /* We are now ready to execute the task management request. */
-       spin_unlock_irq(host_lock);
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
                SCpnt->device->channel, 0, 0, 0, 5 /* 5 second timeout */)
            < 0){
@@ -1890,7 +1880,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
                spin_lock_irq(host_lock);
                return FAILED;
        }
-       spin_lock_irq(host_lock);
+
        return SUCCESS;
 }
 
This page took 0.026724 seconds and 5 git commands to generate.