Re: [PATCH 5.15 179/484] ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 15, 2024 at 03:20:37PM +0200, Greg Kroah-Hartman wrote:
> 5.15-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Igor Pylypiv <ipylypiv@xxxxxxxxxx>
> 
> commit 28ab9769117ca944cb6eb537af5599aa436287a4 upstream.
> 
> SAT-5 revision 8 specification removed the text about the ANSI INCITS
> 431-2007 compliance which was requiring SCSI/ATA Translation (SAT) to
> return descriptor format sense data for the ATA PASS-THROUGH commands
> regardless of the setting of the D_SENSE bit.
> 
> Let's honor the D_SENSE bit for ATA PASS-THROUGH commands while
> generating the "ATA PASS-THROUGH INFORMATION AVAILABLE" sense data.
> 
> SAT-5 revision 7
> ================
> 
> 12.2.2.8 Fixed format sense data
> 
> Table 212 shows the fields returned in the fixed format sense data
> (see SPC-5) for ATA PASS-THROUGH commands. SATLs compliant with ANSI
> INCITS 431-2007, SCSI/ATA Translation (SAT) return descriptor format
> sense data for the ATA PASS-THROUGH commands regardless of the setting
> of the D_SENSE bit.
> 
> SAT-5 revision 8
> ================
> 
> 12.2.2.8 Fixed format sense data
> 
> Table 211 shows the fields returned in the fixed format sense data
> (see SPC-5) for ATA PASS-THROUGH commands.
> 
> Cc: stable@xxxxxxxxxxxxxxx # 4.19+
> Reported-by: Niklas Cassel <cassel@xxxxxxxxxx>
> Closes: https://lore.kernel.org/linux-ide/Zn1WUhmLglM4iais@xxxxxxxxx
> Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>
> Signed-off-by: Igor Pylypiv <ipylypiv@xxxxxxxxxx>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> Link: https://lore.kernel.org/r/20240702024735.1152293-4-ipylypiv@xxxxxxxxxx
> Signed-off-by: Niklas Cassel <cassel@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/ata/libata-scsi.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -872,11 +872,8 @@ static void ata_gen_passthru_sense(struc
>  				   &sense_key, &asc, &ascq, verbose);
>  		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);
>  	}
>  
>  	if ((cmd->sense_buffer[0] & 0x7f) >= 0x72) {
> 
> 

Hello Greg,

This commit unfortunately breaks hdparm, hddtemp and udisks,
and I have just sent a PR to Linus that reverts this commit, see:
https://lore.kernel.org/linux-ide/20240815124310.1349324-1-cassel@xxxxxxxxxx/T/#u
and
https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux.git/commit/?h=ata-6.11-rc4

So it might be a good idea to not include this patch in v5.15.x in the
first place, so that we avoid having a v5.15.x release that will be broken
until the revert gets backported (in v5.15.x+1).


Kind regards,
Niklas




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux