diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-03-09 06:01:43 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 10:23:27 -0400 |
commit | f1c35e6aea579d5bdb6dc02dfa99c67c7c3b3f67 (patch) | |
tree | 29fcd494910b005edfe37771cf5f6b13142bab62 /drivers/scsi/mpt2sas/mpt2sas_base.c | |
parent | 36dd288f0f930c154ec6a4d73a6a35f3079418c6 (diff) |
[SCSI] mpt2sas: RESCAN Barrier work is added in case of HBA reset.
Add the cancel_pending_work flag from the fw_event_work structure, and then to
set the flag during host reset, check the flag later from work threads
context and if cancel_pending_work_flag is set ingore those events.
Now Rescan after host reset is changed.
Added special task MPT2SAS_RESCAN_AFTER_HOST_RESET. This task will be queued
at the time of HBA reset. this task is treated as barrier. All work after
MPT2SAS_RESCAN_AFTER_HOST_RESET will be treated as new work and will be
server by callback handle. If host_recovery is going on while running RESCAN
task, it will wait for shos_recovery_done completion which will be called
from HBA reset DONE context.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 88e6eebc3159..da4bfbf95a7a 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -3607,6 +3607,8 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
3607 | ioc->ctl_cmds.status = MPT2_CMD_NOT_USED; | 3607 | ioc->ctl_cmds.status = MPT2_CMD_NOT_USED; |
3608 | mutex_init(&ioc->ctl_cmds.mutex); | 3608 | mutex_init(&ioc->ctl_cmds.mutex); |
3609 | 3609 | ||
3610 | init_completion(&ioc->shost_recovery_done); | ||
3611 | |||
3610 | for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) | 3612 | for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) |
3611 | ioc->event_masks[i] = -1; | 3613 | ioc->event_masks[i] = -1; |
3612 | 3614 | ||
@@ -3811,9 +3813,8 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, | |||
3811 | 3813 | ||
3812 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); | 3814 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); |
3813 | ioc->shost_recovery = 0; | 3815 | ioc->shost_recovery = 0; |
3816 | complete(&ioc->shost_recovery_done); | ||
3814 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | 3817 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); |
3815 | 3818 | ||
3816 | if (!r) | ||
3817 | _base_reset_handler(ioc, MPT2_IOC_RUNNING); | ||
3818 | return r; | 3819 | return r; |
3819 | } | 3820 | } |