Re: Bug report for ahci-mvebu driver

Damien Le Moal
2022-11-15T08:10:59Z

On 11/15/22 16:28, marius@psihoexpert.ro wrote:
> November 15, 2022 5:02 AM, "Damien Le Moal"
> <damien.lemoal@opensource.wdc.com> wrote:
>
>> So something is going on at the hardware level here. The register
>> value is not stable... You could try playing with the sleep interval
>> (unsigned long interval = params[0];) and duration (unsigned long
>> duration = params[1];) to see if anything changes. Especially try
>> reducing and increasing interval. -- Damien Le Moal Western Digital
>> Research
>
> What are the defaults? Are these defaults the same for all sata/ahci
> controllers? How much can I increase them? Will anything break?

Nothing will break. No commands are exchanged during that link-up. It is
only phy initialization. The defaults are defined by
sata_deb_timing_normal or sata_deb_timing_hotplug at the beginning of
libata-sata.c. The names speak for themselves: normal timing is for device
scan on boot, hotplug for... hotplug :)

> What could be the cause of this? sata cable? Power source? BTW, while
> doing the testing, I saw the same error with the laptop HDD. I
> disconnected the cable and then reconnected it, and the second time it
> was detected OK. Unfortunately, I wasn't capturing serial messages and
> I couldn't make it happen again.

Could be the cable. Try to use a good quality short cable if you can.
Power source can be a cause too, but less likely. I have seen lots of
issues with bad cables, but they generally manifest themselves under load
with transfers with bad ECC. When it happens, the errors are obvious.

Could be the plugs too. Check for dust and/or lose connection with the cable.

>
> Marius Dinu