Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Niklas Cassel <nks@flawful.org>, Damien Le Moal <dlemoal@kernel.org>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	patenteng <dimitar@daskalov.co.uk>,
	linux-ide@vger.kernel.org, Niklas Cassel <niklas.cassel@wdc.com>
Subject: Re: [PATCH] ata: libata-core: fetch sense data for successful commands iff CDL enabled
Date: Thu, 14 Sep 2023 08:01:10 +0200	[thread overview]
Message-ID: <9fb73646-ced8-4270-a047-d522d20f95e8@suse.de> (raw)
In-Reply-To: <20230913150443.1200790-1-nks@flawful.org>

On 9/13/23 17:04, Niklas Cassel wrote:
> From: Niklas Cassel <niklas.cassel@wdc.com>
> 
> Currently, we fetch sense data for a _successful_ command if either:
> 1) Command was NCQ and ATA_DFLAG_CDL_ENABLED flag set (flag
>     ATA_DFLAG_CDL_ENABLED will only be set if the Successful NCQ command
>     sense data supported bit is set); or
> 2) Command was non-NCQ and regular sense data reporting is enabled.
> 
> This means that case 2) will trigger for a non-NCQ command which has
> ATA_SENSE bit set, regardless if CDL is enabled or not.
> 
> This decision was by design. If the device reports that it has sense data
> available, it makes sense to fetch that sense data, since the sk/asc/ascq
> could be important information regardless if CDL is enabled or not.
> 
> However, the fetching of sense data for a successful command is done via
> ATA EH. Considering how intricate the ATA EH is, we really do not want to
> invoke ATA EH unless absolutely needed.
> 
> Before commit 18bd7718b5c4 ("scsi: ata: libata: Handle completion of CDL
> commands using policy 0xD") we never fetched sense data for successful
> non-NCQ commands.
> 
> In order to not invoke the ATA EH unless absolutely necessary, even if the
> device claims support for sense data reporting, only fetch sense data for
> successful (NCQ and non-NCQ commands) if CDL is supported and enabled.
> 
Errm. We need sense data for zoned devices, do we not?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman


  parent reply	other threads:[~2023-09-14  6:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 15:04 [PATCH] ata: libata-core: fetch sense data for successful commands iff CDL enabled Niklas Cassel
2023-09-14  0:14 ` Damien Le Moal
2023-09-14  6:01 ` Hannes Reinecke [this message]
2023-09-14  6:07   ` Damien Le Moal
2023-09-15  6:32 ` Damien Le Moal
2023-09-15 12:05   ` Niklas Cassel

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=9fb73646-ced8-4270-a047-d522d20f95e8@suse.de \
    --to=hare@suse.de \
    --cc=bagasdotme@gmail.com \
    --cc=dimitar@daskalov.co.uk \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=niklas.cassel@wdc.com \
    --cc=nks@flawful.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