mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
misc: alcor_pci: Use PCI core to manage ASPM instead of open-coding
"priv->ext_config_dev_aspm" was never set to a non-zero value. Therefore, alcor_pci_aspm_ctrl(priv, 1) did nothing, and alcor_pci_aspm_ctrl(priv, 0) always disabled ASPM in the device and the upstream bridge. The driver disabled ASPM in alcor_pci_probe() and alcor_resume(), so it's possible the device doesn't work well when ASPM is enabled. Remove all the ASPM-related code and replace the alcor_pci_aspm_ctrl(0) calls with pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1), which asks the PCI core to disable ASPM. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20230307213816.886308-1-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b085dbf6c9
commit
8efc52743e
@@ -268,13 +268,6 @@ struct alcor_pci_priv {
|
||||
unsigned long id; /* idr id */
|
||||
|
||||
struct alcor_dev_cfg *cfg;
|
||||
|
||||
/* PCI ASPM related vars */
|
||||
int pdev_cap_off;
|
||||
u8 pdev_aspm_cap;
|
||||
int parent_cap_off;
|
||||
u8 parent_aspm_cap;
|
||||
u8 ext_config_dev_aspm;
|
||||
};
|
||||
|
||||
void alcor_write8(struct alcor_pci_priv *priv, u8 val, unsigned int addr);
|
||||
|
||||
Reference in New Issue
Block a user