From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Gustav Ekelund <gustaek@axis.com>,
Gustav Ekelund <gustav.ekelund@axis.com>,
hare@suse.de, martin.petersen@oracle.com,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@axis.com
Subject: Re: [PATCH] ata: Add sdev attribute to lower link speed in runtime
Date: Wed, 17 Apr 2024 11:56:23 +0200 [thread overview]
Message-ID: <Zh-cx_KGK_M_qUGq@ryzen> (raw)
In-Reply-To: <898497f0-d279-4d01-be8d-aad4048df95d@kernel.org>
On Wed, Apr 17, 2024 at 08:59:27AM +1000, Damien Le Moal wrote:
>
> Can you send examples of the errors you are seeing ? That needs to be
> investigated first before going the (drastic) route of allowing to manually
> lower link speed at run-time.
Gustav, is it possible for you to share the error messages that you are
seeing? Preferably a whole kernel boot.
Since you are talking hot plug, there is a bunch of libata hot-plug related
in v6.9.x (which turns off LPM if your external port is hotplug capable).
So it would be interesting to see if you still get these errors on v6.9-rc4
(we will see if you have LPM enabled), and if so, what errors you are seeing.
You could also try booting with: libata.force=nolpm on the kernel command line.
(This will explicitly set lpm-policy to MAX_POWER, which is different from
lpm-policy=0 (which is the default) - which means keep firmware settings.)
Kind regards,
Niklas
>
> >
> > So I want to adapt the link, depending on the connected model, in a
> > running system because I know that some particular models in this case
> > will operate better in SATA2 in this system.
> >
> > Can I use the libata.force module to make changes to a particular link
> > in runtime?
>
> Nope, libata.force is a module parameter so you can specify it as a kernel boot
> parameter, or if you compile libata as a module when loading (modprobe) libata.
> At run time, you need to rmmod+modprobe again libata, and so the ahci driver as
> well (because of dependencies).
>
> As I mentioned, if a run-time knob really is necessary (it should not be), using
> the ata_link hw_sata_spd_limit would be a better approach. But again, that
> really should not be necessary at all.
>
> >
> > Best regards
> > Gustav
> >
>
> --
> Damien Le Moal
> Western Digital Research
>
next prev parent reply other threads:[~2024-04-17 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 13:48 [PATCH] ata: Add sdev attribute to lower link speed in runtime Gustav Ekelund
2024-04-12 16:59 ` Niklas Cassel
2024-04-13 0:29 ` Damien Le Moal
2024-04-15 14:49 ` Gustav Ekelund
2024-04-16 22:59 ` Damien Le Moal
2024-04-17 9:20 ` Gustav Ekelund
2024-04-17 9:56 ` Niklas Cassel [this message]
2024-04-17 10:14 ` Niklas Cassel
2024-04-18 12:47 ` Gustav Ekelund
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=Zh-cx_KGK_M_qUGq@ryzen \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=gustaek@axis.com \
--cc=gustav.ekelund@axis.com \
--cc=hare@suse.de \
--cc=kernel@axis.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.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