mbox series

[0/7] rtlwifi: PCIe capability access fix + improvements

Message ID 20231117094425.80477-1-ilpo.jarvinen@linux.intel.com (mailing list archive)
Headers show
Series rtlwifi: PCIe capability access fix + improvements | expand

Message

Ilpo Järvinen Nov. 17, 2023, 9:44 a.m. UTC
The rtlwifi driver has code fragments that are using old interface or
custom code to access PCIe capabilities.

The use of old interfaces causes an issue with LNKCTL register that
requires locking during RMW operations. Standard PCIe capability
accessors provide the necessary locking so they should be always used.
The first patch of the series addresses that problem.

The rest of the patches cleanup PCIe capability related code.

Additional note: This series provides only a stop-gap solution to the
RMW concurrency issue, the overall plan is to migrate all ASPM related
handling into the ASPM service driver in order for it to accurately
track ASPM state [1].

[1] https://lore.kernel.org/linux-pci/20230918131103.24119-1-ilpo.jarvinen@linux.intel.com/

Ilpo Järvinen (7):
  wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
  wifi: rtlwifi: Convert to use PCIe capability accessors
  rtlwifi: rtl8821ae: Remove unnecessary PME_Status bit set
  rtlwifi: rtl8821ae: Reverse PM capability exists check
  rtlwifi: rtl8821ae: Use pci_find_capability()
  rtlwifi: rtl8821ae: Add pdev into _rtl8821ae_clear_pci_pme_status()
  rtlwifi: rtl8821ae: Access full PMCS reg and use pci_regs.h

 drivers/net/wireless/realtek/rtlwifi/pci.c    | 69 ++++++++---------
 drivers/net/wireless/realtek/rtlwifi/pci.h    |  3 -
 .../wireless/realtek/rtlwifi/rtl8821ae/hw.c   | 76 +++++--------------
 3 files changed, 48 insertions(+), 100 deletions(-)