]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hpsa: turn off interrupts when kdump starts
authorTomas Henzl <thenzl@redhat.com>
Fri, 23 Jan 2015 22:41:20 +0000 (16:41 -0600)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 May 2015 12:33:44 +0000 (14:33 +0200)
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/hpsa.c

index 74f5cebde95a809c1fa6b1efa86e52e8440ab455..64e15408a354253925a862fd5d5f2b09bfb9bf49 100644 (file)
@@ -4457,6 +4457,7 @@ static void hpsa_hba_inquiry(struct ctlr_info *h)
 static int hpsa_init_reset_devices(struct pci_dev *pdev)
 {
        int rc, i;
+       void __iomem *vaddr;
 
        if (!reset_devices)
                return 0;
@@ -4478,6 +4479,15 @@ static 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);