Commit 4e8b0819 authored by Tomas Henzl's avatar Tomas Henzl Committed by Luis Henriques

hpsa: turn off interrupts when kdump starts

commit 3b747298 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: default avatarScott Teel <scott.teel@pmcs.com>
Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Masoud Sharbiani <msharbiani@twopensource.com>
Cc: Vinson Lee <vlee@twopensource.com>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 3b18b682
...@@ -6529,6 +6529,7 @@ static void hpsa_hba_inquiry(struct ctlr_info *h) ...@@ -6529,6 +6529,7 @@ static void hpsa_hba_inquiry(struct ctlr_info *h)
static int hpsa_init_reset_devices(struct pci_dev *pdev) static int hpsa_init_reset_devices(struct pci_dev *pdev)
{ {
int rc, i; int rc, i;
void __iomem *vaddr;
if (!reset_devices) if (!reset_devices)
return 0; return 0;
...@@ -6550,6 +6551,15 @@ static int hpsa_init_reset_devices(struct pci_dev *pdev) ...@@ -6550,6 +6551,15 @@ static int hpsa_init_reset_devices(struct pci_dev *pdev)
return -ENODEV; return -ENODEV;
} }
pci_set_master(pdev); 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 */ /* Reset the controller with a PCI power-cycle or via doorbell */
rc = hpsa_kdump_hard_reset_controller(pdev); rc = hpsa_kdump_hard_reset_controller(pdev);
......
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