Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 #ifndef _SCSI_SCSI_STATUS_H
0004 #define _SCSI_SCSI_STATUS_H
0005 
0006 #include <linux/types.h>
0007 #include <scsi/scsi_proto.h>
0008 
0009 /* Message codes. */
0010 enum scsi_msg_byte {
0011     COMMAND_COMPLETE    = 0x00,
0012     EXTENDED_MESSAGE    = 0x01,
0013     SAVE_POINTERS       = 0x02,
0014     RESTORE_POINTERS    = 0x03,
0015     DISCONNECT      = 0x04,
0016     INITIATOR_ERROR     = 0x05,
0017     ABORT_TASK_SET      = 0x06,
0018     MESSAGE_REJECT      = 0x07,
0019     NOP         = 0x08,
0020     MSG_PARITY_ERROR    = 0x09,
0021     LINKED_CMD_COMPLETE = 0x0a,
0022     LINKED_FLG_CMD_COMPLETE = 0x0b,
0023     TARGET_RESET        = 0x0c,
0024     ABORT_TASK      = 0x0d,
0025     CLEAR_TASK_SET      = 0x0e,
0026     INITIATE_RECOVERY   = 0x0f,            /* SCSI-II only */
0027     RELEASE_RECOVERY    = 0x10,            /* SCSI-II only */
0028     TERMINATE_IO_PROC   = 0x11,            /* SCSI-II only */
0029     CLEAR_ACA       = 0x16,
0030     LOGICAL_UNIT_RESET  = 0x17,
0031     SIMPLE_QUEUE_TAG    = 0x20,
0032     HEAD_OF_QUEUE_TAG   = 0x21,
0033     ORDERED_QUEUE_TAG   = 0x22,
0034     IGNORE_WIDE_RESIDUE = 0x23,
0035     ACA         = 0x24,
0036     QAS_REQUEST     = 0x55,
0037 
0038     /* Old SCSI2 names, don't use in new code */
0039     BUS_DEVICE_RESET    = TARGET_RESET,
0040     ABORT           = ABORT_TASK_SET,
0041 };
0042 
0043 /* Host byte codes. */
0044 enum scsi_host_status {
0045     DID_OK      = 0x00, /* NO error                                */
0046     DID_NO_CONNECT  = 0x01, /* Couldn't connect before timeout period  */
0047     DID_BUS_BUSY    = 0x02, /* BUS stayed busy through time out period */
0048     DID_TIME_OUT    = 0x03, /* TIMED OUT for other reason              */
0049     DID_BAD_TARGET  = 0x04, /* BAD target.                             */
0050     DID_ABORT   = 0x05, /* Told to abort for some other reason     */
0051     DID_PARITY  = 0x06, /* Parity error                            */
0052     DID_ERROR   = 0x07, /* Internal error                          */
0053     DID_RESET   = 0x08, /* Reset by somebody.                      */
0054     DID_BAD_INTR    = 0x09, /* Got an interrupt we weren't expecting.  */
0055     DID_PASSTHROUGH = 0x0a, /* Force command past mid-layer            */
0056     DID_SOFT_ERROR  = 0x0b, /* The low level driver just wish a retry  */
0057     DID_IMM_RETRY   = 0x0c, /* Retry without decrementing retry count  */
0058     DID_REQUEUE = 0x0d, /* Requeue command (no immediate retry) also
0059                  * without decrementing the retry count    */
0060     DID_TRANSPORT_DISRUPTED = 0x0e, /* Transport error disrupted execution
0061                      * and the driver blocked the port to
0062                      * recover the link. Transport class will
0063                      * retry or fail IO */
0064     DID_TRANSPORT_FAILFAST = 0x0f, /* Transport class fastfailed the io */
0065     DID_TARGET_FAILURE = 0x10, /* Permanent target failure, do not retry on
0066                     * other paths */
0067     DID_NEXUS_FAILURE = 0x11,  /* Permanent nexus failure, retry on other
0068                     * paths might yield different results */
0069     DID_ALLOC_FAILURE = 0x12,  /* Space allocation on the device failed */
0070     DID_MEDIUM_ERROR = 0x13,  /* Medium error */
0071     DID_TRANSPORT_MARGINAL = 0x14, /* Transport marginal errors */
0072 };
0073 
0074 #endif /* _SCSI_SCSI_STATUS_H */