[PATCH v2 01/13] PCI/ASPM: Rename pci_enable_link_state() to pci_set_default_link_state()

2023-09-18 Thread Ilpo Järvinen
pci_enable_link_state() and pci_disable_link_state() are not paired symmetrically despite their names suggesting otherwise. pci_enable_link_state() tweaks link state when the "default" policy is in use rather than exactly "enabling" some link states. Obviously, when the default policy is in use and

[PATCH v2 00/13] PCI/ASPM: Make ASPM in core robust and remove driver workarounds

2023-09-18 Thread Ilpo Järvinen
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.

[PATCH v2 02/13] PCI/ASPM: Improve pci_set_default_link_state() kerneldoc

2023-09-18 Thread Ilpo Järvinen
Improve pci_set_default_link_state() documentation: - Note the link state may get changed if the default policy is in use - Better follow kerneldoc formatting guidelines (separate description block and return entries) Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/aspm.c | 16 ++---

[PATCH v2 03/13] PCI/ASPM: Disable ASPM when driver requests it

2023-09-18 Thread Ilpo Järvinen
PCI core/ASPM service driver allows controlling ASPM state through pci_disable_link_state() and pci_enable_link_state() API. It was decided earlier (see the Link below), to not allow ASPM changes when OS does not have control over it but only log a warning about the problem (commit 2add0ec14c25 ("P

[PATCH v2 04/13] PCI/ASPM: Move L0S/L1/sub states mask calculation into a helper

2023-09-18 Thread Ilpo Järvinen
ASPM service driver does the same L0S / L1S / sub states allowed calculation in __pci_disable_link_state() and pci_set_default_link_state(). Create a helper to calculate the mask for the allowed states. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/aspm.c | 33 +-

[PATCH v2 05/13] PCI/ASPM: Add pci_enable_link_state()

2023-09-18 Thread Ilpo Järvinen
pci_disable_link_state() lacks a symmetric pair. Some drivers want to disable ASPM during certain phases of their operation but then re-enable it later on. If pci_disable_link_state() is made for the device, there is currently no way to re-enable the states that were disabled. Add pci_enable_link_

[PATCH v2 10/13] wifi: ath11k: Use pci_disable/enable_link_state()

2023-09-18 Thread Ilpo Järvinen
ath11k driver adjusts ASPM state itself which leaves ASPM service driver in PCI core unaware of the link state changes the driver implemented. Call pci_disable_link_state() and pci_enable_link_state() instead of adjusting ASPMC field in LNKCTL directly in the driver and let PCI core handle the ASP

[PATCH v2 11/13] wifi: ath12k: Use pci_disable/enable_link_state()

2023-09-18 Thread Ilpo Järvinen
ath12k driver adjusts ASPM state itself which leaves ASPM service driver in PCI core unaware of the link state changes the driver implemented. Call pci_disable_link_state() and pci_enable_link_state() instead of adjusting ASPMC field in LNKCTL directly in the driver and let PCI core handle the ASP

[PATCH v2 06/13] Bluetooth: hci_bcm4377: Convert aspm disable to quirk

2023-09-18 Thread Ilpo Järvinen
pci_disable_link_state() was made reliable regardless of ASPM CONFIG and OS being disallowed to change ASPM states to allow drivers to rely on pci_disable_link_state() working. Remove driver working around unreliable pci_disable_link_state() from hci_bcm4377 driver and add a PCI quirk to disable A

[PATCH v2 07/13] mt76: Remove unreliable pci_disable_link_state() workaround

2023-09-18 Thread Ilpo Järvinen
pci_disable_link_state() was made reliable regardless of ASPM CONFIG and OS being disallowed to change ASPM states to allow drivers to rely on pci_disable_link_state() working. Remove driver working around unreliable pci_disable_link_state() from mt76 driver and just call pci_disable_link_state()

[PATCH v2 08/13] e1000e: Remove unreliable pci_disable_link_state{,_locked}() workaround

2023-09-18 Thread Ilpo Järvinen
pci_disable_link_state() and pci_disable_link_state_locked() were made reliable regardless of ASPM CONFIG and OS being disallowed to change ASPM states to allow drivers to rely on them working. Remove driver working around unreliable pci_disable_link_state{,_locked}() from e1000e driver and just c

[PATCH v2 09/13] wifi: ath10k: Use pci_disable/enable_link_state()

2023-09-18 Thread Ilpo Järvinen
ath10k driver adjusts ASPM state itself which leaves ASPM service driver in PCI core unaware of the link state changes the driver implemented. Call pci_disable_link_state() and pci_enable_link_state() instead of adjusting ASPMC field in LNKCTL directly in the driver and let PCI core handle the ASP

[PATCH v2 12/13] RDMA/hfi1: Use pci_disable/enable_link_state()

2023-09-18 Thread Ilpo Järvinen
IB/hfi1 driver adjusts ASPM state itself which leaves ASPM service driver in PCI core unaware of the link state changes the driver implemented. Call pci_disable_link_state() and pci_enable_link_state() instead of adjusting ASPMC field in LNKCTL directly in the driver and let PCI core handle the AS

[PATCH v2 13/13] misc: rtsx: Use pci_disable/enable_link_state()

2023-09-18 Thread Ilpo Järvinen
rtsx driver adjusts ASPM state itself which leaves ASPM service driver in PCI core unaware of the link state changes the driver implemented. Call pci_disable_link_state() and pci_enable_link_state() instead of adjusting ASPMC field in LNKCTL directly in the driver and let PCI core handle the ASPM

[PATCH] wifi: ath10k: simplify SDIO async handling

2023-09-18 Thread Dmitry Antipov
This is an initial attempt to fix TODO found in SDIO bus support code. As original comment says, an idea is to store SDIO-specific 'struct ath10k_sdio_bus_request' data within skb control buffer instead of managing (a relatively large, 1024-items for now) free list of the aforementioned structures.

[PATCH v2 wireless-next 0/9] Remove unnecessary (void*) conversions

2023-09-18 Thread Wu Yunchuan
Remove all unnecessary (void*) conversions under the directory drivers/net/wireless/ath. Changes in v2: - fix file path error in v1 patch - change the prototype to remove the local variable(Jeff Johnson's suggestion.)[1] [1] https://lore.kernel.org/all/5bb164e7-c147-64d1-031d-0ba20cfff...@n

[PATCH v2 wireless-next 6/9] wifi: ath10k: Remove unnecessary (void*) conversions

2023-09-18 Thread Wu Yunchuan
No need cast (void*) to (struct htt_rx_ring_setup_ring32 *), (struct htt_rx_ring_setup_ring64 *). Change the prototype to remove the local variable. Signed-off-by: Wu Yunchuan Suggested-by: Jeff Johnson --- drivers/net/wireless/ath/ath10k/htt_tx.c | 16 ++-- 1 file changed, 6 insert