PCI/ASPM: Add pci_enable_link_state()
authorMichael Bottini <michael.a.bottini@linux.intel.com>
Fri, 20 Jan 2023 03:15:19 +0000 (19:15 -0800)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Thu, 2 Feb 2023 15:01:42 +0000 (16:01 +0100)
commitde82f60f9c86b72635ce49f7ab822e6a00a90dca
treebd7e7997f331f2f9732fa2bdfc76730f661b033a
parent1b929c02afd37871d5afb9d498426f83432e71c2
PCI/ASPM: Add pci_enable_link_state()

Add pci_enable_link_state() to allow devices to change the default BIOS
configured states. Clears the BIOS default settings then sets the new
states and reconfigures the link under the semaphore. Also add
PCIE_LINK_STATE_ALL macro for convenience for callers that want to enable
all link states.

Link: https://lore.kernel.org/r/20230120031522.2304439-2-david.e.box@linux.intel.com
Signed-off-by: Michael Bottini <michael.a.bottini@linux.intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aspm.c
include/linux/pci.h