From: marius@psihoexpert.ro
To: "Damien Le Moal" <damien.lemoal@opensource.wdc.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: Bug report for ahci-mvebu driver
Date: Tue, 24 Jan 2023 08:04:54 +0000 [thread overview]
Message-ID: <db3fa398d4a1dcadb9df02d1001a61c6@psihoexpert.ro> (raw)
In-Reply-To: <fa7f7eea-7b43-f2d7-18e5-f253ed316919@opensource.wdc.com>
January 24, 2023 1:00 AM, "Damien Le Moal" <damien.lemoal@opensource.wdc.com> wrote:
>> I think that the old behaviour (before commit
>> 2dc0b46b5ea30f169b0b272253ea846a5a281731) of slowing down sata speed
>> when a connection can't be established is in fact the right thing to
>> do. Maybe a longer delay before reducing the link speed would satisfy
>> the random cases that the commit author reported. Maybe he was just
>> having a loose connector issue - especially since he only reported one
>> case.
>
> I do not think that a longer delay will change anything in your case since
> the device presence cannot be established when starting speed negotiation
> without a limit: see the "debounce, SCR=0x100" messages in your debug,
> while the 1.5gbps link speed forcing leads to an immediate device presence
> detected (debounce, SCR=0x113 message).
I was referring to the original "bug" the commit author (David Milburn) was trying to fix.
> Can you please try this one:
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 884ae73b11ea..a4e2a93af0e5 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -3085,10 +3085,17 @@ int sata_down_spd_limit(struct ata_link *link, u32
> spd_limit)
> * If not, use cached value in link->sata_spd.
> */
> rc = sata_scr_read(link, SCR_STATUS, &sstatus);
> - if (rc == 0 && ata_sstatus_online(sstatus))
> + if (rc == 0 && ata_sstatus_online(sstatus)) {
> spd = (sstatus >> 4) & 0xf;
> - else
> + } else {
> + /*
> + * Device is not reporting a speed yet. Use the last recorded
> + * speed. If we do not have that either, start with Gen3
> speed.
> + */
> + if (!link->sata_spd)
> + link->sata_spd = 3;
> spd = link->sata_spd;
> + }
>
> mask = link->sata_spd_limit;
> if (mask <= 1)
It works.
[ 19.408712][ T113] hardreset, Online=>Offline
[ 19.408721][ T113] sata_set_spd_needed, scontrol=0x330
[ 19.413195][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 19.418473][ T113] __sata_set_spd_needed, corrected limit=0xFFFFFFFF
[ 19.424789][ T113] __sata_set_spd_needed, target=0x3
[ 19.431265][ T113] __sata_set_spd_needed, spd=0x3
[ 19.436358][ T113] __sata_set_spd_needed, final *scontrol=0x330
[ 19.442248][ T113] resume, do loop
[ 19.673966][ T113] resume, after do loop
[ 19.733966][ T113] debounce, SCR=0x100
[ 19.793965][ T113] debounce, SCR=0x100
[ 19.853965][ T113] debounce, SCR=0x100
[ 19.913966][ T113] debounce, SCR=0x100
[ 19.973965][ T113] debounce, SCR=0x100
[ 20.033966][ T113] debounce, SCR=0x100
[ 20.093966][ T113] debounce, SCR=0x100
[ 20.153965][ T113] debounce, SCR=0x0
[ 20.213987][ T113] debounce, SCR=0x0
[ 20.217673][ T113] resume, return at end of function
[ 20.221358][ T113] hardreset, ata_phys_link_offline check failed
[ 20.226462][ T113] ata2: SATA link down (SStatus 0 SControl 330)
[ 20.321504][ T113] sata_down_spd_limit: limit 0x1, cur spd 0x0, saved limit 0xffffffff, hw limit 0xffffffff
[ 20.331407][ T113] ata2: limiting SATA link speed to 1.5 Gbps
[ 20.337294][ T113] hardreset, Online=>Offline
[ 20.337300][ T113] sata_set_spd_needed, scontrol=0x330
[ 20.341770][ T113] __sata_set_spd_needed, initial limit=0x1
[ 20.347037][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 20.352728][ T113] __sata_set_spd_needed, target=0x1
[ 20.358605][ T113] __sata_set_spd_needed, spd=0x3
[ 20.363684][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 20.368515][ T113] __sata_set_spd_needed, initial limit=0x1
[ 20.374576][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 20.380267][ T113] __sata_set_spd_needed, target=0x1
[ 20.386144][ T113] __sata_set_spd_needed, spd=0x3
[ 20.391223][ T113] __sata_set_spd_needed, final *scontrol=0x314
[ 20.397127][ T113] resume, do loop
[ 20.623966][ T113] resume, after do loop
[ 20.683966][ T113] debounce, SCR=0x113
[ 20.733987][ T113] debounce, SCR=0x113
[ 20.793966][ T113] debounce, SCR=0x113
[ 20.853965][ T113] debounce, SCR=0x113
[ 20.913966][ T113] debounce, SCR=0x113
[ 20.973965][ T113] debounce, SCR=0x113
[ 21.033966][ T113] debounce, SCR=0x113
[ 21.093966][ T113] debounce, SCR=0x113
[ 21.153965][ T113] debounce, SCR=0x113
[ 21.157826][ T113] resume, return at end of function
[ 21.161684][ T113] hardreset, Offline=>Online
[ 21.171249][ T113] hardreset, sata_pmp_supported, before check_ready
[ 21.343968][ T113] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 21.357696][ T113] ata2.15: Port Multiplier 1.2, 0x197b:0x0325 r193, 8 ports, feat 0xf/0x1f
[ 21.366318][ T113] device: 'link2.0': device_add
[ 21.371124][ T113] device: 'link2.0': device_add
[ 21.376120][ T113] device: 'dev2.0.0': device_add
[ 21.380966][ T113] device: 'dev2.0.0': device_add
[ 21.385953][ T113] device: 'link2.1': device_add
[ 21.390711][ T113] device: 'link2.1': device_add
[ 21.395569][ T113] device: 'dev2.1.0': device_add
[ 21.400437][ T113] device: 'dev2.1.0': device_add
[ 21.405469][ T113] device: 'link2.2': device_add
[ 21.410232][ T113] device: 'link2.2': device_add
[ 21.415086][ T113] device: 'dev2.2.0': device_add
[ 21.419937][ T113] device: 'dev2.2.0': device_add
[ 21.424910][ T113] device: 'link2.3': device_add
[ 21.429669][ T113] device: 'link2.3': device_add
[ 21.434528][ T113] device: 'dev2.3.0': device_add
[ 21.439374][ T113] device: 'dev2.3.0': device_add
...
[ 21.640403][ T113] device: 'link2.14': device_add
[ 21.645287][ T113] device: 'link2.14': device_add
[ 21.650234][ T113] device: 'dev2.14.0': device_add
[ 21.655197][ T113] device: 'dev2.14.0': device_add
[ 21.660252][ T113] ahci-mvebu f10a8000.sata: FBS is enabled
[ 21.666005][ T113] ata2.00: SCR_CONTROL = 0x300
[ 21.670684][ T113] ata2.01: SCR_CONTROL = 0x300
[ 21.675389][ T113] ata2.02: SCR_CONTROL = 0x300
[ 21.680066][ T113] ata2.03: SCR_CONTROL = 0x300
[ 21.684774][ T113] ata2.04: SCR_CONTROL = 0x300
[ 21.689452][ T113] ata2.05: SCR_CONTROL = 0x300
[ 21.694194][ T113] ata2.06: SCR_CONTROL = 0x300
[ 21.698871][ T113] ata2.07: SCR_CONTROL = 0x300
[ 21.703624][ T113] ata2.00: hard resetting link
[ 21.708304][ T113] hardreset, Online=>Offline
[ 21.708343][ T113] sata_set_spd_needed, scontrol=0x300
[ 21.712815][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 21.718093][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 21.724409][ T113] __sata_set_spd_needed, target=0x1
[ 21.730274][ T113] __sata_set_spd_needed, spd=0x0
[ 21.735366][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 21.740280][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 21.746343][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 21.752643][ T113] __sata_set_spd_needed, target=0x1
[ 21.758522][ T113] __sata_set_spd_needed, spd=0x0
[ 21.763602][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 21.769655][ T113] resume, do loop
[ 22.004001][ T113] resume, after do loop
[ 22.012645][ T113] debounce, SCR=0x123
[ 22.021803][ T113] debounce, SCR=0x123
[ 22.030784][ T113] debounce, SCR=0x123
[ 22.039763][ T113] debounce, SCR=0x123
[ 22.048725][ T113] debounce, SCR=0x123
[ 22.057686][ T113] debounce, SCR=0x123
[ 22.066647][ T113] debounce, SCR=0x123
[ 22.075608][ T113] debounce, SCR=0x123
[ 22.084568][ T113] debounce, SCR=0x123
[ 22.093529][ T113] debounce, SCR=0x123
[ 22.102511][ T113] debounce, SCR=0x123
[ 22.111494][ T113] debounce, SCR=0x123
[ 22.115437][ T113] resume, return at end of function
[ 22.119327][ T113] hardreset, Offline=>Online
[ 22.128892][ T113] hardreset, after check_ready
[ 22.129113][ T113] ata2.00: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 22.140984][ T113] ata2.01: hard resetting link
[ 22.145653][ T113] hardreset, Online=>Offline
[ 22.145691][ T113] sata_set_spd_needed, scontrol=0x300
[ 22.150161][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 22.155436][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 22.161737][ T113] __sata_set_spd_needed, target=0x1
[ 22.167614][ T113] __sata_set_spd_needed, spd=0x0
[ 22.172695][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 22.177617][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 22.183657][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 22.189979][ T113] __sata_set_spd_needed, target=0x1
[ 22.195857][ T113] __sata_set_spd_needed, spd=0x0
[ 22.200936][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 22.206971][ T113] resume, do loop
[ 22.434000][ T113] resume, after do loop
[ 22.442642][ T113] debounce, SCR=0x123
[ 22.451798][ T113] debounce, SCR=0x123
[ 22.460779][ T113] debounce, SCR=0x123
[ 22.469760][ T113] debounce, SCR=0x123
[ 22.478720][ T113] debounce, SCR=0x123
[ 22.487680][ T113] debounce, SCR=0x123
[ 22.496641][ T113] debounce, SCR=0x123
[ 22.505602][ T113] debounce, SCR=0x123
[ 22.514563][ T113] debounce, SCR=0x123
[ 22.523524][ T113] debounce, SCR=0x123
[ 22.532504][ T113] debounce, SCR=0x123
[ 22.541487][ T113] debounce, SCR=0x123
[ 22.545429][ T113] resume, return at end of function
[ 22.549320][ T113] hardreset, Offline=>Online
[ 22.558885][ T113] hardreset, after check_ready
[ 22.559103][ T113] ata2.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 22.570973][ T113] ata2.02: hard resetting link
[ 22.575639][ T113] hardreset, Online=>Offline
[ 22.575677][ T113] sata_set_spd_needed, scontrol=0x300
[ 22.580148][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 22.585423][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 22.591724][ T113] __sata_set_spd_needed, target=0x1
[ 22.597602][ T113] __sata_set_spd_needed, spd=0x0
[ 22.602682][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 22.607608][ T113] __sata_set_spd_needed, initial limit=0xFFFFFFFF
[ 22.613648][ T113] __sata_set_spd_needed, corrected limit=0x1
[ 22.619968][ T113] __sata_set_spd_needed, target=0x1
[ 22.625847][ T113] __sata_set_spd_needed, spd=0x0
[ 22.630927][ T113] __sata_set_spd_needed, final *scontrol=0x310
[ 22.636959][ T113] resume, do loop
[ 22.864000][ T113] resume, after do loop
[ 22.872642][ T113] debounce, SCR=0x0
[ 22.881798][ T113] debounce, SCR=0x0
[ 22.890603][ T113] debounce, SCR=0x0
[ 22.899408][ T113] debounce, SCR=0x0
[ 22.908194][ T113] debounce, SCR=0x0
[ 22.916979][ T113] debounce, SCR=0x0
[ 22.925766][ T113] debounce, SCR=0x0
[ 22.934553][ T113] debounce, SCR=0x0
[ 22.943339][ T113] debounce, SCR=0x0
[ 22.952146][ T113] debounce, SCR=0x0
[ 22.960953][ T113] debounce, SCR=0x0
[ 22.969761][ T113] debounce, SCR=0x0
[ 22.978547][ T113] debounce, SCR=0x0
[ 22.982295][ T113] resume, return at end of function
[ 22.986033][ T113] hardreset, ata_phys_link_offline check failed
[ 22.991325][ T113] ata2.02: SATA link down (SStatus 0 SControl 300)
...
[ 25.191319][ T113] ata2.07: SATA link down (SStatus 0 SControl 300)
[ 25.204010][ T113] ata2.00: ATA-6: WDC WD50ARC-5040-VOL#01, 0100 AX, max UDMA/133
[ 25.211624][ T113] ata2.00: 976773168 sectors, multi 0: LBA48
[ 25.217741][ T113] ata2.00: configured for UDMA/133
[ 25.222815][ T113] ata2.01: ATA-6: Areca Archive, 0100 AX, max UDMA/133
[ 25.229751][ T113] ata2.01: 23437498368 sectors, multi 0: LBA48
[ 25.236026][ T113] ata2.01: configured for UDMA/133
[ 25.241168][ T113] ata2: EH complete
Marius Dinu
next prev parent reply other threads:[~2023-01-24 8:05 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 19:21 Bug report for ahci-mvebu driver Dinu Marius
2022-11-06 7:05 ` Damien Le Moal
2022-11-07 9:22 ` marius
2022-11-08 6:27 ` Damien Le Moal
2022-11-09 19:52 ` marius
2022-11-09 19:55 ` marius
2022-11-10 2:05 ` Damien Le Moal
2022-11-11 22:32 ` marius
2022-11-12 1:57 ` Damien Le Moal
2022-11-14 20:52 ` marius
2022-11-15 3:02 ` Damien Le Moal
2022-11-15 7:28 ` marius
2022-11-15 8:10 ` Damien Le Moal
2022-11-18 18:24 ` Dinu Marius
2022-11-24 2:40 ` Damien Le Moal
2022-12-04 1:41 ` marius
2022-12-04 10:22 ` Pali Rohár
2022-12-04 21:14 ` marius
2022-12-04 21:46 ` Pali Rohár
2022-12-05 2:02 ` Damien Le Moal
2022-12-06 6:08 ` Damien Le Moal
2022-12-07 18:27 ` marius
2022-12-07 21:54 ` Damien Le Moal
2022-12-07 22:51 ` Damien Le Moal
2022-12-08 18:06 ` marius
2022-12-09 0:34 ` Damien Le Moal
2022-12-09 2:58 ` Damien Le Moal
2022-12-09 7:31 ` marius
2022-12-09 9:28 ` Damien Le Moal
2022-12-09 18:30 ` marius
2023-01-14 18:01 ` marius
2023-01-15 23:37 ` Damien Le Moal
2023-01-17 8:26 ` Damien Le Moal
2023-01-18 19:43 ` marius
2023-01-19 0:29 ` Damien Le Moal
2023-01-19 18:46 ` marius
2023-01-23 7:02 ` Damien Le Moal
2023-01-23 20:00 ` marius
2023-01-23 23:00 ` Damien Le Moal
2023-01-24 8:04 ` marius [this message]
2023-01-24 9:53 ` Damien Le Moal
2023-01-24 17:02 ` marius
2023-01-27 5:13 ` Damien Le Moal
2023-01-27 6:28 ` Damien Le Moal
2023-01-28 17:08 ` marius
2023-01-29 2:23 ` Damien Le Moal
2023-01-29 10:24 ` marius
2023-01-30 1:16 ` Damien Le Moal
2023-01-30 2:38 ` Damien Le Moal
2023-01-30 7:23 ` marius
2023-01-30 7:37 ` Damien Le Moal
2023-01-30 23:22 ` Damien Le Moal
2023-01-31 7:20 ` marius
2023-01-31 7:28 ` Damien Le Moal
2023-02-07 18:40 ` marius
2023-02-07 23:39 ` Damien Le Moal
2023-02-08 12:17 ` marius
2023-02-08 23:00 ` Damien Le Moal
2023-02-12 13:14 ` marius
2023-02-12 23:11 ` Damien Le Moal
2023-01-24 17:06 ` Bug report for sata_via driver marius
2023-01-25 1:26 ` Damien Le Moal
2022-12-08 21:26 ` Bug report for ahci-mvebu driver Pali Rohár
2022-12-09 1:54 ` Damien Le Moal
2022-11-26 14:26 ` Pali Rohár
2023-01-23 9:10 ` Hajo Noerenberg
2023-01-23 12:13 ` Damien Le Moal
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=db3fa398d4a1dcadb9df02d1001a61c6@psihoexpert.ro \
--to=marius@psihoexpert.ro \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linux-ide@vger.kernel.org \
/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