Skip to content

Commit 2829829

Browse files
Sinan Kayagregkh
authored andcommitted
scsi: hpsa: disable device during shutdown
commit 0d98ba8 upstream. 'Commit cc27b73 ("PCI/portdrv: Turn off PCIe services during shutdown")' has been added to kernel to shutdown pending PCIe port service interrupts during reboot so that a newly started kexec kernel wouldn't observe pending interrupts. pcie_port_device_remove() is disabling the root port and switches by calling pci_disable_device() after all PCIe service drivers are shutdown. This has been found to cause crashes on HP DL360 Gen9 machines during reboot due to hpsa driver not clearing the bus master bit during the shutdown procedure by calling pci_disable_device(). Disable device as part of the shutdown sequence. Signed-off-by: Sinan Kaya <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=199779 Fixes: cc27b73 ("PCI/portdrv: Turn off PCIe services during shutdown") Cc: [email protected] Reported-by: Ryan Finnie <[email protected]> Tested-by: Don Brace <[email protected]> Acked-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2d32996 commit 2829829

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/scsi/hpsa.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8638,7 +8638,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
86388638
kfree(options);
86398639
}
86408640

8641-
static void hpsa_shutdown(struct pci_dev *pdev)
8641+
static void __hpsa_shutdown(struct pci_dev *pdev)
86428642
{
86438643
struct ctlr_info *h;
86448644

@@ -8653,6 +8653,12 @@ static void hpsa_shutdown(struct pci_dev *pdev)
86538653
hpsa_disable_interrupt_mode(h); /* pci_init 2 */
86548654
}
86558655

8656+
static void hpsa_shutdown(struct pci_dev *pdev)
8657+
{
8658+
__hpsa_shutdown(pdev);
8659+
pci_disable_device(pdev);
8660+
}
8661+
86568662
static void hpsa_free_device_info(struct ctlr_info *h)
86578663
{
86588664
int i;
@@ -8696,7 +8702,7 @@ static void hpsa_remove_one(struct pci_dev *pdev)
86968702
scsi_remove_host(h->scsi_host); /* init_one 8 */
86978703
/* includes hpsa_free_irqs - init_one 4 */
86988704
/* includes hpsa_disable_interrupt_mode - pci_init 2 */
8699-
hpsa_shutdown(pdev);
8705+
__hpsa_shutdown(pdev);
87008706

87018707
hpsa_free_device_info(h); /* scan */
87028708

0 commit comments

Comments
 (0)