Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Damien Le Moal <dlemoal@kernel.org>,
	linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH v2 5/5] ata: libata-scsi: support the all command format for reporting supported commands
Date: Thu, 2 Jul 2026 08:54:49 +0200	[thread overview]
Message-ID: <4ce39b7c-8d8d-4334-ab3f-5c59a9f80270@suse.de> (raw)
In-Reply-To: <20260702063412.1892584-6-dlemoal@kernel.org>

On 7/2/26 8:34 AM, Damien Le Moal wrote:
> Add support to ata_scsi_report_supported_opcodes() for the all command
> format indicated with a reporting option of 0. The function
> ata_scsi_report_all_supported_opcodes() is introduced to implement this
> support. This function operates by testing all commands of the
> ata_supported_cmds array and testing them using
> ata_scsi_cmd_is_supported(), filling rbuf as it loops through all the
> commands that libata can emulate or translate.
> 
> With this change, sg_opcodes /dev/sdX is able to list all commands
> supported by libata and a device. An example below is shown for a SATA
> disk also supporting CDL:
> 
>    # sg_opcodes /dev/sda
>      ATA       WDC  WUH722626AL  WZ41
>      Peripheral device type: disk
> 
>    Opcode  Service    CDB  RWCDLP,  Name
>    (hex)   action(h)  size   CDLP
>    -----------------------------------------------
>     00                  6    0,0    Test Unit Ready
>     01                  6    0,0    Rezero Unit
>     03                  6    0,0    Request Sense
>     08                  6    0,0    Read(6)
>     0a                  6    0,0    Write(6)
>     0b                  6    0,0    Seek(6)
>     12                  6    0,0    Inquiry
>     15                  6    0,0    Mode select(6)
>     1a                  6    0,0    Mode sense(6)
>     1b                  6    0,0    Start stop unit
>     1d                  6    0,0    Send diagnostic
>     25                 10    0,0    Read capacity(10)
>     28                 10    0,0    Read(10)
>     2a                 10    0,0    Write(10)
>     2b                 10    0,0    Seek(10)
>     2f                 10    0,0    Verify(10)
>     35                 10    0,0    Synchronize cache(10)
>     55                 10    0,0    Mode select(10)
>     5a                 10    0,0    Mode sense(10)
>     7f     1ff0        32    0,0    ATA pass-through(32)
>     85                 16    0,0    ATA pass-through(16)
>     88                 16    1,1    Read(16)
>     8a                 16    1,2    Write(16)
>     8f                 16    0,0    Verify(16)
>     91                 16    0,0    Synchronize cache(16)
>     93                 16    0,0    Write same(16)
>     9e       10        16    0,0    Read capacity(16)
>     a0                 12    0,0    Report luns
>     a1                 12    0,0    ATA pass-through(12)
>     a3        c        12    0,0    Report supported operation codes
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
>   drivers/ata/libata-scsi.c | 39 +++++++++++++++++++++++++++++++++++++++
>   1 file changed, 39 insertions(+)
> 
Reviewed-by: Hannes Reinecke <hare@kernel.org>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.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

      reply	other threads:[~2026-07-02  6:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02  6:34 [PATCH v2 0/5] Improve ata_scsi_report_supported_opcodes() Damien Le Moal
2026-07-02  6:34 ` [PATCH v2 1/5] ata: libata: rename ata_dev_is_zac() Damien Le Moal
2026-07-02  6:38   ` Hannes Reinecke
2026-07-02  7:16   ` sashiko-bot
2026-07-02  6:34 ` [PATCH v2 2/5] ata: libata-scsi: refactor ata_scsi_report_supported_opcodes() Damien Le Moal
2026-07-02  6:44   ` Hannes Reinecke
2026-07-02  7:01     ` Damien Le Moal
2026-07-02  6:53   ` sashiko-bot
2026-07-02 13:25     ` Niklas Cassel
2026-07-02 14:36       ` Niklas Cassel
2026-07-02 14:48         ` Christoph Hellwig
2026-07-02 14:53           ` Niklas Cassel
2026-07-02  6:34 ` [PATCH v2 3/5] ata: libata-scsi: improve service action support in ata_scsi_report_supported_opcodes() Damien Le Moal
2026-07-02  6:45   ` Hannes Reinecke
2026-07-02  6:47   ` sashiko-bot
2026-07-02  6:34 ` [PATCH v2 4/5] ata: libata-scsi: support reporting options 2 in REPORT SUPPORTED OPERATION CODES Damien Le Moal
2026-07-02  6:46   ` Hannes Reinecke
2026-07-02  6:52   ` sashiko-bot
2026-07-02  7:00     ` Damien Le Moal
2026-07-02 11:41       ` Niklas Cassel
2026-07-02  6:53   ` Hannes Reinecke
2026-07-02  6:34 ` [PATCH v2 5/5] ata: libata-scsi: support the all command format for reporting supported commands Damien Le Moal
2026-07-02  6:54   ` Hannes Reinecke [this message]

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=4ce39b7c-8d8d-4334-ab3f-5c59a9f80270@suse.de \
    --to=hare@suse.de \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.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