Skip to content

Commit 0d98ba8

Browse files
Sinan Kayamartinkpetersen
authored andcommitted
scsi: hpsa: disable device during shutdown
'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]>
1 parent 3aadbe2 commit 0d98ba8

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
@@ -8869,7 +8869,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
88698869
kfree(options);
88708870
}
88718871

8872-
static void hpsa_shutdown(struct pci_dev *pdev)
8872+
static void __hpsa_shutdown(struct pci_dev *pdev)
88738873
{
88748874
struct ctlr_info *h;
88758875

@@ -8884,6 +8884,12 @@ static void hpsa_shutdown(struct pci_dev *pdev)
88848884
hpsa_disable_interrupt_mode(h); /* pci_init 2 */
88858885
}
88868886

8887+
static void hpsa_shutdown(struct pci_dev *pdev)
8888+
{
8889+
__hpsa_shutdown(pdev);
8890+
pci_disable_device(pdev);
8891+
}
8892+
88878893
static void hpsa_free_device_info(struct ctlr_info *h)
88888894
{
88898895
int i;
@@ -8927,7 +8933,7 @@ static void hpsa_remove_one(struct pci_dev *pdev)
89278933
scsi_remove_host(h->scsi_host); /* init_one 8 */
89288934
/* includes hpsa_free_irqs - init_one 4 */
89298935
/* includes hpsa_disable_interrupt_mode - pci_init 2 */
8930-
hpsa_shutdown(pdev);
8936+
__hpsa_shutdown(pdev);
89318937

89328938
hpsa_free_device_info(h); /* scan */
89338939

0 commit comments

Comments
 (0)