Skip to content
Commit 152e52fb authored by Damien Le Moal's avatar Damien Le Moal Committed by Martin K. Petersen
Browse files

scsi: core: Support Service Action in scsi_report_opcode()



The REPORT_SUPPORTED_OPERATION_CODES command allows checking for support of
commands that have the same opcode but different service actions, such as
READ 32 and WRITE 32. However, the current implementation of
scsi_report_opcode() only allows checking an operation code without a
service action differentiation.

Add the "sa" argument to scsi_report_opcode() to allow passing a service
action. If a non-zero service action is specified, the reporting options
field value is set to 3 to have the service action field taken into account
by the device. If no service action field is specified (zero), the
reporting options field is set to 1 as before.

Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20230511011356.227789-8-nks@flawful.org
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a6cdc35f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment