[PATCH v4 1/5] ata: ahci_st: Assert the power down reset in the probe() error path

Damien Le Moal dlemoal at kernel.org
Mon Sep 14 21:00:11 PDT 2026


On 2026/09/11 0:14, Niklas Cassel wrote:
> st_ahci_probe_resets() deasserts the "pwr-dwn" reset, but the probe()
> error path of st_ahci_probe() only releases the host resources, so the
> SATA IP is left powered up when probe() fails after
> st_ahci_probe_resets() has succeeded, e.g. when
> ahci_platform_enable_resources() fails.
> 
> The reset is asserted by st_ahci_host_stop(), however ->host_stop() is
> only called through the ata_host_stop() devres action registered by
> ata_host_start(), so it does not cover any failure happening before the
> host has been started.
> 
> Factor the assert out into st_ahci_assert_pwrdwn() and call it from both
> probe() error paths. The "pwr-dwn" reset control is an exclusive one, so

from both probe() error path *and* ... ?

> asserting it once more from st_ahci_host_stop() is harmless.
> 
> No functional change intended for ->host_stop() and st_ahci_suspend().
> 
> Fixes: 76884cb2f7da ("ahci: st: Add support for ST's SATA IP")
> Cc: stable at vger.kernel.org
> Signed-off-by: Niklas Cassel <cassel at kernel.org>

Other that the nit above, looks good.

Reviewed-by: Damien Le Moal <dlemoal at kernel.org>

-- 
Damien Le Moal
Western Digital Research



More information about the linux-arm-kernel mailing list