mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 15:42:46 +00:00
[SCSI] qla4xxx: Re-register IRQ handler while retrying initialize of adapter
Problem: If initialization of adapter fails for some reason, then the interrupt handlers are released. The interrupt handlers are not registered again when initialization of adapter is retried. Solution: Re-register the interrupt handler when adapter initialization is retried. Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
5b1c1bff07
commit
137257da9e
2 changed files with 5 additions and 24 deletions
|
@ -2986,7 +2986,7 @@ int qla4_8xxx_load_risc(struct scsi_qla_host *ha)
|
||||||
|
|
||||||
retval = qla4_8xxx_device_state_handler(ha);
|
retval = qla4_8xxx_device_state_handler(ha);
|
||||||
|
|
||||||
if (retval == QLA_SUCCESS && !test_bit(AF_INIT_DONE, &ha->flags))
|
if (retval == QLA_SUCCESS && !test_bit(AF_IRQ_ATTACHED, &ha->flags))
|
||||||
retval = qla4xxx_request_irqs(ha);
|
retval = qla4xxx_request_irqs(ha);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
@ -6110,7 +6110,6 @@ qla4xxx_pci_mmio_enabled(struct pci_dev *pdev)
|
||||||
static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
|
static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
|
||||||
{
|
{
|
||||||
uint32_t rval = QLA_ERROR;
|
uint32_t rval = QLA_ERROR;
|
||||||
uint32_t ret = 0;
|
|
||||||
int fn;
|
int fn;
|
||||||
struct pci_dev *other_pdev = NULL;
|
struct pci_dev *other_pdev = NULL;
|
||||||
|
|
||||||
|
@ -6196,16 +6195,7 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
|
||||||
qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, 0);
|
qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, 0);
|
||||||
qla4_8xxx_set_drv_active(ha);
|
qla4_8xxx_set_drv_active(ha);
|
||||||
ha->isp_ops->idc_unlock(ha);
|
ha->isp_ops->idc_unlock(ha);
|
||||||
ret = qla4xxx_request_irqs(ha);
|
ha->isp_ops->enable_intrs(ha);
|
||||||
if (ret) {
|
|
||||||
ql4_printk(KERN_WARNING, ha, "Failed to "
|
|
||||||
"reserve interrupt %d already in use.\n",
|
|
||||||
ha->pdev->irq);
|
|
||||||
rval = QLA_ERROR;
|
|
||||||
} else {
|
|
||||||
ha->isp_ops->enable_intrs(ha);
|
|
||||||
rval = QLA_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ql4_printk(KERN_INFO, ha, "scsi%ld: %s: devfn 0x%x is not "
|
ql4_printk(KERN_INFO, ha, "scsi%ld: %s: devfn 0x%x is not "
|
||||||
|
@ -6215,18 +6205,9 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
|
||||||
QLA8XXX_DEV_READY)) {
|
QLA8XXX_DEV_READY)) {
|
||||||
clear_bit(AF_FW_RECOVERY, &ha->flags);
|
clear_bit(AF_FW_RECOVERY, &ha->flags);
|
||||||
rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER);
|
rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER);
|
||||||
if (rval == QLA_SUCCESS) {
|
if (rval == QLA_SUCCESS)
|
||||||
ret = qla4xxx_request_irqs(ha);
|
ha->isp_ops->enable_intrs(ha);
|
||||||
if (ret) {
|
|
||||||
ql4_printk(KERN_WARNING, ha, "Failed to"
|
|
||||||
" reserve interrupt %d already in"
|
|
||||||
" use.\n", ha->pdev->irq);
|
|
||||||
rval = QLA_ERROR;
|
|
||||||
} else {
|
|
||||||
ha->isp_ops->enable_intrs(ha);
|
|
||||||
rval = QLA_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ha->isp_ops->idc_lock(ha);
|
ha->isp_ops->idc_lock(ha);
|
||||||
qla4_8xxx_set_drv_active(ha);
|
qla4_8xxx_set_drv_active(ha);
|
||||||
ha->isp_ops->idc_unlock(ha);
|
ha->isp_ops->idc_unlock(ha);
|
||||||
|
|
Loading…
Reference in a new issue