mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
scsi: ps3rom: Use combined sense codes
Refactor the PS3 DVD driver to use scsi_set_sense() and replace all hard-coded additional sense codes and additional sense code qualifiers with the enum values defined in include/scsi/scsi_sense.h. This helps with code clarity as the sense codes being processed are easier to test and self-documented. No functional change intended. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@kernel.org> Link: https://patch.msgid.link/20260908090308.1085097-26-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
374219068a
commit
fd09d129d9
|
|
@ -233,7 +233,8 @@ static enum scsi_qc_status ps3rom_queuecommand_lck(struct scsi_cmnd *cmd)
|
|||
}
|
||||
|
||||
if (res) {
|
||||
scsi_build_sense(cmd, 0, ILLEGAL_REQUEST, 0, 0);
|
||||
scsi_set_sense(cmd, 0, ILLEGAL_REQUEST,
|
||||
NO_ADDITIONAL_SENSE_INFORMATION);
|
||||
cmd->result = res;
|
||||
priv->curr_cmd = NULL;
|
||||
scsi_done(cmd);
|
||||
|
|
@ -316,7 +317,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data)
|
|||
goto done;
|
||||
}
|
||||
|
||||
scsi_build_sense(cmd, 0, sense_key, asc, ascq);
|
||||
scsi_set_sense(cmd, 0, sense_key, scsi_sense_code(asc, ascq));
|
||||
|
||||
done:
|
||||
priv->curr_cmd = NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user