mbox series

[00/10] scsi: Fix internal host code use

Message ID 20220804034100.121125-1-michael.christie@oracle.com
Headers show
Series scsi: Fix internal host code use | expand

Message

Mike Christie Aug. 4, 2022, 3:40 a.m. UTC
The following patches made over Martin's 5.20 staging branch fix an issue
where we probably intended the host codes:

DID_TARGET_FAILURE
DID_NEXUS_FAILURE
DID_ALLOC_FAILURE
DID_MEDIUM_ERROR

to be internal to scsi-ml, but at some point drivers started using them
and the driver writers never updated scsi-ml.

The problem with drivers using them to tell scsi-ml there was an error
is:

1. scsi_result_to_blk_status clears those codes, so they are not
propagated upwards. SG IO/passthrough users will then not see an error
and think a command was successful.

2. The SCSI error handler runs because scsi_decide_disposition has no
case statements for them and we return FAILED.

This patchset converts the drivers to stop using these codes, and then
moves them to scsi_priv.h in a new error byte so they can only be used
by scsi-ml.