scsi: megaraid_sas: fixup MSIx interrupt setup during resume
Streamline resume workflow by using the same functions for enabling MSIx interrupts as used during initialisation. Without it the driver might crash during resume with: WARNING: CPU: 2 PID: 4306 at ../drivers/pci/msi.c:1303 pci_irq_get_affinity+0x3b/0x90 Link: https://lore.kernel.org/r/20200113132609.69536-1-hare@suse.de Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
00fe717ee1
commit
92b4f9d150
|
@ -7604,7 +7604,6 @@ megasas_resume(struct pci_dev *pdev)
|
|||
int rval;
|
||||
struct Scsi_Host *host;
|
||||
struct megasas_instance *instance;
|
||||
int irq_flags = PCI_IRQ_LEGACY;
|
||||
u32 status_reg;
|
||||
|
||||
instance = pci_get_drvdata(pdev);
|
||||
|
@ -7673,16 +7672,15 @@ megasas_resume(struct pci_dev *pdev)
|
|||
atomic_set(&instance->ldio_outstanding, 0);
|
||||
|
||||
/* Now re-enable MSI-X */
|
||||
if (instance->msix_vectors) {
|
||||
irq_flags = PCI_IRQ_MSIX;
|
||||
if (instance->smp_affinity_enable)
|
||||
irq_flags |= PCI_IRQ_AFFINITY;
|
||||
if (instance->msix_vectors)
|
||||
megasas_alloc_irq_vectors(instance);
|
||||
|
||||
if (!instance->msix_vectors) {
|
||||
rval = pci_alloc_irq_vectors(instance->pdev, 1, 1,
|
||||
PCI_IRQ_LEGACY);
|
||||
if (rval < 0)
|
||||
goto fail_reenable_msix;
|
||||
}
|
||||
rval = pci_alloc_irq_vectors(instance->pdev, 1,
|
||||
instance->msix_vectors ?
|
||||
instance->msix_vectors : 1, irq_flags);
|
||||
if (rval < 0)
|
||||
goto fail_reenable_msix;
|
||||
|
||||
megasas_setup_reply_map(instance);
|
||||
|
||||
|
|
Loading…
Reference in New Issue