From 831b46008fa48ec756bc1ddc66ab9e75207d05b9 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Wed, 2 Apr 2025 15:25:22 +0100
Subject: [PATCH] PCI: pcie-brcmstb: fake MSIx support on internal MSI target

Apparently some NVMe SSD implementations don't fall back to MSI cleanly,
instead making the driver allocate one queue via the legacy interrupt.

There are still only 32 vectors available, but should be sufficient for
the majority of use-cases on BCM2711.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -666,7 +666,8 @@ static void brcm_pcie_set_outbound_win(s
 				 MSI_FLAG_NO_AFFINITY)
 
 #define BRCM_MSI_FLAGS_SUPPORTED (MSI_GENERIC_FLAGS_MASK	| \
-				  MSI_FLAG_MULTI_PCI_MSI)
+				  MSI_FLAG_MULTI_PCI_MSI	| \
+				  MSI_FLAG_PCI_MSIX)
 
 static const struct msi_parent_ops brcm_msi_parent_ops = {
 	.required_flags		= BRCM_MSI_FLAGS_REQUIRED,
