]> www.infradead.org Git - users/dwmw2/linux.git/commit
PCI: tegra194: Fix Root Port interrupt handling
authorVidya Sagar <vidyas@nvidia.com>
Thu, 21 Jul 2022 14:20:46 +0000 (19:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:16:01 +0000 (15:16 +0200)
commit88a694d9c8700549dadad803b04fa798b576ff23
tree077bf47d9c40fa0d67a192eea1f1249b9c7fc67c
parente2d132ca7fab905bfaa39f03551f02651c6b87da
PCI: tegra194: Fix Root Port interrupt handling

[ Upstream commit 6646e99bcec627e866bc84365af37942c72b4b76 ]

As part of Root Port interrupt handling, level-0 register is read first and
based on the bits set in that, corresponding level-1 registers are read for
further interrupt processing. Since both these values are currently read
into the same 'val' variable, checking level-0 bits the second time around
is happening on the 'val' variable value of level-1 register contents
instead of freshly reading the level-0 value again.

Fix by using different variables to store level-0 and level-1 registers
contents.

Link: https://lore.kernel.org/r/20220721142052.25971-11-vidyas@nvidia.com
Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-tegra194.c