From: Anton Lundin <glance@acc.umu.se>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: Don't issue ATA_LOG_DIRECTORY to SATADOM-ML 3ME
Date: Wed, 2 Feb 2022 13:25:20 +0100 [thread overview]
Message-ID: <20220202122520.GE723116@montezuma.acc.umu.se> (raw)
In-Reply-To: <bf9f47f1-08c4-370b-446a-1ae9efdc772a@opensource.wdc.com>
On 02 February, 2022 - Damien Le Moal wrote:
> On 2/2/22 19:05, Anton Lundin wrote:
> > Back in 06f6c4c6c3e8 ("ata: libata: add missing ata_identify_page_supported() calls")
> > a read of ATA_LOG_DIRECTORY page was added. This caused the
> > SATADOM-ML 3ME to lock up.
> >
> > In 636f6e2af4fb ("libata: add horkage for missing Identify Device log")
> > a flag was added to cache if a device supports this or not.
> >
> > This adds a blacklist entry which flags that these devices doesn't
> > support that call and shouldn't be issued that call.
> >
> > Cc: stable@vger.kernel.org # v5.10+
> > Signed-off-by: Anton Lundin <glance@acc.umu.se>
> > Depends-on: 636f6e2af4fb ("libata: add horkage for missing Identify Device log")
>
> I do not think so. See below.
>
> > ---
> > drivers/ata/libata-core.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> > index 87d36b29ca5f..e024af9f33d0 100644
> > --- a/drivers/ata/libata-core.c
> > +++ b/drivers/ata/libata-core.c
> > @@ -4070,6 +4070,13 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
> > { "WDC WD3000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
> > { "WDC WD3200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
> >
> > + /*
> > + * This sata dom goes on a walkabout when it sees the
> > + * ATA_LOG_DIRECTORY read request so ensure we don't issue such a
> > + * request to these devices.
> > + */
> > + { "SATADOM-ML 3ME", NULL, ATA_HORKAGE_NO_ID_DEV_LOG },
>
> This flag only disables trying to access the identify device log page,
> it does *not* avoid access to the log directory log page in general. The
> log directory will still be consulted for other log pages beside the
> identify device log page, from any function that calls
> ata_log_supported() (e.g. ata_dev_config_ncq_send_recv() and
> ata_dev_config_ncq_non_data())
Non of those code paths are called for this device, probably due to some
other flag disqualifying them.
> So it will be a lot more solid to define a ATA_HORKAGE_NO_LOG_DIR flag
> and test for it in ata_log_supported(), completely preventing any access
> to the log directory page for this drive type.
That was my first thought but then I found ATA_HORKAGE_NO_ID_DEV_LOG
which was in the calling path that actually triggered this issue.
But, yes, I totally agree that's a more solid solution preventing this
kind of issue to crop up again.
> > +
> > /* End Marker */
> > { }
> > };
>
> Note: if you need this fix sent to linux-stable, add "Cc: stable@..."
> and a Fixes tag.
I'd think it's fitting to send it to linux-stable, because it prevents
those DOM's from working in v5.15.5+.
Ok. I must have missed that part when I read submitting-patches doc.
I'll rework and re-submit the patch.
//Anton
next prev parent reply other threads:[~2022-02-02 12:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 10:05 [PATCH] libata: Don't issue ATA_LOG_DIRECTORY to SATADOM-ML 3ME Anton Lundin
2022-02-02 10:45 ` Damien Le Moal
2022-02-02 12:25 ` Anton Lundin [this message]
2022-02-02 12:48 ` Damien Le Moal
2022-02-02 13:09 ` Anton Lundin
2022-02-02 13:54 ` Anton Lundin
2022-02-02 22:00 ` Damien Le Moal
2022-02-03 8:32 ` Anton Lundin
2022-02-03 8:40 ` Damien Le Moal
2022-02-03 9:11 ` Anton Lundin
2022-02-03 9:21 ` Damien Le Moal
2022-02-03 9:44 ` Anton Lundin
2022-02-02 22:04 ` Damien Le Moal
2022-02-02 12:07 ` Damien Le Moal
2022-02-02 13:12 ` Anton Lundin
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=20220202122520.GE723116@montezuma.acc.umu.se \
--to=glance@acc.umu.se \
--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