[SCSI] mpt fusion: Adding DeviceResetCtx for internal Device reset frame
1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from _MPT_SCSI_HOST struct. 2.) Reset from Scsi mid layer and internal Reset are seperate context. Adding DeviceResetCtx for internal Device reset frame. mptsas_taskmgmt_complete is optimized as part of implementation. Signed-off-by: Kashyap Desai <kadesai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:

committed by
James Bottomley

parent
1ba9ab2eb2
commit
e7deff3374
@@ -6243,6 +6243,7 @@ mpt_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
|
||||
{
|
||||
switch (reset_phase) {
|
||||
case MPT_IOC_SETUP_RESET:
|
||||
ioc->taskmgmt_quiesce_io = 1;
|
||||
dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__));
|
||||
break;
|
||||
@@ -6595,8 +6596,11 @@ mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
|
||||
}
|
||||
retval = 0;
|
||||
ioc->taskmgmt_in_progress = 1;
|
||||
if (ioc->alt_ioc)
|
||||
ioc->taskmgmt_quiesce_io = 1;
|
||||
if (ioc->alt_ioc) {
|
||||
ioc->alt_ioc->taskmgmt_in_progress = 1;
|
||||
ioc->alt_ioc->taskmgmt_quiesce_io = 1;
|
||||
}
|
||||
out:
|
||||
spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
|
||||
return retval;
|
||||
@@ -6615,8 +6619,11 @@ mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
|
||||
|
||||
spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
|
||||
ioc->taskmgmt_in_progress = 0;
|
||||
if (ioc->alt_ioc)
|
||||
ioc->taskmgmt_quiesce_io = 0;
|
||||
if (ioc->alt_ioc) {
|
||||
ioc->alt_ioc->taskmgmt_in_progress = 0;
|
||||
ioc->alt_ioc->taskmgmt_quiesce_io = 0;
|
||||
}
|
||||
spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(mpt_clear_taskmgmt_in_progress_flag);
|
||||
@@ -6731,9 +6738,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
|
||||
|
||||
spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
|
||||
ioc->ioc_reset_in_progress = 0;
|
||||
ioc->taskmgmt_quiesce_io = 0;
|
||||
ioc->taskmgmt_in_progress = 0;
|
||||
if (ioc->alt_ioc) {
|
||||
ioc->alt_ioc->ioc_reset_in_progress = 0;
|
||||
ioc->alt_ioc->taskmgmt_quiesce_io = 0;
|
||||
ioc->alt_ioc->taskmgmt_in_progress = 0;
|
||||
}
|
||||
spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
|
||||
|
Reference in New Issue
Block a user