aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc
diff options
context:
space:
mode:
authorJianjun Wang <[email protected]>2023-10-23 08:14:23 +0000
committerBjorn Helgaas <[email protected]>2024-01-09 22:42:22 +0000
commit9ccc1318cf4bd90601f221268e42c3374703d681 (patch)
tree3a19b5821fe074da1dec1a83303a20db31f93f19 /drivers/pci/controller/dwc
parentPCI: mediatek: Clear interrupt status before dispatching handler (diff)
downloadkernel-9ccc1318cf4bd90601f221268e42c3374703d681.tar.gz
kernel-9ccc1318cf4bd90601f221268e42c3374703d681.zip
PCI: mediatek-gen3: Fix translation window size calculation
When using the fls() helper, the translation table should be a power of two; otherwise, the resulting value will not be correct. For example, given fls(0x3e00000) - 1 = 25, the PCIe translation window size will be set to 0x2000000 instead of the expected size 0x3e00000. Fix the translation window by splitting the MMIO space into multiple tables if its size is not a power of two. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/[email protected] Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192") Signed-off-by: Jianjun Wang <[email protected]> Signed-off-by: Krzysztof WilczyƄski <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc')
0 files changed, 0 insertions, 0 deletions