Skip to content

Commit 35cd2f5

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: core: Extend struct scsi_exec_args
Allow SCSI LLDs to specify SCMD_* flags. Link: https://lore.kernel.org/r/20230210193258.4004923-2-bvanassche@acm.org Cc: Mike Christie <michael.christie@oracle.com> Cc: John Garry <john.g.garry@oracle.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 442336a commit 35cd2f5

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/scsi/scsi_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ int scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd,
229229
scmd->cmd_len = COMMAND_SIZE(cmd[0]);
230230
memcpy(scmd->cmnd, cmd, scmd->cmd_len);
231231
scmd->allowed = retries;
232+
scmd->flags |= args->scmd_flags;
232233
req->timeout = timeout;
233234
req->rq_flags |= RQF_QUIET;
234235

include/scsi/scsi_device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ struct scsi_exec_args {
462462
unsigned int sense_len; /* sense buffer len */
463463
struct scsi_sense_hdr *sshdr; /* decoded sense header */
464464
blk_mq_req_flags_t req_flags; /* BLK_MQ_REQ flags */
465+
int scmd_flags; /* SCMD flags */
465466
int *resid; /* residual length */
466467
};
467468

0 commit comments

Comments
 (0)