Skip to content

Commit cbe095e

Browse files
KAGA-KOKOmartinkpetersen
authored andcommitted
Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"
The description of commit e39a973 is wrong: it mentions that commit 2a842ac introduced a bug in __scsi_error_from_host_byte() although that commit did not change the behavior of that function. Additionally, commit e39a973 introduced a bug: it causes commands that fail with hostbyte=DID_OK and driverbyte=DRIVER_SENSE to be completed with BLK_STS_OK. Hence revert that commit. Fixes: e39a973 ("scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()") Reported-by: Damien Le Moal <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Douglas Gilbert <[email protected]> Cc: Damien Le Moal <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Lee Duncan <[email protected]> Cc: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1c6b41f commit cbe095e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,6 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd,
733733
int result)
734734
{
735735
switch (host_byte(result)) {
736-
case DID_OK:
737-
return BLK_STS_OK;
738736
case DID_TRANSPORT_FAILFAST:
739737
return BLK_STS_TRANSPORT;
740738
case DID_TARGET_FAILURE:

0 commit comments

Comments
 (0)