Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df0ae249 authored by Jeff Garzik 's avatar Jeff Garzik
Browse files

[SCSI] allow sleeping in ->eh_host_reset_handler()

parent 68b3aa7c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -990,8 +990,7 @@ Details:
 *
 *      Returns SUCCESS if command aborted else FAILED
 *
 *      Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
 *      and assumed to be held on return.
 *      Locks: None held
 *
 *      Calling context: kernel thread
 *
+12 −7
Original line number Diff line number Diff line
@@ -1005,13 +1005,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
	return SUCCESS;
}

int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt)
{
	printk ("FC: bus reset!\n");
	return FAILED;
}

int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
{
	fc_channel *fc = FC_SCMND(SCpnt);
	fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@ -1032,6 +1026,17 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
	else return FAILED;
}

int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
{
	int rc;

	spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
	rc = __fcp_scsi_host_reset(SCpnt);
	spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);

	return rc;
}

static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd)
{
	long i;
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ EXPORT_SYMBOL(fc_do_prli);
EXPORT_SYMBOL(fcp_scsi_queuecommand);
EXPORT_SYMBOL(fcp_scsi_abort);
EXPORT_SYMBOL(fcp_scsi_dev_reset);
EXPORT_SYMBOL(fcp_scsi_bus_reset);
EXPORT_SYMBOL(fcp_scsi_host_reset);

#endif /* CONFIG_MODULES */
+0 −1
Original line number Diff line number Diff line
@@ -158,7 +158,6 @@ int fc_do_prli(fc_channel *, unsigned char);
int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int fcp_scsi_abort(Scsi_Cmnd *);
int fcp_scsi_dev_reset(Scsi_Cmnd *);
int fcp_scsi_bus_reset(Scsi_Cmnd *);
int fcp_scsi_host_reset(Scsi_Cmnd *);

#endif /* !(_FCP_SCSI_H) */
+0 −4
Original line number Diff line number Diff line
@@ -1899,7 +1899,6 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
{
	MPT_SCSI_HOST *  hd;
	int              status = SUCCESS;
	spinlock_t	*host_lock = SCpnt->device->host->host_lock;

	/*  If we can't locate the host to reset, then we failed. */
	if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
@@ -1915,7 +1914,6 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
	/*  If our attempts to reset the host failed, then return a failed
	 *  status.  The host will be taken off line by the SCSI mid-layer.
	 */
	spin_unlock_irq(host_lock);
	if (mpt_HardResetHandler(hd->ioc, CAN_SLEEP) < 0){
		status = FAILED;
	} else {
@@ -1925,8 +1923,6 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
		hd->tmPending = 0;
		hd->tmState = TM_STATE_NONE;
	}
	spin_lock_irq(host_lock);


	dtmprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: "
		     "Status = %s\n",
Loading