public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@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 16:30:12 +0200	[thread overview]
Message-ID: <ZrYn9CL1uLJEwpdT@ryzen.lan> (raw)
In-Reply-To: <ZrPw5m9LwMH5NQYy@x1-carbon.lan>

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").


Kind regards,
Niklas

  reply	other threads:[~2024-08-09 14:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 17:23 [REGRESSION][BISECTED][STABLE] hdparm errors since 28ab9769117c Christian Heusel
2024-08-07 18:26 ` Damien Le Moal
2024-08-07 22:10   ` Niklas Cassel
2024-08-09 14:30     ` Niklas Cassel [this message]
2024-08-09 15:21       ` Damien Le Moal
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=ZrYn9CL1uLJEwpdT@ryzen.lan \
    --to=cassel@kernel.org \
    --cc=christian@heusel.eu \
    --cc=dlemoal@kernel.org \
    --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