mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify
@ 2025-12-24  5:39 Ajay Neeli
  2026-01-24  3:53 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Ajay Neeli @ 2025-12-24  5:39 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, git, sai.krishna.potthuri,
	michal.simek, srinivas.goud, radhey.shyam.pandey, Ajay Neeli

Move the PHY initialization from PRE_CHANGE to POST_CHANGE in the
ufs_versal2_hce_enable_notify() callback. This ensures that the PHY
is initialized after the host controller enable sequence is complete,
rather than before it starts.

The PHY initialization requires the UFS host controller to be in a
stable enabled state to properly configure the MPHY registers. Moving
this to POST_CHANGE aligns with the expected initialization order and
prevents potential timing issues during controller startup.

Fixes: 769b8b2ffded ("scsi: ufs: amd-versal2: Add UFS support for AMD Versal Gen 2 SoC")
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
---
 drivers/ufs/host/ufs-amd-versal2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-amd-versal2.c b/drivers/ufs/host/ufs-amd-versal2.c
index 40543db621a1..6c454ae8a9c8 100644
--- a/drivers/ufs/host/ufs-amd-versal2.c
+++ b/drivers/ufs/host/ufs-amd-versal2.c
@@ -367,7 +367,7 @@ static int ufs_versal2_hce_enable_notify(struct ufs_hba *hba,
 {
 	int ret = 0;
 
-	if (status == PRE_CHANGE) {
+	if (status == POST_CHANGE) {
 		ret = ufs_versal2_phy_init(hba);
 		if (ret)
 			dev_err(hba->dev, "Phy init failed (%d)\n", ret);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify
  2025-12-24  5:39 [PATCH] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify Ajay Neeli
@ 2026-01-24  3:53 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2026-01-24  3:53 UTC (permalink / raw)
  To: James.Bottomley, Ajay Neeli
  Cc: Martin K . Petersen, linux-scsi, linux-kernel, git,
	sai.krishna.potthuri, michal.simek, srinivas.goud,
	radhey.shyam.pandey

On Wed, 24 Dec 2025 11:09:50 +0530, Ajay Neeli wrote:

> Move the PHY initialization from PRE_CHANGE to POST_CHANGE in the
> ufs_versal2_hce_enable_notify() callback. This ensures that the PHY
> is initialized after the host controller enable sequence is complete,
> rather than before it starts.
> 
> The PHY initialization requires the UFS host controller to be in a
> stable enabled state to properly configure the MPHY registers. Moving
> this to POST_CHANGE aligns with the expected initialization order and
> prevents potential timing issues during controller startup.
> 
> [...]

Applied to 6.19/scsi-fixes, thanks!

[1/1] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify
      https://git.kernel.org/mkp/scsi/c/0444568edbf8

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-24  3:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-24  5:39 [PATCH] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify Ajay Neeli
2026-01-24  3:53 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®