]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: mediatek: Use actual physical address instead of virt_to_phys()
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Thu, 21 May 2026 17:19:49 +0000 (17:19 +0000)
committerManivannan Sadhasivam <mani@kernel.org>
Thu, 11 Jun 2026 07:09:35 +0000 (12:39 +0530)
commitebc1d9906894703286d12306a6f242d90cfb49e8
tree154d2d2e138e858d68e89c6970ad76e8d0d9ba78
parentf865a57896bd92d7662eb2818d8f48872e2cbbc7
PCI: mediatek: Use actual physical address instead of virt_to_phys()

The driver previously used virt_to_phys() on the ioremapped register base
(port->base) to compute the MSI message address. Using virt_to_phys() on an
IO mapped address is incorrect because it expects a kernel virtual address.

To fix it, store the physical start of the I/O register region in
mtk_pcie_port->phys_base and use it to build the MSI address. This replaces
the incorrect virt_to_phys() usage and ensures MSI addresses are generated
correctly.

Fixes: 43e6409db64d ("PCI: mediatek: Add MSI support for MT2712 and MT7622")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Tested-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://patch.msgid.link/20260521171951.1495781-2-cjd@cjdns.fr
drivers/pci/controller/pcie-mediatek.c