Commit 473b1e8e authored by Brian King's avatar Brian King Committed by James Bottomley

[SCSI] ipr: Better handle adapter boot time errors

If an ipr adapter encounters an adapter error requiring an
adapter reset to recover from prior to driver load time, the
error will be ignored and recovery will not happen until the
initial timeout occurs waiting for the firmware to come ready,
which means a five minute timeout. Fix is to read the interrupt
register before clearing any of the interrupts at probe time.
Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent a6bcbc2f
...@@ -7444,7 +7444,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, ...@@ -7444,7 +7444,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
unsigned long ipr_regs_pci; unsigned long ipr_regs_pci;
void __iomem *ipr_regs; void __iomem *ipr_regs;
int rc = PCIBIOS_SUCCESSFUL; int rc = PCIBIOS_SUCCESSFUL;
volatile u32 mask, uproc; volatile u32 mask, uproc, interrupts;
ENTER; ENTER;
...@@ -7551,9 +7551,14 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, ...@@ -7551,9 +7551,14 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
* the card is in an unknown state and needs a hard reset * the card is in an unknown state and needs a hard reset
*/ */
mask = readl(ioa_cfg->regs.sense_interrupt_mask_reg); mask = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
interrupts = readl(ioa_cfg->regs.sense_interrupt_reg);
uproc = readl(ioa_cfg->regs.sense_uproc_interrupt_reg); uproc = readl(ioa_cfg->regs.sense_uproc_interrupt_reg);
if ((mask & IPR_PCII_HRRQ_UPDATED) == 0 || (uproc & IPR_UPROCI_RESET_ALERT)) if ((mask & IPR_PCII_HRRQ_UPDATED) == 0 || (uproc & IPR_UPROCI_RESET_ALERT))
ioa_cfg->needs_hard_reset = 1; ioa_cfg->needs_hard_reset = 1;
if (interrupts & IPR_PCII_ERROR_INTERRUPTS)
ioa_cfg->needs_hard_reset = 1;
if (interrupts & IPR_PCII_IOA_UNIT_CHECKED)
ioa_cfg->ioa_unit_checked = 1;
ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER);
rc = request_irq(pdev->irq, ipr_isr, IRQF_SHARED, IPR_NAME, ioa_cfg); rc = request_irq(pdev->irq, ipr_isr, IRQF_SHARED, IPR_NAME, ioa_cfg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment