Skip to content

Commit 0f7f623

Browse files
hreineckeJames Bottomley
authored andcommitted
[SCSI] Document enhanced error codes
Document the various error codes returned on I/O failure. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent c69c6be commit 0f7f623

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎drivers/scsi/scsi_lib.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,18 @@ void scsi_release_buffers(struct scsi_cmnd *cmd)
716716
}
717717
EXPORT_SYMBOL(scsi_release_buffers);
718718

719+
/**
720+
* __scsi_error_from_host_byte - translate SCSI error code into errno
721+
* @cmd: SCSI command (unused)
722+
* @result: scsi error code
723+
*
724+
* Translate SCSI error code into standard UNIX errno.
725+
* Return values:
726+
* -ENOLINK temporary transport failure
727+
* -EREMOTEIO permanent target failure, do not retry
728+
* -EBADE permanent nexus failure, retry on other path
729+
* -EIO unspecified I/O error
730+
*/
719731
static int __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result)
720732
{
721733
int error = 0;

0 commit comments

Comments
 (0)