Re: AHCI hotplug no longer functions on ICH7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Niklas,

Thank you kindly for your response.

On 2024-05-21 16:47, Niklas Cassel wrote:
> If your port is external or hot plug capable, then your platform firmware/BIOS
> should set either the "PORT_CMD_ESP and HOST_CAP_SXS" bits or the
> "PORT_CMD_HPCP" bit.
> 
> See:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/ata?id=45b96d65ec68f625ad26ee16d2f556e29f715005

Understood. I had looked at that commit, but did not look into those
bits in detail. They were obviously not set correctly, thus the port was 
not marked external.

> Is there any option in your BIOS to mark the port as external or hot plug
> capable?
> 
> 
> If not, then your platform firmware is broken and needs to be quirked.
> 
> Please provde the output from
> # dmidecode
> so that we can apply a quirk for your broken platform.

I went through again and checked for any "hotplug" or "external" options
and found nothing. I was ready to try to make a quirk for it, but then I
noticed the option "ALPE and ASP" under IDE Configuration (section 
4.3.6, page 4-17 of the user's manual [0]). It was set to enabled, so I 
disabled it. That did the trick and the ports are now marked as 
external.

It looks like that option doesn't actually enable any kind of LPM, 
because otherwise hotplug would not have worked before, but rather 
expects the OS to enable/disable it.

> In older kernels, regardless if your AHCI controller reported support for
> low-power modes or not, you also needed an explicit entry in ahci_pci_tbl for
> it to be enabled.
> 
> Thus, even if you built with CONFIG_SATA_MOBILE_LPM_POLICY=3, and LPM was
> being reported as supported by your AHCI controller, LPM was most likely not
> enabled for your AHCI controller with older kernels.
> 
> In newer kernels, if CONFIG_SATA_MOBILE_LPM_POLICY=3, and the AHCI controller
> reports that it supports LPM, we will enable it.
> (We will not enable LPM if the port is external or hot plug capable, as that
> breaks hot plug, as you found out.)

That is indeed true, yes. Thank you for the explanation. The Ven/Dev
pair is not in the list of the LPM quirked ones in the original commit.

> According to the AHCI specification, a port that is external or hot plug
> capable should set the "PORT_CMD_ESP and HOST_CAP_SXS" bits or the
> "PORT_CMD_HPCP" bit.
> 
> If your platform fails to follow the AHCI specification, then it will need to
> be quirked.
> 
> 
> Kind regards,
> Niklas

After changing that setting and removing mobile_lpm_policy=0, hotplug 
still functions as expected, so no quirk is needed.

Thank you for your time, and apologies for not noticing this earlier.
Perhaps this helps someone in the future with the same issue.

[0] https://dlcdnets.asus.com/pub/ASUS/mb/socket775/P5W%20DH%20Deluxe/e2557_p5w_dh_dlx.pdf?model=P5W%20DH%20Deluxe

--
Tasos




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux