mbox series

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

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

Message

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

DID_TARGET_FAILURE
DID_NEXUS_FAILURE
DID_ALLOC_FAILURE
DID_MEDIUM_ERROR

to be internal to scsi-ml and used to tell the completion path what type
of error it was without having to re-parse the sense, host codes and
status. But at some point drivers started using them and the driver
writers never updated scsi-ml, so we now have the bugs:

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.

v2:
- Rename SPACE_ALLOC to NOSPC
- Fix up email subject formatting
- Drop part of xen patch that removed zen definitions.

Comments

Martin K. Petersen Sept. 7, 2022, 2:14 a.m. UTC | #1
Mike,

> The following patches made over Martin's 5.20 staging branch fix an
> issue where we intended the host codes:

Applied to 6.1/scsi-staging, thanks!