Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"kabel@kernel.org" <kabel@kernel.org>,
	Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: ARMADA espressobin SATA drive detection failure
Date: Sat, 13 Aug 2022 11:32:14 +0200	[thread overview]
Message-ID: <20220813093214.6ved4ka3l2thkn2n@pali> (raw)
In-Reply-To: <20220813013534.l5hzxv7mc5fylx7m@shindev>

On Saturday 13 August 2022 01:35:35 Shinichiro Kawasaki wrote:
> On Aug 13, 2022 / 03:03, Pali Rohár wrote:
> > On Saturday 13 August 2022 01:00:34 Shinichiro Kawasaki wrote:
> > > On Aug 13, 2022 / 02:15, Pali Rohár wrote:
> > > > On Saturday 13 August 2022 00:02:37 Shinichiro Kawasaki wrote:
> > > > > On Aug 12, 2022 / 15:55, Pali Rohár wrote:
> > > > > > On Friday 12 August 2022 14:44:07 Pali Rohár wrote:
> > > > > 
> > > > > [...]
> > > > > 
> > > > > > > Probably this is SSD disk specific. I will try to prepare some kernel
> > > > > > > changes to test if it changes something.
> > > > > > 
> > > > > > Could you please try following change and provide full dmesg log?
> > > > > > First I need to know if issue is in SATA power on code or somewhere else.
> > > > > 
> > > > > My pleasure. I applied the patch to the kernel v5.18.16 and booted it from the
> > > > > latest U-Boot. Here I attach console output taken from the mox-imager command.
> > > > > It has all kernel messages as well as U-Boot console log. I find the message
> > > > > from added dev_err():
> > > > > 
> > > > >   mvebu-a3700-comphy d0018300.phy: OK mvebu_a3700_comphy_sata_power_on() call
> > > > > 
> > > > > -- 
> > > > > Shin'ichiro Kawasaki
> > > > 
> > > > Ok, so SATA does not work even when starting with original SMC
> > > > implementation.
> > > > 
> > > > Could you please try another test change?
> > > > 
> > > > @@ -1102,6 +1142,9 @@ static int mvebu_a3700_comphy_reset(struct phy *phy)
> > > >  	struct mvebu_a3700_comphy_lane *lane = phy_get_drvdata(phy);
> > > >  	u16 mask, data;
> > > >  
> > > > +	dev_err(lane->dev, "IGNORING mvebu_a3700_comphy_reset() call\n");
> > > > +	return;
> > > > +
> > > >  	dev_dbg(lane->dev, "resetting lane %d\n", lane->id);
> > > >  
> > > >  	/* COMPHY reset for internal logic */
> > > 
> > > Yes, I've applied the hunk above on top of the previous debug patch (I modified
> > > 'return' to 'return 0' to avoid a compile error). I attach the console log.
> > 
> > Ou, right.
> > 
> > > With this change,
> > > 
> > > - The added message "IGNORING mvebu_a3700_comphy_reset() call" was printed
> > >   three times.
> > > - The "ata1: SATA link down (SStatus 100 SControl 300)" message disappeared.
> > > - My SSD was detected as /dev/sda.
> > 
> > Perfect!
> > 
> > Could you now test only that last small change for
> > mvebu_a3700_comphy_reset() without previous changes?
> > To verify that issue is in mvebu_a3700_comphy_reset() function.
> 
> Sure, I've tried the mvebu_a3700_comphy_reset() change only and got same result:
> "IGNORING mvebu_a3700_comphy_reset() call" was printed, and my SSD was detected
> as /dev/sda. FYI, I attach the console log again.

Ok, thanks for testing. It looks like that reset code has some issues.

Could you please test this change?

@@ -1393,7 +1436,8 @@ static int mvebu_a3700_comphy_probe(struct platform_device *pdev)
 		 * To avoid relying on the bootloader/firmware configuration,
 		 * power off all comphys.
 		 */
-		mvebu_a3700_comphy_reset(phy);
+//		mvebu_a3700_comphy_reset(phy);
+		mvebu_a3700_comphy_power_off(phy);
 		lane->needs_reset = false;
 	}
 

It should replace reset code by power off at beginning / probe time.

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2022-08-13  9:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 12:41 ARMADA espressobin SATA drive detection failure Shinichiro Kawasaki
2022-05-31 14:00 ` Marek Behún
2022-06-06  1:57   ` Shinichiro Kawasaki
2022-08-09  9:42 ` Pali Rohár
2022-08-10 10:36   ` Shinichiro Kawasaki
2022-08-12  4:56     ` Shinichiro Kawasaki
2022-08-12  8:20       ` Pali Rohár
2022-08-12 12:00         ` Shinichiro Kawasaki
2022-08-12 12:44           ` Pali Rohár
2022-08-12 13:55             ` Pali Rohár
2022-08-13  0:02               ` Shinichiro Kawasaki
2022-08-13  0:15                 ` Pali Rohár
2022-08-13  1:00                   ` Shinichiro Kawasaki
2022-08-13  1:03                     ` Pali Rohár
2022-08-13  1:35                       ` Shinichiro Kawasaki
2022-08-13  9:32                         ` Pali Rohár [this message]
2022-08-13 11:53                           ` Shinichiro Kawasaki
2022-08-13 12:01                             ` Pali Rohár
2022-08-13 12:47                               ` Shinichiro Kawasaki
2022-08-13 12:50                                 ` Pali Rohár
2022-08-13 23:02                                   ` Shinichiro Kawasaki
2022-08-13 23:10                                     ` Pali Rohár
2022-08-25 13:00                                       ` Pali Rohár
2022-08-25 22:15                                         ` Marek Behún
2022-08-26  5:00                                           ` Shinichiro Kawasaki
2022-08-26 12:05                                             ` Marek Behún
2022-08-29  0:20                                               ` Shinichiro Kawasaki
2022-08-29  8:33                                                 ` Pali Rohár
2022-08-26  7:28                                           ` Pali Rohár
2022-08-25 13:04                                       ` Pali Rohár
2022-08-26  4:57                                         ` Shinichiro Kawasaki
2022-08-26  7:34                                           ` Pali Rohár

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=20220813093214.6ved4ka3l2thkn2n@pali \
    --to=pali@kernel.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=kabel@kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=shinichiro.kawasaki@wdc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox