Commit d37932a9 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: core: Add 'set_status_byte()' accessor

Add the missing 'set_status_byte()' accessor function.

Link: https://lore.kernel.org/r/20210113090500.129644-28-hare@suse.deReviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 78c9efdd
......@@ -308,6 +308,11 @@ static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd)
#define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \
for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
static inline void set_status_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result = (cmd->result & 0xffffff00) | status;
}
static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result = (cmd->result & 0xffff00ff) | (status << 8);
......
Markdown is supported
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