From: Igor Pylypiv <ipylypiv@google.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>,
Damien Le Moal <dlemoal@kernel.org>, Tejun Heo <tj@kernel.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Akshat Jain <akshatzen@google.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v3 1/6] ata: libata-scsi: Fix offsets for the fixed format sense data
Date: Fri, 28 Jun 2024 23:17:59 +0000 [thread overview]
Message-ID: <Zn9Ep7AzerdHexJa@google.com> (raw)
In-Reply-To: <Zn8AJHdybqdQwsZs@ryzen.lan>
On Fri, Jun 28, 2024 at 08:25:40PM +0200, Niklas Cassel wrote:
> On Fri, Jun 28, 2024 at 05:49:22PM +0200, Niklas Cassel wrote:
> > On Fri, Jun 28, 2024 at 08:47:03AM +0200, Hannes Reinecke wrote:
> > > On 6/27/24 14:08, Niklas Cassel wrote:
> >
> > In SAT-6 there is no mention of compliance with ANSI INCITS 431-2007 should
> > ignore D_SENSE bit and unconditionally return sense data in descriptor format.
> >
> > Anyway, considering that:
> > 1) I'm not sure how a SAT would expose that it is compliant with ANSI INCITS
> > 431-2007.
> > 2) This text has been removed from SAT-6.
> > 3) We currently honour the D_SENSE bit when creating the sense buffer with the
> > SK/ASC/ASCQ that we get from the device.
> >
> > I think that it makes sense to honour the D_SENSE bit also when generating
> > sense data for successful ATA PASS-THROUGH commands (from ATA registers).
>
> Igor, I think you should add a new patch in your series that does:
Thanks Niklas, I'll add the patch in v4.
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index d5874d4b9253..5b211551ac10 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -949,11 +949,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
> &sense_key, &asc, &ascq);
> ata_scsi_set_sense(qc->dev, cmd, sense_key, asc, ascq);
> } else {
> - /*
> - * ATA PASS-THROUGH INFORMATION AVAILABLE
> - * Always in descriptor format sense.
> - */
> - scsi_build_sense(cmd, 1, RECOVERED_ERROR, 0, 0x1D);
> + /* ATA PASS-THROUGH INFORMATION AVAILABLE */
> + ata_scsi_set_sense(qc->dev, cmd, RECOVERED_ERROR, 0, 0x1D);
> }
> }
>
>
> Feel free to copy my arguments above.
>
> I also checked VPD page 89h (ATA Information VPD page), and there are
> no bits there either to claim certain SAT version compliance.
>
> And since this text is not in SAT-6, I can only imagine that they decided
> that is was not a good idea to not always honor D_SENSE...
>
> (It does seem simpler to just always honor it...)
>
>
> Kind regards,
> Niklas
next prev parent reply other threads:[~2024-06-28 23:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240626230411.3471543-1-ipylypiv@google.com>
2024-06-26 23:04 ` [PATCH v3 1/6] ata: libata-scsi: Fix offsets for the fixed format sense data Igor Pylypiv
2024-06-27 12:08 ` Niklas Cassel
2024-06-27 21:21 ` Igor Pylypiv
2024-06-28 6:47 ` Hannes Reinecke
2024-06-28 15:49 ` Niklas Cassel
2024-06-28 18:25 ` Niklas Cassel
2024-06-28 23:17 ` Igor Pylypiv [this message]
2024-06-26 23:04 ` [PATCH v3 2/6] ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 Igor Pylypiv
2024-06-27 0:16 ` Damien Le Moal
2024-06-27 20:55 ` Igor Pylypiv
2024-06-28 3:48 ` Damien Le Moal
2024-06-27 14:14 ` Niklas Cassel
2024-06-27 15:15 ` Niklas Cassel
2024-06-27 21:54 ` Igor Pylypiv
2024-06-28 18:44 ` Niklas Cassel
2024-06-28 23:31 ` Igor Pylypiv
2024-06-29 3:09 ` Niklas Cassel
2024-07-01 20:00 ` Igor Pylypiv
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=Zn9Ep7AzerdHexJa@google.com \
--to=ipylypiv@google.com \
--cc=akshatzen@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).