• Benjamin Rood's avatar
    pm80xx: avoid a panic if MSI(X) interrupts are disabled · c913df3f
    Benjamin Rood authored
    If MSI(X) interrupts are disabled via the kernel command line
    (pci=nomsi), the pm8001 driver will kernel panic because it does not
    detect that MSI interrupts are disabled and will soldier on and attempt to
    configure MSI interrupts anyways.  This leads to a kernel panic, most
    likely because a required data structure is not available down the
    line.  Using the pci_msi_enabled() function in order to detect if MSI
    interrupts are enabled before configuring them resolves this issue and
    avoids a kernel panic when the module is loaded.  Additionally, the
    irq_vector structure must be initialized when legacy interrupts are
    being used otherwise legacy interrupts will simply not function and
    result in another panic.
    Signed-off-by: default avatarBenjamin Rood <brood@attotech.com>
    Reviewed-by: default avatarJack Wang <jinpu.wang@profitbricks.com>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    c913df3f
pm8001_init.c 41.4 KB