linux/drivers/scsi/bnx2i/57xx_iscsi_constants.h

/* 57xx_iscsi_constants.h: QLogic NetXtreme II iSCSI HSI
 *
 * Copyright (c) 2006 - 2013 Broadcom Corporation
 * Copyright (c) 2014, QLogic Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * Written by: Anil Veerabhadrappa ([email protected])
 * Previously Maintained by: Eddie Wai ([email protected])
 * Maintained by: [email protected]
 */
#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

/* iSCSI response/messages op codes */
#define ISCSI_OPCODE_CLEANUP_RESPONSE
#define ISCSI_OPCODE_NOPOUT_LOCAL_COMPLETION

/* iSCSI task types */
#define ISCSI_TASK_TYPE_READ
#define ISCSI_TASK_TYPE_WRITE
#define ISCSI_TASK_TYPE_MPATH

/* initial CQ sequence numbers */
#define ISCSI_INITIAL_SN

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

/* KWQ (kernel work queue) request op codes */
#define ISCSI_KWQE_OPCODE_OFFLOAD_CONN1
#define ISCSI_KWQE_OPCODE_OFFLOAD_CONN2
#define ISCSI_KWQE_OPCODE_UPDATE_CONN
#define ISCSI_KWQE_OPCODE_DESTROY_CONN
#define ISCSI_KWQE_OPCODE_INIT1
#define ISCSI_KWQE_OPCODE_INIT2

/* KCQ (kernel completion queue) response op codes */
#define ISCSI_KCQE_OPCODE_OFFLOAD_CONN
#define ISCSI_KCQE_OPCODE_UPDATE_CONN
#define ISCSI_KCQE_OPCODE_DESTROY_CONN
#define ISCSI_KCQE_OPCODE_INIT
#define ISCSI_KCQE_OPCODE_FW_CLEAN_TASK
#define ISCSI_KCQE_OPCODE_TCP_RESET
#define ISCSI_KCQE_OPCODE_TCP_SYN
#define ISCSI_KCQE_OPCODE_TCP_FIN
#define ISCSI_KCQE_OPCODE_TCP_ERROR
#define ISCSI_KCQE_OPCODE_CQ_EVENT_NOTIFICATION
#define ISCSI_KCQE_OPCODE_ISCSI_ERROR

/* KCQ (kernel completion queue) completion status */
#define ISCSI_KCQE_COMPLETION_STATUS_SUCCESS
#define ISCSI_KCQE_COMPLETION_STATUS_INVALID_OPCODE
#define ISCSI_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE
#define ISCSI_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE
#define ISCSI_KCQE_COMPLETION_STATUS_NIC_ERROR

#define ISCSI_KCQE_COMPLETION_STATUS_HDR_DIG_ERR
#define ISCSI_KCQE_COMPLETION_STATUS_DATA_DIG_ERR

#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_UNEXPECTED_OPCODE
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_OPCODE
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_AHS_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_ITT
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_STATSN

/* Response */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_EXP_DATASN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_PEND_R2T
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATA_SEG_LEN_IS_ZERO
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATA_SEG_LEN_TOO_BIG
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_0
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_1
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_2
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_3
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_4
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_5
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_O_U_6

/* Data-In */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_REMAIN_RCV_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_MAX_RCV_PDU_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_F_BIT_ZERO
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_TTT_NOT_RSRV
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATASN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_REMAIN_BURST_LEN

/* R2T */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_BUFFER_OFF
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_LUN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_R2TSN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DESIRED_DATA_TRNS_LEN_0
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DESIRED_DATA_TRNS_LEN_1
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_PEND_R2T_EXCEED
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_TTT_IS_RSRV
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_MAX_BURST_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_DATA_SEG_LEN_NOT_ZERO

/* TMF */
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_REJECT_PDU_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_ASYNC_PDU_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_NOPIN_PDU_LEN
#define ISCSI_KCQE_COMPLETION_STATUS_PROTOCOL_ERR_PEND_R2T_IN_CLEANUP

/* IP/TCP processing errors: */
#define ISCI_KCQE_COMPLETION_STATUS_TCP_ERROR_IP_FRAGMENT
#define ISCI_KCQE_COMPLETION_STATUS_TCP_ERROR_IP_OPTIONS
#define ISCI_KCQE_COMPLETION_STATUS_TCP_ERROR_URGENT_FLAG
#define ISCI_KCQE_COMPLETION_STATUS_TCP_ERROR_MAX_RTRANS

/* iSCSI licensing errors */
/* general iSCSI license not installed */
#define ISCSI_KCQE_COMPLETION_STATUS_ISCSI_NOT_SUPPORTED
/* additional LOM specific iSCSI license not installed */
#define ISCSI_KCQE_COMPLETION_STATUS_LOM_ISCSI_NOT_ENABLED

#define ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY
#define ISCSI_KCQE_COMPLETION_STATUS_PARITY_ERR

/* SQ/RQ/CQ DB structure sizes */
#define ISCSI_SQ_DB_SIZE
#define ISCSI_RQ_DB_SIZE
#define ISCSI_CQ_DB_SIZE

#define ISCSI_SQN_TO_NOTIFY_NOT_VALID

/* Page size codes (for flags field in connection offload request) */
#define ISCSI_PAGE_SIZE_256
#define ISCSI_PAGE_SIZE_512
#define ISCSI_PAGE_SIZE_1K
#define ISCSI_PAGE_SIZE_2K
#define ISCSI_PAGE_SIZE_4K
#define ISCSI_PAGE_SIZE_8K
#define ISCSI_PAGE_SIZE_16K
#define ISCSI_PAGE_SIZE_32K
#define ISCSI_PAGE_SIZE_64K
#define ISCSI_PAGE_SIZE_128K
#define ISCSI_PAGE_SIZE_256K
#define ISCSI_PAGE_SIZE_512K
#define ISCSI_PAGE_SIZE_1M
#define ISCSI_PAGE_SIZE_2M
#define ISCSI_PAGE_SIZE_4M
#define ISCSI_PAGE_SIZE_8M

/* Iscsi PDU related defines */
#define ISCSI_HEADER_SIZE
#define ISCSI_DIGEST_SHIFT
#define ISCSI_DIGEST_SIZE

#define B577XX_ISCSI_CONNECTION_TYPE

#endif /*__57XX_ISCSI_CONSTANTS_H_ */