From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: linux-ide@vger.kernel.org, cassel@kernel.org, dlemoal@kernel.org
Subject: Re: [PATCH] ata: sata_mv: init and power phy per-port in port_start
Date: Wed, 05 Aug 2026 01:12:30 +0000 [thread overview]
Message-ID: <20260805011231.1D03F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260805010128.90171-1-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Hardware hangs due to unpowered PHY register access.
--
--- Patch [1]: [PATCH] ata: sata_mv: init and power phy per-port in port_start ---
commit f57a0363f1ffdddb1a743417b19db2e65b2fcb67
Author: Rosen Penev <rosenp@gmail.com>
ata: sata_mv: init and power phy per-port in port_start
This commit moves PHY initialization and power management from the probe
and remove paths to the per-port start and stop paths. It also reworks
error handling in probe to rely on devres cleanup.
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index d260f04e6384b..e811202a68735 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -1711,11 +1713,23 @@ static int mv_port_start(struct ata_port *ap)
> mv_edma_cfg(ap, 0, 0);
> spin_unlock_irqrestore(ap->lock, flags);
>
> + if (phy) {
> + rc = phy_init(phy);
> + if (rc)
> + goto out_port_free_dma_mem;
> +
> + rc = phy_power_on(phy);
[Severity: High]
Will this cause hardware hangs or external aborts on access?
It looks like we are calling mv_save_cached_regs() and mv_edma_cfg()
just before this block, while the PHY is still unpowered.
Since those functions read and write MAC interface registers, could this
access unpowered hardware?
[ ... ]
> @@ -4144,39 +4157,12 @@ static int mv_platform_probe(struct platform_device *pdev)
> /* initialize adapter */
> rc = mv_init_host(host);
> if (rc)
> - goto err;
> + return rc;
[Severity: High]
Does moving the PHY power on step to port start break host initialization?
When mv_platform_probe() calls mv_init_host() here, the PHY is no longer
powered. However, mv_init_host() can execute PHY register accesses:
mv_platform_probe() -> mv_init_host():
for (port = 0; port < host->n_ports; port++)
if (hpriv->ops->read_preamp)
hpriv->ops->read_preamp(hpriv, port, mmio);
Since operations like read_preamp read and write PHY registers, will this
cause a synchronous external abort during boot?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260805010128.90171-1-rosenp@gmail.com?part=1
prev parent reply other threads:[~2026-08-05 1:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 1:01 [PATCH] ata: sata_mv: init and power phy per-port in port_start Rosen Penev
2026-08-05 1:12 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260805011231.1D03F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.