Skip to content

Commit 8f4a489

Browse files
nxpfranklibjorn-helgaas
authored andcommitted
PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off()
The msg_res region translates writes into PCIe Message TLPs. Previously we mapped this region using atu.cpu_addr, the input address programmed into the ATU. "cpu_addr" is a misnomer because when a bus fabric translates addresses between the CPU and the ATU, the ATU input address is different from the CPU address. A future patch will rename "cpu_addr" and correct the value to be the ATU input address instead of the CPU physical address. Map the msg_res region before writing to it using the msg_res resource start, a CPU physical address. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Frank Li <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 2014c95 commit 8f4a489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/dwc/pcie-designware-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static int dw_pcie_pme_turn_off(struct dw_pcie *pci)
908908
if (ret)
909909
return ret;
910910

911-
mem = ioremap(atu.cpu_addr, pci->region_align);
911+
mem = ioremap(pci->pp.msg_res->start, pci->region_align);
912912
if (!mem)
913913
return -ENOMEM;
914914

0 commit comments

Comments
 (0)