[SCSI] mpt2sas: Early return from function if shost is in recovery.
Aded checks for shost_recovery flag for early return from function. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
89009fbb7d
commit
6558bbb145
|
@ -3521,7 +3521,9 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc)
|
||||||
__func__));
|
__func__));
|
||||||
|
|
||||||
_base_mask_interrupts(ioc);
|
_base_mask_interrupts(ioc);
|
||||||
|
ioc->shost_recovery = 1;
|
||||||
_base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
|
_base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
|
||||||
|
ioc->shost_recovery = 0;
|
||||||
if (ioc->pci_irq) {
|
if (ioc->pci_irq) {
|
||||||
synchronize_irq(pdev->irq);
|
synchronize_irq(pdev->irq);
|
||||||
free_irq(ioc->pci_irq, ioc);
|
free_irq(ioc->pci_irq, ioc);
|
||||||
|
|
|
@ -1979,7 +1979,7 @@ mpt2sas_scsih_issue_tm(struct MPT2SAS_ADAPTER *ioc, u16 handle, uint lun,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioc->shost_recovery) {
|
if (ioc->shost_recovery || ioc->remove_host) {
|
||||||
printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n",
|
printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n",
|
||||||
__func__, ioc->name);
|
__func__, ioc->name);
|
||||||
return;
|
return;
|
||||||
|
@ -4246,7 +4246,7 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc,
|
||||||
_scsih_sas_topology_change_event_debug(ioc, event_data);
|
_scsih_sas_topology_change_event_debug(ioc, event_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ioc->shost_recovery)
|
if (ioc->shost_recovery || ioc->remove_host)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ioc->sas_hba.num_phys)
|
if (!ioc->sas_hba.num_phys)
|
||||||
|
@ -4285,7 +4285,7 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc,
|
||||||
"expander event\n", ioc->name));
|
"expander event\n", ioc->name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ioc->shost_recovery)
|
if (ioc->shost_recovery || ioc->remove_host)
|
||||||
return;
|
return;
|
||||||
phy_number = event_data->StartPhyNum + i;
|
phy_number = event_data->StartPhyNum + i;
|
||||||
reason_code = event_data->PHY[i].PhyStatus &
|
reason_code = event_data->PHY[i].PhyStatus &
|
||||||
|
|
Loading…
Reference in New Issue