From: Marc Zyngier maz@kernel.org
stable inclusion from stable-5.10.81 commit 5bf5f464831c26dca627bf32d4e51067dcd39d64 bugzilla: 185832 https://gitee.com/openeuler/kernel/issues/I4L9CF
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
commit f21082fb20dbfb3e42b769b59ef21c2a7f2c7c1f upstream.
The ION AHCI device pretends that MSI masking isn't a thing, while it actually implements it and needs MSIs to be unmasked to work. Add a quirk to that effect.
Reported-by: Rui Salvaterra rsalvaterra@gmail.com Signed-off-by: Marc Zyngier maz@kernel.org Signed-off-by: Thomas Gleixner tglx@linutronix.de Tested-by: Rui Salvaterra rsalvaterra@gmail.com Reviewed-by: Thomas Gleixner tglx@linutronix.de Cc: Bjorn Helgaas helgaas@kernel.org Link: https://lore.kernel.org/r/CALjTZvbzYfBuLB+H=fj2J+9=DxjQ2Uqcy0if_PvmJ-nU-qEgk... Link: https://lore.kernel.org/r/20211104180130.3825416-3-maz@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Chen Jun chenjun102@huawei.com
Conflicts: drivers/pci/quirks.c Acked-by: Weilong Chen chenweilong@huawei.com
Signed-off-by: Chen Jun chenjun102@huawei.com --- drivers/pci/quirks.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1f289e248bc5..7ec42a6ab964 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5785,3 +5785,9 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) } DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); + +static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) +{ + pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);