pci.c (f5a7ac118faf6d4f794975947b3300717eae8fc5) pci.c (5d7cf67f72ae34d38e090bdfa673da4aefe4048e)
1// SPDX-License-Identifier: BSD-3-Clause-Clear
2/*
3 * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
5 */
6
7#include <linux/module.h>
8#include <linux/msi.h>

--- 780 unchanged lines hidden (view full) ---

789 &ab_pci->link_ctl);
790
791 ath12k_dbg(ab, ATH12K_DBG_PCI, "pci link_ctl 0x%04x L0s %d L1 %d\n",
792 ab_pci->link_ctl,
793 u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L0S),
794 u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L1));
795
796 /* disable L0s and L1 */
1// SPDX-License-Identifier: BSD-3-Clause-Clear
2/*
3 * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
5 */
6
7#include <linux/module.h>
8#include <linux/msi.h>

--- 780 unchanged lines hidden (view full) ---

789 &ab_pci->link_ctl);
790
791 ath12k_dbg(ab, ATH12K_DBG_PCI, "pci link_ctl 0x%04x L0s %d L1 %d\n",
792 ab_pci->link_ctl,
793 u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L0S),
794 u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L1));
795
796 /* disable L0s and L1 */
797 pcie_capability_clear_word(ab_pci->pdev, PCI_EXP_LNKCTL,
798 PCI_EXP_LNKCTL_ASPMC);
797 pcie_capability_write_word(ab_pci->pdev, PCI_EXP_LNKCTL,
798 ab_pci->link_ctl & ~PCI_EXP_LNKCTL_ASPMC);
799
800 set_bit(ATH12K_PCI_ASPM_RESTORE, &ab_pci->flags);
801}
802
803static void ath12k_pci_aspm_restore(struct ath12k_pci *ab_pci)
804{
805 if (test_and_clear_bit(ATH12K_PCI_ASPM_RESTORE, &ab_pci->flags))
799
800 set_bit(ATH12K_PCI_ASPM_RESTORE, &ab_pci->flags);
801}
802
803static void ath12k_pci_aspm_restore(struct ath12k_pci *ab_pci)
804{
805 if (test_and_clear_bit(ATH12K_PCI_ASPM_RESTORE, &ab_pci->flags))
806 pcie_capability_clear_and_set_word(ab_pci->pdev, PCI_EXP_LNKCTL,
807 PCI_EXP_LNKCTL_ASPMC,
808 ab_pci->link_ctl &
809 PCI_EXP_LNKCTL_ASPMC);
806 pcie_capability_write_word(ab_pci->pdev, PCI_EXP_LNKCTL,
807 ab_pci->link_ctl);
810}
811
812static void ath12k_pci_kill_tasklets(struct ath12k_base *ab)
813{
814 int i;
815
816 for (i = 0; i < ab->hw_params->ce_count; i++) {
817 struct ath12k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i];

--- 588 unchanged lines hidden (view full) ---

1406
1407static void ath12k_pci_exit(void)
1408{
1409 pci_unregister_driver(&ath12k_pci_driver);
1410}
1411
1412module_exit(ath12k_pci_exit);
1413
808}
809
810static void ath12k_pci_kill_tasklets(struct ath12k_base *ab)
811{
812 int i;
813
814 for (i = 0; i < ab->hw_params->ce_count; i++) {
815 struct ath12k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i];

--- 588 unchanged lines hidden (view full) ---

1404
1405static void ath12k_pci_exit(void)
1406{
1407 pci_unregister_driver(&ath12k_pci_driver);
1408}
1409
1410module_exit(ath12k_pci_exit);
1411
1414MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11be WLAN PCIe devices");
1412MODULE_DESCRIPTION("Driver support for Qualcomm Technologies PCIe 802.11be WLAN devices");
1415MODULE_LICENSE("Dual BSD/GPL");
1413MODULE_LICENSE("Dual BSD/GPL");