From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>
Cc: Christian Heusel <christian@heusel.eu>,
Igor Pylypiv <ipylypiv@google.com>,
linux-ide@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
regressions@lists.linux.dev, stable@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION][BISECTED][STABLE] hdparm errors since 28ab9769117c
Date: Fri, 9 Aug 2024 08:21:25 -0700 [thread overview]
Message-ID: <c2334dc1-d036-434f-8632-6583138f9176@kernel.org> (raw)
In-Reply-To: <ZrYn9CL1uLJEwpdT@ryzen.lan>
On 2024/08/09 7:30, Niklas Cassel wrote:
> Hello Damien,
>
> If we want to no longer respect the D_SENSE bit for successful ATA-passthrough
> commands, e.g. by replacing the ata_scsi_set_sense() call with a
> scsi_build_sense() call in the else clause:
> https://github.com/torvalds/linux/blob/v6.11-rc2/drivers/ata/libata-scsi.c#L955
>
> ...then I think that we should also replace the ata_scsi_set_sense() call with
> a scsi_build_sense() call for failed ATA-passthrough commands too
> (in the non-else clause):
> https://github.com/torvalds/linux/blob/v6.11-rc2/drivers/ata/libata-scsi.c#L952
>
> ..however, that does not sound like a very nice solution IMO.
>
>
> Another option, if there are a lot of user space programs that incorrectly
> assume that the sense data (for both successful and failed commands) is in
> descriptor format, without bothering to check the sense data type, one option
> might be to change the default value of D_SENSE in the control mode page to 1
> in libata's SATL, i.e. set ATA_DFLAG_D_SENSE in dev->flags by default.
>
> That way, we will still respect D_SENSE while generating the sense data
> (in case the user issues a mode select to modify the bit), and the default
> will be to generate the sense data in descriptor format, as it has been
> since 11093cb1ef56 ("libata-scsi: generate correct ATA pass-through sense").
That indeed should be acceptable. And we should also patch hdparm to properly
look at the sense format and not assume descriptor format by default.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-08-09 15:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 17:23 Christian Heusel
2024-08-07 18:26 ` Damien Le Moal
2024-08-07 22:10 ` Niklas Cassel
2024-08-09 14:30 ` Niklas Cassel
2024-08-09 15:21 ` Damien Le Moal [this message]
2024-08-09 15:34 ` Damien Le Moal
2024-08-09 18:42 ` Christian Heusel
2024-08-09 20:13 ` Christian Heusel
2024-08-12 9:26 ` Linux regression tracking (Thorsten Leemhuis)
2024-08-19 18:45 ` Salvatore Bonaccorso
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=c2334dc1-d036-434f-8632-6583138f9176@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=christian@heusel.eu \
--cc=hare@suse.de \
--cc=ipylypiv@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=stable@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
all inboxes | Powered by JetHome®