From 31ec9c2746467a372b009940ce7b722055daaf6a Mon Sep 17 00:00:00 2001 From: Ryder Lee Date: Thu, 5 Nov 2020 04:58:33 +0800 Subject: PCI: mediatek: Configure FC and FTS for functions other than 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "PCI_FUNC(port->slot << 3)" is always 0, so previously mtk_pcie_startup_port() only configured FC credits and FTs for function 0. Compute "func" correctly so we also configure functions other than 0. This affects MT2701 and MT7623. Link: https://lore.kernel.org/r/c529dbfc066f4bda9b87edbdbf771f207e69b84e.1604510053.git.ryder.lee@mediatek.com Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof WilczyƄski --- drivers/pci/controller/pcie-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pci/controller/pcie-mediatek.c') diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index 23548b517e4b..8af04848e0f9 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -760,7 +760,7 @@ static struct pci_ops mtk_pcie_ops = { static int mtk_pcie_startup_port(struct mtk_pcie_port *port) { struct mtk_pcie *pcie = port->pcie; - u32 func = PCI_FUNC(port->slot << 3); + u32 func = PCI_FUNC(port->slot); u32 slot = PCI_SLOT(port->slot << 3); u32 val; int err; -- cgit v1.2.3-70-g09d2 From 87db343f809d611405c45cbb691657e7df5c047d Mon Sep 17 00:00:00 2001 From: Qiheng Lin Date: Wed, 31 Mar 2021 16:59:38 +0800 Subject: PCI: mediatek: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Link: https://lore.kernel.org/r/20210331085938.3115-1-linqiheng@huawei.com Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: Lorenzo Pieralisi --- drivers/pci/controller/pcie-mediatek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/pci/controller/pcie-mediatek.c') diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index 8af04848e0f9..ddbd2f8b3226 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -1210,6 +1210,7 @@ static const struct of_device_id mtk_pcie_ids[] = { { .compatible = "mediatek,mt7629-pcie", .data = &mtk_pcie_soc_mt7629 }, {}, }; +MODULE_DEVICE_TABLE(of, mtk_pcie_ids); static struct platform_driver mtk_pcie_driver = { .probe = mtk_pcie_probe, -- cgit v1.2.3-70-g09d2