Regression on linux-next (next-20250708)
Damien Le Moal
dlemoal at kernel.org
Mon Jul 28 22:30:52 UTC 2025
On 7/29/25 01:33, Borah, Chaitanya Kumar wrote:
>
>
> On 7/28/2025 11:01 AM, Damien Le Moal wrote:
>> On 7/25/25 3:43 PM, Borah, Chaitanya Kumar wrote:
>>> For some context in our kms_pm_rpm tests, we enable min_power policy for SATA
>>> so that we can reach deep runtime power states and restore the original policy
>>> after finishing. [5][6]
>>>
>>> IIUC, the above change is based on spec and not something which can be
>>> reverted. So as I see it, we have to drop this code path for external ports.
>>> However I am not sure if we can achieve deep power states without enforcing it
>>> through the sysfs entry.
>>>
>>> Atleast for the basic-rte subtest, the test passes if we comment out the
>>> functions controlling the SATA ports. We will need more testing to determine if
>>> this approach work. Any thoughts on it?
>>>
>>> Also, are there other ways to detect a port is external other than receiving
>>> EOPNOTSUPP on the sysfs write?
>>
>> I completely forgot to mention one important thing: please check your test
>> machine BIOS settings and see if you have "hotplug support" set to enable for
>> SATA ports. If it is, set that BIOS setting to disable and you will see the
>> SATA port as a regular one, not as an external port. So LPM support will be
>> back and your test program will not need changes.
>>
>> Not all BIOSes have such setting though. Most of the machine I have do have it
>> though and I checked that it does affect how the ahci driver sees the port
>> (external or regular with LPM).
>>
>>
>
> Found a "Hot Plug" setting (thanks to Mika!) in our testing device's
> BIOS but it does not seem to have any effect.
>
> We also have an option called "External", toggling that did not help either.
>
> There is another configuration which was *readonly*.
>
> "Configured as eSATA" -> "Hot Plug supported"
>
> Not sure if it is relevant to our discussion.
It is and that probably is the reason why disabling hotplug does nothing on the
port external characteristic. Does this machine really have eSata ports ? Do
they correspond to the 4 ports (out of 8) that you see as external
(link_power_management_supported = 0 ports) ?
Likely, you have the SXS host capability set for this machine because of this
BIOS setup. From the AHCI specifications:
Supports External SATA (SXS): When set to ‘1’, indicates that the HBA has one or
more Serial ATA ports that has a signal only connector that is externally
accessible (e.g. eSATA connector).
Hotplug is reported as a separate bit, but handled in the same way as an
external port as we cannot (easily) support LPM if we want to preserve the
hotplug capability (LPM changes the PHY state constantly, which clashes with hot
plug/unplug PHY changes and is hard to differentiate).
Note that you can see if a port is external in dmesg. Look for:
ata4: SATA max UDMA/133 abar m524288 at 0xaa500000 port 0xaa500280 irq 112 lpm-pol
1 ext
A regular port will not have the "ext" at the end:
ata5: SATA max UDMA/133 abar m524288 at 0xaa500000 port 0xaa500300 irq 112 lpm-pol 1
--
Damien Le Moal
Western Digital Research
More information about the Intel-gfx
mailing list