]> git.baikalelectronics.ru Git - kernel.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>
Wed, 17 Aug 2022 12:23:57 +0000 (14:23 +0200)
commit01b1dcb4dcedc3d56403b7cabf44348bc57f0589
tree1ae4d8045f8623b338a2d66e4dfdb0aebd108d71
parent284fb6b796afb4d2bc68b66b84f8fa7cfdaab159
PCI: tegra194: Fix Root Port interrupt handling

[ Upstream commit 12caa8b3050d1ff7a8296bbe92c722f8e532fedd ]

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: 5e6510231597 ("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