From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: bhelgaas@google.com
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>,
Yan-Hsuan Chuang <tony0620emma@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-wireless@vger.kernel.org (open list:REALTEK WIRELESS
DRIVER (rtw88)),
netdev@vger.kernel.org (open list:NETWORKING DRIVERS),
linux-kernel@vger.kernel.org (open list),
linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM)
Subject: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk
Date: Fri, 26 Feb 2021 01:40:40 +0800 [thread overview]
Message-ID: <20210225174041.405739-3-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20210225174041.405739-1-kai.heng.feng@canonical.com>
Now we have a generic D3 shutdown quirk, so convert the original
approach to a PCI quirk.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/net/wireless/realtek/rtw88/pci.c | 2 --
drivers/pci/quirks.c | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index 786a48649946..cddc9b09bb1f 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1709,8 +1709,6 @@ void rtw_pci_shutdown(struct pci_dev *pdev)
if (chip->ops->shutdown)
chip->ops->shutdown(rtwdev);
-
- pci_set_power_state(pdev, PCI_D3hot);
}
EXPORT_SYMBOL(rtw_pci_shutdown);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0a848ef0b7db..dfb8746e3b72 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5627,3 +5627,9 @@ static void pci_fixup_shutdown_d3(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D3cold);
}
DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_AMD, 0x1639, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xd723, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xc821, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xb822, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xb822, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xc822, pci_fixup_shutdown_d3);
+DECLARE_PCI_FIXUP_SHUTDOWN(PCI_VENDOR_ID_REALTEK, 0xc82f, pci_fixup_shutdown_d3);
--
2.30.0
next prev parent reply other threads:[~2021-02-25 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 17:40 [PATCH 1/3] PCI: Introduce quirk hook after driver shutdown callback Kai-Heng Feng
2021-02-25 17:40 ` [PATCH 2/3] PCI: Set AMD Renoir USB controller to D3 when shutdown Kai-Heng Feng
2021-02-25 17:40 ` Kai-Heng Feng [this message]
2021-02-26 7:12 ` [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk Kalle Valo
2021-02-26 12:10 ` Heiner Kallweit
2021-02-26 12:18 ` Kai-Heng Feng
2021-02-26 13:31 ` Heiner Kallweit
2021-02-26 13:40 ` Kalle Valo
2021-02-26 18:16 ` Bjorn Helgaas
2021-03-04 6:07 ` Kai-Heng Feng
2021-03-04 16:02 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210225174041.405739-3-kai.heng.feng@canonical.com \
--to=kai.heng.feng@canonical.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tony0620emma@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).