diff mbox series

rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

Message ID 20210220084602.22386-1-chenhaoa@uniontech.com
State New
Headers show
Series rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop | expand

Commit Message

Hao Chen Feb. 20, 2021, 8:46 a.m. UTC
When the laptop HONOR MagicBook 14 sleep to S3/S4, the laptop can't
resume.
The dmesg of kernel report:
"[   99.990168] pcieport 0000:00:01.2: can't change power state
from D3hot to D0 (config space inaccessible)
[   99.993334] rtw_pci 0000:01:00.0: can't change power state
from D3hot to D0 (config space inaccessible)
[  104.435004] rtw_pci 0000:01:00.0: mac power on failed
[  104.435010] rtw_pci 0000:01:00.0: failed to power on mac"
When try to pointer the driver.pm to NULL, the problem is fixed.
This driver hasn't implemented pm ops yet.It makes the sleep and
wake procedure expected when pm's ops not NULL.

Fixed: commit e3037485c68e ("rtw88: new Realtek 802.11ac driver")

Signed-off-by: Hao Chen <chenhaoa@uniontech.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Feb. 21, 2021, 6:51 a.m. UTC | #1
On Sat, Feb 20, 2021 at 04:46:02PM +0800, Hao Chen wrote:
> When the laptop HONOR MagicBook 14 sleep to S3/S4, the laptop can't

> resume.

> The dmesg of kernel report:

> "[   99.990168] pcieport 0000:00:01.2: can't change power state

> from D3hot to D0 (config space inaccessible)

> [   99.993334] rtw_pci 0000:01:00.0: can't change power state

> from D3hot to D0 (config space inaccessible)

> [  104.435004] rtw_pci 0000:01:00.0: mac power on failed

> [  104.435010] rtw_pci 0000:01:00.0: failed to power on mac"

> When try to pointer the driver.pm to NULL, the problem is fixed.

> This driver hasn't implemented pm ops yet.It makes the sleep and

> wake procedure expected when pm's ops not NULL.

>

> Fixed: commit e3037485c68e ("rtw88: new Realtek 802.11ac driver")

>

> Signed-off-by: Hao Chen <chenhaoa@uniontech.com>

> ---

>  drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c

> index 3845b1333dc3..b4c6762ba7ac 100644

> --- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c

> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c

> @@ -25,7 +25,7 @@ static struct pci_driver rtw_8822ce_driver = {

>  	.id_table = rtw_8822ce_id_table,

>  	.probe = rtw_pci_probe,

>  	.remove = rtw_pci_remove,

> -	.driver.pm = &rtw_pm_ops,

> +	.driver.pm = NULL,


The NULL is the default, it is enough to delete ".driver.pm = &rtw_pm_ops," line.

Thanks

>  	.shutdown = rtw_pci_shutdown,

>  };

>  module_pci_driver(rtw_8822ce_driver);

> --

> 2.20.1

>

>

>
Ping-Ke Shih Feb. 22, 2021, 11:20 a.m. UTC | #2
On Mon, 2021-02-22 at 09:27 +0200, Kalle Valo wrote:
> 陈浩 <chenhaoa@uniontech.com> writes:

> 

> > By git blame command, I know that the assignment of .driver.pm =

> > RTW_PM_OPS

> >

> > was in commit 44bc17f7f5b3b("rtw88: support wowlan feature for

> > 8822c"),

> >

> > and another commit 7dc7c41607d19("avoid unused function warnings")

> >

> > pointed out rtw_pci_resume() and rtw_pci_suspend() are not used at

> > all.

> >

> > So I think it's safe to remove them.

> >


I think ".driver.pm = &rtw_pm_ops" is a switch to enable wowlan feature.
That means that wowlan doesn't work without this declaration.

> > Currently, I find that the rtl8822ce wifi chip and the pci bridge of

> > it are not linked by pci

> >

> > after wake up by `lspci` command.

> >

> > when I set `pcie_aspm.policy=performance ` in the GRUB. The machine

> > sleep and

> >

> > wake up normal.So I think when this ops is assignmented,the sleep and

> > wake up procedure

> >

> > may cause pci device not linked.


Please try setting module parameter disable_aspm=1 with pci.ko.

Could I know what the CPU and pci bridge chipset are used by HONOR laptop?

> 

> Please don't use HTML, our lists automatically drop all HTML email.

>
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
index 3845b1333dc3..b4c6762ba7ac 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c
@@ -25,7 +25,7 @@  static struct pci_driver rtw_8822ce_driver = {
 	.id_table = rtw_8822ce_id_table,
 	.probe = rtw_pci_probe,
 	.remove = rtw_pci_remove,
-	.driver.pm = &rtw_pm_ops,
+	.driver.pm = NULL,
 	.shutdown = rtw_pci_shutdown,
 };
 module_pci_driver(rtw_8822ce_driver);