drivers/scsi/bnx2i/57xx_iscsi_constants.h

Source file repositories/reference/linux-study-clean/drivers/scsi/bnx2i/57xx_iscsi_constants.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/bnx2i/57xx_iscsi_constants.h
Extension
.h
Size
7297 bytes
Lines
162
Domain
Driver Families
Bucket
drivers/scsi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __57XX_ISCSI_CONSTANTS_H_
#define __57XX_ISCSI_CONSTANTS_H_

/**
* This file defines HSI constants for the iSCSI flows
*/

/* iSCSI request op codes */
#define ISCSI_OPCODE_CLEANUP_REQUEST    (7)

/* iSCSI response/messages op codes */
#define ISCSI_OPCODE_CLEANUP_RESPONSE 		(0x27)
#define ISCSI_OPCODE_NOPOUT_LOCAL_COMPLETION    (0)

/* iSCSI task types */
#define ISCSI_TASK_TYPE_READ    (0)
#define ISCSI_TASK_TYPE_WRITE   (1)
#define ISCSI_TASK_TYPE_MPATH   (2)

/* initial CQ sequence numbers */
#define ISCSI_INITIAL_SN    (1)

/* KWQ (kernel work queue) layer codes */
#define ISCSI_KWQE_LAYER_CODE   (6)

/* KWQ (kernel work queue) request op codes */
#define ISCSI_KWQE_OPCODE_OFFLOAD_CONN1 (0)
#define ISCSI_KWQE_OPCODE_OFFLOAD_CONN2 (1)
#define ISCSI_KWQE_OPCODE_UPDATE_CONN   (2)
#define ISCSI_KWQE_OPCODE_DESTROY_CONN  (3)
#define ISCSI_KWQE_OPCODE_INIT1         (4)
#define ISCSI_KWQE_OPCODE_INIT2         (5)

/* KCQ (kernel completion queue) response op codes */
#define ISCSI_KCQE_OPCODE_OFFLOAD_CONN  (0x10)
#define ISCSI_KCQE_OPCODE_UPDATE_CONN   (0x12)
#define ISCSI_KCQE_OPCODE_DESTROY_CONN  (0x13)
#define ISCSI_KCQE_OPCODE_INIT          (0x14)
#define ISCSI_KCQE_OPCODE_FW_CLEAN_TASK	(0x15)
#define ISCSI_KCQE_OPCODE_TCP_RESET     (0x16)
#define ISCSI_KCQE_OPCODE_TCP_SYN       (0x17)
#define ISCSI_KCQE_OPCODE_TCP_FIN       (0X18)
#define ISCSI_KCQE_OPCODE_TCP_ERROR     (0x19)
#define ISCSI_KCQE_OPCODE_CQ_EVENT_NOTIFICATION (0x20)
#define ISCSI_KCQE_OPCODE_ISCSI_ERROR   (0x21)

/* KCQ (kernel completion queue) completion status */
#define ISCSI_KCQE_COMPLETION_STATUS_SUCCESS                            (0x0)
#define ISCSI_KCQE_COMPLETION_STATUS_INVALID_OPCODE                     (0x1)
#define ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE                  (0x2)
#define ISCSI_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE                   (0x3)
#define ISCSI_KCQE_COMPLETION_STATUS_NIC_ERROR                          (0x4)

#define ISCSI_KCQE_COMPLETION_STATUS_HDR_DIG_ERR                        (0x5)
#define ISCSI_KCQE_COMPLETION_STATUS_DATA_DIG_ERR                       (0x6)

#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_UNEXPECTED_OPCODE     (0xa)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_OPCODE                (0xb)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_AHS_LEN               (0xc)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_ITT                   (0xd)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_STATSN                (0xe)

/* Response */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_EXP_DATASN            (0xf)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_PEND_R2T              (0x10)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATA_SEG_LEN_IS_ZERO  (0x2c)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATA_SEG_LEN_TOO_BIG  (0x2d)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_0                 (0x11)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_1                 (0x12)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_2                 (0x13)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_3                 (0x14)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_4                 (0x15)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_5                 (0x16)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_6                 (0x17)

/* Data-In */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_REMAIN_RCV_LEN        (0x18)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_MAX_RCV_PDU_LEN       (0x19)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_F_BIT_ZERO            (0x1a)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_TTT_NOT_RSRV          (0x1b)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATASN                (0x1c)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_REMAIN_BURST_LEN      (0x1d)

/* R2T */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_BUFFER_OFF            (0x1f)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_LUN                   (0x20)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_R2TSN                 (0x21)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DESIRED_DATA_TRNS_LEN_0 (0x22)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DESIRED_DATA_TRNS_LEN_1 (0x23)
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_PEND_R2T_EXCEED       (0x24)

Annotation

Implementation Notes