Re: [PATCH v1 8/9] ata: libata-scsi: add support for the RESTORE ELEMENTS AND REBUILD command

Hannes Reinecke <[email protected]> Mon, 13 Jul 2026 11:39:29 +0200
Newsgroups org.kernel.vger.linux-ide,org.kernel.vger.linux-scsi
Message-ID <[email protected]>
On 7/6/26 8:56 AM, Damien Le Moal wrote:
> Define the translation for the RESTORE ELEMENTS AND REBUILD command
> (SERVICE ACTION IN command with service action
> SAI_RESTORE_ELEMENTS_AND_REBUILD) into the ATA command
> ATA_CMD_RESTORE_ELEMENTS_AND_REBUILD with the new function
> ata_scsi_restore_elements_and_rebuild_xlat()
> 
> The array of supported commands ata_supported_cmds is modified to add a
> new entry for this command. ata_scsi_cmd_is_supported() is also modify to
> correctly handle this new entry depending on the target device flag
> ATA_DFLAG_DEPOP_RESTORE being set.
> 
> The ATA command completion is handled using the function
> ata_scsi_depop_ua_cap_changed_complete() so that on a successful
> completion, a UNIT ATTENTION with the additional sense code set to
> CAPACITY DATA HAS CHANGED is raised.
> 
> Signed-off-by: Damien Le Moal <[email protected]>
> ---
>   drivers/ata/libata-scsi.c | 37 +++++++++++++++++++++++++++++++++++--
>   include/linux/ata.h       |  1 +
>   2 files changed, 36 insertions(+), 2 deletions(-)
> 
Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
[email protected]                                +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