diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index fa2cb3582cfa..b6714da4d6e2 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -5887,7 +5887,12 @@ static int __devinit ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg) | |||
5887 | ENTER; | 5887 | ENTER; |
5888 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); | 5888 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); |
5889 | dev_dbg(&ioa_cfg->pdev->dev, "ioa_cfg adx: 0x%p\n", ioa_cfg); | 5889 | dev_dbg(&ioa_cfg->pdev->dev, "ioa_cfg adx: 0x%p\n", ioa_cfg); |
5890 | _ipr_initiate_ioa_reset(ioa_cfg, ipr_reset_enable_ioa, IPR_SHUTDOWN_NONE); | 5890 | if (ioa_cfg->needs_hard_reset) { |
5891 | ioa_cfg->needs_hard_reset = 0; | ||
5892 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); | ||
5893 | } else | ||
5894 | _ipr_initiate_ioa_reset(ioa_cfg, ipr_reset_enable_ioa, | ||
5895 | IPR_SHUTDOWN_NONE); | ||
5891 | 5896 | ||
5892 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); | 5897 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); |
5893 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); | 5898 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); |
@@ -6264,6 +6269,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | |||
6264 | unsigned long ipr_regs_pci; | 6269 | unsigned long ipr_regs_pci; |
6265 | void __iomem *ipr_regs; | 6270 | void __iomem *ipr_regs; |
6266 | u32 rc = PCIBIOS_SUCCESSFUL; | 6271 | u32 rc = PCIBIOS_SUCCESSFUL; |
6272 | volatile u32 mask, uproc; | ||
6267 | 6273 | ||
6268 | ENTER; | 6274 | ENTER; |
6269 | 6275 | ||
@@ -6356,6 +6362,15 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | |||
6356 | goto cleanup_nomem; | 6362 | goto cleanup_nomem; |
6357 | } | 6363 | } |
6358 | 6364 | ||
6365 | /* | ||
6366 | * If HRRQ updated interrupt is not masked, or reset alert is set, | ||
6367 | * the card is in an unknown state and needs a hard reset | ||
6368 | */ | ||
6369 | mask = readl(ioa_cfg->regs.sense_interrupt_mask_reg); | ||
6370 | uproc = readl(ioa_cfg->regs.sense_uproc_interrupt_reg); | ||
6371 | if ((mask & IPR_PCII_HRRQ_UPDATED) == 0 || (uproc & IPR_UPROCI_RESET_ALERT)) | ||
6372 | ioa_cfg->needs_hard_reset = 1; | ||
6373 | |||
6359 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); | 6374 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); |
6360 | rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); | 6375 | rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); |
6361 | 6376 | ||