[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrYn9CL1uLJEwpdT@ryzen.lan>
Date: Fri, 9 Aug 2024 16:30:12 +0200
From: Niklas Cassel <cassel@...nel.org>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: Christian Heusel <christian@...sel.eu>,
Igor Pylypiv <ipylypiv@...gle.com>, linux-ide@...r.kernel.org,
Hannes Reinecke <hare@...e.de>, regressions@...ts.linux.dev,
stable@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [REGRESSION][BISECTED][STABLE] hdparm errors since 28ab9769117c
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
Powered by blists - more mailing lists