]> git.itanic.dy.fi Git - linux-stable/commit
PCI: pciehp: Enable Command Completed Interrupt only if supported
authorPali Rohár <pali@kernel.org>
Tue, 27 Sep 2022 14:19:17 +0000 (16:19 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 7 Dec 2022 14:27:20 +0000 (08:27 -0600)
commit6d4671b534f6c084e92ef167a52dc47e55f636c4
treec24be7b3fa6435d3ecfadf96c341cf2d92d6830e
parent9676f40618df9f8e1ab681486021d6c0df86c5fa
PCI: pciehp: Enable Command Completed Interrupt only if supported

The No Command Completed Support bit in the Slot Capabilities register
indicates whether Command Completed Interrupt Enable is unsupported.

We already check whether No Command Completed Support bit is set in
pcie_wait_cmd(), and do not wait in this case.

Don't enable this Command Completed Interrupt at all if NCCS is set, so
that when users dump configuration space from userspace, the dump does not
confuse them by saying that Command Completed Interrupt is not supported,
but it is enabled.

Link: https://lore.kernel.org/r/20220927141926.8895-2-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
drivers/pci/hotplug/pciehp_hpc.c