[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230918131103.24119-1-ilpo.jarvinen@linux.intel.com>
Date: Mon, 18 Sep 2023 16:10:50 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-pci@...r.kernel.org,
Bjorn Helgaas <helgaas@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Lukas Wunner <lukas@...ner.de>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
linux-kernel@...r.kernel.org
Cc: ath10k@...ts.infradead.org,
ath11k@...ts.infradead.org,
ath12k@...ts.infradead.org,
intel-wired-lan@...ts.osuosl.org,
linux-arm-kernel@...ts.infradead.org,
linux-bluetooth@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-rdma@...r.kernel.org,
linux-wireless@...r.kernel.org,
netdev@...r.kernel.org,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH v2 00/13] PCI/ASPM: Make ASPM in core robust and remove driver workarounds
Previously, ASPM service driver has ignored link state management
requests when OS is not authorized to touch LNKCTL (or ASPM is not
configured at all). Because the core interface has not been reliable,
drivers have create workarounds to force ASPM state by directly
writing into LNKCTL themselves.
A second problem is lack of symmetric pair for
pci_disable_link_state(). Any link state disable is permanent (NOTE:
pci_enable_link_state() despite its name is not a symmetric pair for
pci_disable_link_state()). The lack of way to re-enable ASPM prevents
drivers from using pci_disable_link_state() to disabling ASPM for
certain phases of driver operation and re-enabling it later.
Both cases are problematic because when ASPM is working normally
through the service driver, it is not aware of the extra link state
changes drivers perform directly causing the service driver to have
incorrect view about the ASPM state.
Address these problems by making pci_disable_link_state() reliable and
by providing proper pci_enable_link_state() pair for it (the function
currently on the way is renamed first to a more descriptive name).
After core improvements, convert drivers to use the new interface and
drop the workarounds.
v2:
- Rebased the series
- Reorder patches (rename patch first)
Ilpo Järvinen (13):
PCI/ASPM: Rename pci_enable_link_state() to
pci_set_default_link_state()
PCI/ASPM: Improve pci_set_default_link_state() kerneldoc
PCI/ASPM: Disable ASPM when driver requests it
PCI/ASPM: Move L0S/L1/sub states mask calculation into a helper
PCI/ASPM: Add pci_enable_link_state()
Bluetooth: hci_bcm4377: Convert aspm disable to quirk
mt76: Remove unreliable pci_disable_link_state() workaround
e1000e: Remove unreliable pci_disable_link_state{,_locked}()
workaround
wifi: ath10k: Use pci_disable/enable_link_state()
wifi: ath11k: Use pci_disable/enable_link_state()
wifi: ath12k: Use pci_disable/enable_link_state()
RDMA/hfi1: Use pci_disable/enable_link_state()
misc: rtsx: Use pci_disable/enable_link_state()
drivers/bluetooth/hci_bcm4377.c | 20 ---
drivers/infiniband/hw/hfi1/aspm.c | 38 +-----
drivers/infiniband/hw/hfi1/pcie.c | 2 +-
drivers/misc/cardreader/rts5228.c | 6 +-
drivers/misc/cardreader/rts5261.c | 6 +-
drivers/misc/cardreader/rtsx_pcr.c | 8 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 77 +----------
drivers/net/wireless/ath/ath10k/pci.c | 8 +-
drivers/net/wireless/ath/ath11k/pci.c | 10 +-
drivers/net/wireless/ath/ath12k/pci.c | 10 +-
drivers/net/wireless/mediatek/mt76/Makefile | 1 -
drivers/net/wireless/mediatek/mt76/mt76.h | 1 -
.../net/wireless/mediatek/mt76/mt7615/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x2/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt7915/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt7921/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt7996/pci.c | 2 +-
drivers/net/wireless/mediatek/mt76/pci.c | 47 -------
drivers/pci/controller/vmd.c | 2 +-
drivers/pci/pcie/Makefile | 1 +
drivers/pci/pcie/aspm.c | 126 +++++++++++++-----
drivers/pci/pcie/aspm_minimal.c | 66 +++++++++
drivers/pci/quirks.c | 3 +
include/linux/pci.h | 10 +-
25 files changed, 199 insertions(+), 255 deletions(-)
delete mode 100644 drivers/net/wireless/mediatek/mt76/pci.c
create mode 100644 drivers/pci/pcie/aspm_minimal.c
--
2.30.2
Powered by blists - more mailing lists