Skip to content

Commit e39a973

Browse files
hreineckemartinkpetersen
authored andcommitted
scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()
When converting __scsi_error_from_host_byte() to BLK_STS error codes the case DID_OK was forgotten, resulting in it always returning an error. Fixes: 2a842ac ("block: introduce new block status code type") Cc: Doug Gilbert <dgilbert@interlog.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3be8828 commit e39a973

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,8 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd,
720720
int result)
721721
{
722722
switch (host_byte(result)) {
723+
case DID_OK:
724+
return BLK_STS_OK;
723725
case DID_TRANSPORT_FAILFAST:
724726
return BLK_STS_TRANSPORT;
725727
case DID_TARGET_FAILURE:

0 commit comments

Comments
 (0)