summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Henzl <thenzl@redhat.com>2015-01-23 16:41:20 -0600
committerZefan Li <lizefan@huawei.com>2015-06-19 11:40:33 +0800
commit52f706062ac08cfbb1b9d689e69949b6440c30eb (patch)
tree8b4e5e79807d00628620d8a0326ee93a3fcd70f0
parent554117937a31d12a6c3fa8d98dcb1bde672130dd (diff)
hpsa: turn off interrupts when kdump starts
commit 3b747298786355c6934b0892fc9ae4ca44105192 upstream. Sometimes when the card is restarted it may cause - "irq 16: nobody cared (try booting with the "irqpoll" option)" that is likely caused so, that the card, after the hard reset finishes, pulls on the irq. Disabling the ints before or after the hpsa_kdump_hard_reset_controller fixes it. At this point we can't know in which state the card is, so using SA5_INTR_OFF + SA5_REPLY_INTR_MASK_OFFSET defines directly, instead of the function the drivers provides, seems to be apropriate. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Vinson Lee <vlee@twopensource.com> [lizf: Backported to 3.4: adjust context] Signed-off-by: Zefan Li <lizefan@huawei.com>
-rw-r--r--drivers/scsi/hpsa.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c45c6a3c1432..cdff47e34d24 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4055,6 +4055,7 @@ static void __devinit hpsa_hba_inquiry(struct ctlr_info *h)
static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev)
{
int rc, i;
+ void __iomem *vaddr;
if (!reset_devices)
return 0;
@@ -4076,6 +4077,15 @@ static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev)
return -ENODEV;
}
pci_set_master(pdev);
+
+ vaddr = pci_ioremap_bar(pdev, 0);
+ if (vaddr == NULL) {
+ rc = -ENOMEM;
+ goto out_disable;
+ }
+ writel(SA5_INTR_OFF, vaddr + SA5_REPLY_INTR_MASK_OFFSET);
+ iounmap(vaddr);
+
/* Reset the controller with a PCI power-cycle or via doorbell */
rc = hpsa_kdump_hard_reset_controller(pdev);