[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d51930d9-c0c8-4d0b-8131-bce278c24db8@suse.de>
Date: Tue, 25 Jun 2024 08:19:31 +0200
From: Hannes Reinecke <hare@...e.de>
To: Igor Pylypiv <ipylypiv@...gle.com>, Damien Le Moal <dlemoal@...nel.org>,
Niklas Cassel <cassel@...nel.org>
Cc: Tejun Heo <tj@...nel.org>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Jason Yan <yanaijie@...wei.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2 1/6] ata: libata-scsi: Do not overwrite valid sense
data when CK_COND=1
On 6/25/24 00:12, Igor Pylypiv wrote:
> Current ata_gen_passthru_sense() code performs two actions:
> 1. Generates sense data based on the ATA 'status' and ATA 'error' fields.
> 2. Populates "ATA Status Return sense data descriptor" / "Fixed format
> sense data" with ATA taskfile fields.
>
> The problem is that #1 generates sense data even when a valid sense data
> is already present (ATA_QCFLAG_SENSE_VALID is set). Factoring out #2 into
> a separate function allows us to generate sense data only when there is
> no valid sense data (ATA_QCFLAG_SENSE_VALID is not set).
>
> As a bonus, we can now delete a FIXME comment in atapi_qc_complete()
> which states that we don't want to translate taskfile registers into
> sense descriptors for ATAPI.
>
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Igor Pylypiv <ipylypiv@...gle.com>
> ---
> drivers/ata/libata-scsi.c | 158 +++++++++++++++++++++-----------------
> 1 file changed, 86 insertions(+), 72 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Powered by blists - more mailing lists