Re: Bug report for ahci-mvebu driver

Damien Le Moal
2022-12-09T02:58:27Z

On 12/9/22 03:06, marius@psihoexpert.ro wrote:
> December 8, 2022 12:51 AM, "Damien Le Moal" <damien.lemoal@opensource.wdc.com> wrote:
>
>> By the way, did you also try a cold boot ? Switching off your router,
>> connect the pmp box, turn on the router ? Does it change anything ?
>> ATA hot-plugging tends to have more problems, so worth trying. The
>> ahci_mvebu driver errata is for hot-plug, so this newer SoC may have
>> different issues with that too.
>
> Yes. No change. Same errors.
>
>> Can you try with no patches and no revert adding the following options to
>> your kernel command line ?
>>
>> libata.force=2:3Gbps
>
> No change. Same errors.
>
>> libata.force=2:1.5Gbps
>
> This one works, without any error at the beginning, unlike the way reverted commit worked.

Checking the specs for the SoC again, it does say:

Gen3 Serial ATA PHY (6 Gbps) with speed negotiation to Gen1, Gen2

So with your gen2 (3gbps) pmp box, clearly, the speed negotiation is not
working but limiting it to 1.5gbps seems ok. Could you add the following
print to see what the HW is saying it supports ?

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 884ae73b11ea..b3925239b8b0 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5271,6 +5271,9 @@ int sata_link_init_spd(struct ata_link *link)
if (rc)
return rc;

+ ata_link_info(link, "SCR_CONTROL = 0x%x\n",
+ link->saved_scontrol);
+
spd = (link->saved_scontrol >> 4) & 0xf;
if (spd)
link->hw_sata_spd_limit &= (1 << spd) - 1;