aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-05-29 07:16:07 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-09 18:29:06 -0400
commite7deff3374cc5951f914dcb3c66bc1b8de8a084e (patch)
tree6c1e416a6cf596c48c4b0fe0b570d014a216df10 /drivers/message/fusion/mptbase.c
parent1ba9ab2eb2c53df52e498779e14cf4e5ea77b0ad (diff)
[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>
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r--drivers/message/fusion/mptbase.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index af862bf6386f..ae203eca831f 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -6243,6 +6243,7 @@ mpt_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
6243{ 6243{
6244 switch (reset_phase) { 6244 switch (reset_phase) {
6245 case MPT_IOC_SETUP_RESET: 6245 case MPT_IOC_SETUP_RESET:
6246 ioc->taskmgmt_quiesce_io = 1;
6246 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT 6247 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
6247 "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); 6248 "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__));
6248 break; 6249 break;
@@ -6595,8 +6596,11 @@ mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
6595 } 6596 }
6596 retval = 0; 6597 retval = 0;
6597 ioc->taskmgmt_in_progress = 1; 6598 ioc->taskmgmt_in_progress = 1;
6598 if (ioc->alt_ioc) 6599 ioc->taskmgmt_quiesce_io = 1;
6600 if (ioc->alt_ioc) {
6599 ioc->alt_ioc->taskmgmt_in_progress = 1; 6601 ioc->alt_ioc->taskmgmt_in_progress = 1;
6602 ioc->alt_ioc->taskmgmt_quiesce_io = 1;
6603 }
6600 out: 6604 out:
6601 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); 6605 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
6602 return retval; 6606 return retval;
@@ -6615,8 +6619,11 @@ mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
6615 6619
6616 spin_lock_irqsave(&ioc->taskmgmt_lock, flags); 6620 spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
6617 ioc->taskmgmt_in_progress = 0; 6621 ioc->taskmgmt_in_progress = 0;
6618 if (ioc->alt_ioc) 6622 ioc->taskmgmt_quiesce_io = 0;
6623 if (ioc->alt_ioc) {
6619 ioc->alt_ioc->taskmgmt_in_progress = 0; 6624 ioc->alt_ioc->taskmgmt_in_progress = 0;
6625 ioc->alt_ioc->taskmgmt_quiesce_io = 0;
6626 }
6620 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); 6627 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
6621} 6628}
6622EXPORT_SYMBOL(mpt_clear_taskmgmt_in_progress_flag); 6629EXPORT_SYMBOL(mpt_clear_taskmgmt_in_progress_flag);
@@ -6731,9 +6738,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
6731 6738
6732 spin_lock_irqsave(&ioc->taskmgmt_lock, flags); 6739 spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
6733 ioc->ioc_reset_in_progress = 0; 6740 ioc->ioc_reset_in_progress = 0;
6741 ioc->taskmgmt_quiesce_io = 0;
6734 ioc->taskmgmt_in_progress = 0; 6742 ioc->taskmgmt_in_progress = 0;
6735 if (ioc->alt_ioc) { 6743 if (ioc->alt_ioc) {
6736 ioc->alt_ioc->ioc_reset_in_progress = 0; 6744 ioc->alt_ioc->ioc_reset_in_progress = 0;
6745 ioc->alt_ioc->taskmgmt_quiesce_io = 0;
6737 ioc->alt_ioc->taskmgmt_in_progress = 0; 6746 ioc->alt_ioc->taskmgmt_in_progress = 0;
6738 } 6747 }
6739 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags); 6748 spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);