Bug 2706 - Add support for turning off Zhaoxin ahci controller runtime pm from sysfs
Summary: Add support for turning off Zhaoxin ahci controller runtime pm from sysfs
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: LeoLiu-oc
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-02 18:09 UTC by LeoLiu-oc
Modified: 2024-06-25 10:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeoLiu-oc zhaoxin_group 2022-11-02 18:09:42 UTC
Description of problem:
There exits some problems with enabling ahci controller runtime pm on
various Zhaoxin platforms.

For some Zhaoxin CPUs, link into listen mode, and PHY into P2, which will
cause the device to continuously send comminit. When the controller is in
D3, the comminit will continuously wake up the controller, resulting in
the controller being unable to stabilize at D3;

For another Zhaoxin CPUs, after entering and exiting runtime pm for a
certain number of times, ahci controller reset accumulates for many times,
which will make ahci and PXPTRF P2CW think that the other party can no
longer receive requests and block the P2CW path, resulting in failure to
recognize the device;

In addition, there are some other Zhaoxin CPUs , the test is normal, but
considering that the server platform is not sensitive to power
consumption, and this part has very little impact on power consumption;

In summary, it is recommended to close the zx ahci controller runtime pm.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
测试环境:
1)	任意主板/任意Linux OS
2)	OS盘接在usb2sata上,平台不接其它sata controler,且zx ahci controller上不接任何device;

测试Case:
1)	Enable ahci runtime pm 
=====================================
#!/bin/bash
HOST=$(lspci -D | grep "SATA controller" | cut -f 1 -d ' ')
# Enable runtime PM for all SATA ports
for port in /sys/bus/pci/devices/$HOST/ata*; do
	echo auto > $port/power/control
done
# Then for the host controller
echo auto > /sys/bus/pci/devices/$HOST/power/control
======================================
2)	 执行# lspci –xxxx –s 00:0f.0 查看0xC4的值是否是0x0(0x0代表controller在D0,0x3代表controller在D3)


Actual results:


Expected results:
前面读到0xC4为0x0即认为pass

Additional info:
Comment 1 小龙 admin 2024-06-25 10:51:36 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3412