Bug 2616 - 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 4.19 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-10-27 17:37 UTC by LeoLiu-oc
Modified: 2024-06-20 14:19 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-10-27 17:37:27 UTC
Description of problem:
There exits some problems with enabling ahci controller runtime pm on
various Zhaoxin platforms.

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


Steps to verify:
测试环境:
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)


Expected results:
前面读到0xC4为0x0即认为pass
Comment 1 小龙 admin 2024-06-20 14:19:46 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3374