Skip to content

Commit 645e9c3

Browse files
KAGA-KOKOLorenzo Pieralisi
authored andcommitted
PCI: mediatek: Advertise lack of built-in MSI handling
Some Mediatek host bridges cannot handle MSIs, which is sad. This also results in an ugly warning at device probe time, as the core PCI code wasn't told that MSIs were not available. Advertise this fact to the rest of the core PCI code by using the 'msi_domain' attribute, which still opens the possibility for another block to provide the MSI functionnality. [maz: commit message, switched over to msi_domain attribute] Link: https://lore.kernel.org/r/20210330151145.997953-13-maz@kernel.org Reported-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 9ec37ef commit 645e9c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/pci/controller/pcie-mediatek.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct mtk_pcie_port;
143143
* struct mtk_pcie_soc - differentiate between host generations
144144
* @need_fix_class_id: whether this host's class ID needed to be fixed or not
145145
* @need_fix_device_id: whether this host's device ID needed to be fixed or not
146+
* @no_msi: Bridge has no MSI support, and relies on an external block
146147
* @device_id: device ID which this host need to be fixed
147148
* @ops: pointer to configuration access functions
148149
* @startup: pointer to controller setting functions
@@ -151,6 +152,7 @@ struct mtk_pcie_port;
151152
struct mtk_pcie_soc {
152153
bool need_fix_class_id;
153154
bool need_fix_device_id;
155+
bool no_msi;
154156
unsigned int device_id;
155157
struct pci_ops *ops;
156158
int (*startup)(struct mtk_pcie_port *port);
@@ -1087,6 +1089,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
10871089

10881090
host->ops = pcie->soc->ops;
10891091
host->sysdata = pcie;
1092+
host->msi_domain = pcie->soc->no_msi;
10901093

10911094
err = pci_host_probe(host);
10921095
if (err)
@@ -1176,6 +1179,7 @@ static const struct dev_pm_ops mtk_pcie_pm_ops = {
11761179
};
11771180

11781181
static const struct mtk_pcie_soc mtk_pcie_soc_v1 = {
1182+
.no_msi = true,
11791183
.ops = &mtk_pcie_ops,
11801184
.startup = mtk_pcie_startup_port,
11811185
};

0 commit comments

Comments
 (0)