Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
qla_target.h File Reference
#include "qla_def.h"
#include <target/target_core_base.h>

Go to the source code of this file.

Data Structures

struct  imm_ntfy_from_isp
 
struct  nack_to_isp
 
struct  ctio_to_2xxx
 
struct  fcp_hdr
 
struct  fcp_hdr_le
 
struct  atio7_fcp_cmnd
 
struct  atio_from_isp
 
struct  ctio7_to_24xx
 
struct  ctio7_from_24xx
 
struct  abts_recv_from_24xx
 
struct  ba_acc_le
 
struct  ba_rjt_le
 
struct  abts_resp_to_24xx
 
struct  abts_resp_from_24xx_fw
 
struct  qla_tgt_func_tmpl
 
struct  qla_port_24xx_data
 
struct  qla_tgt
 
struct  qla_tgt_sess
 
struct  qla_tgt_cmd
 
struct  qla_tgt_sess_work_param
 
struct  qla_tgt_mgmt_cmd
 
struct  qla_tgt_prm
 
struct  qla_tgt_srr_imm
 
struct  qla_tgt_srr_ctio
 

Macros

#define QLA2XXX_TARGET_MAGIC   269
 
#define QLA2XXX_INITIATOR_MAGIC   57222
 
#define QLA2XXX_INI_MODE_STR_EXCLUSIVE   "exclusive"
 
#define QLA2XXX_INI_MODE_STR_DISABLED   "disabled"
 
#define QLA2XXX_INI_MODE_STR_ENABLED   "enabled"
 
#define QLA2XXX_INI_MODE_EXCLUSIVE   0
 
#define QLA2XXX_INI_MODE_DISABLED   1
 
#define QLA2XXX_INI_MODE_ENABLED   2
 
#define QLA2XXX_COMMAND_COUNT_INIT   250
 
#define QLA2XXX_IMMED_NOTIFY_COUNT_INIT   250
 
#define CTIO_COMPLETION_HANDLE_MARK   BIT_29
 
#define HANDLE_IS_CTIO_COMP(h)   (h & CTIO_COMPLETION_HANDLE_MARK)
 
#define CTIO_INTERMEDIATE_HANDLE_MARK   BIT_30
 
#define OF_SS_MODE_0   0
 
#define OF_SS_MODE_1   1
 
#define OF_SS_MODE_2   2
 
#define OF_SS_MODE_3   3
 
#define OF_EXPL_CONF   BIT_5 /* Explicit Confirmation Requested */
 
#define OF_DATA_IN   BIT_6 /* Data in to initiator */
 
#define OF_DATA_OUT   BIT_7 /* Data out from initiator */
 
#define OF_NO_DATA   (BIT_7 | BIT_6)
 
#define OF_INC_RC   BIT_8 /* Increment command resource count */
 
#define OF_FAST_POST   BIT_9 /* Enable mailbox fast posting. */
 
#define OF_CONF_REQ   BIT_13 /* Confirmation Requested */
 
#define OF_TERM_EXCH   BIT_14 /* Terminate exchange */
 
#define OF_SSTS   BIT_15 /* Send SCSI status */
 
#define QLA_TGT_DATASEGS_PER_CMD32   3
 
#define QLA_TGT_DATASEGS_PER_CONT32   7
 
#define QLA_TGT_MAX_SG32(ql)
 
#define QLA_TGT_DATASEGS_PER_CMD64   2
 
#define QLA_TGT_DATASEGS_PER_CONT64   5
 
#define QLA_TGT_MAX_SG64(ql)
 
#define QLA_TGT_DATASEGS_PER_CMD_24XX   1
 
#define QLA_TGT_DATASEGS_PER_CONT_24XX   5
 
#define QLA_TGT_MAX_SG_24XX(ql)
 
#define GET_TARGET_ID(ha, iocb)
 
#define IMMED_NOTIFY_TYPE   0x0D /* Immediate notify entry. */
 
#define SRR_IU_DATA_IN   0x1
 
#define SRR_IU_DATA_OUT   0x5
 
#define SRR_IU_STATUS   0x7
 
#define NOTIFY24XX_FLAGS_GLOBAL_TPRLO   BIT_1
 
#define NOTIFY24XX_FLAGS_PUREX_IOCB   BIT_0
 
#define NOTIFY_ACK_TYPE   0x0E /* Notify acknowledge entry. */
 
#define NOTIFY_ACK_SRR_FLAGS_ACCEPT   0
 
#define NOTIFY_ACK_SRR_FLAGS_REJECT   1
 
#define NOTIFY_ACK_SRR_REJECT_REASON_UNABLE_TO_PERFORM   0x9
 
#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_NO_EXPL   0
 
#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_UNABLE_TO_SUPPLY_DATA   0x2a
 
#define NOTIFY_ACK_SUCCESS   0x01
 
#define ACCEPT_TGT_IO_TYPE   0x16 /* Accept target I/O entry. */
 
#define CONTINUE_TGT_IO_TYPE   0x17
 
#define ATIO_PATH_INVALID   0x07
 
#define ATIO_CANT_PROV_CAP   0x16
 
#define ATIO_CDB_VALID   0x3D
 
#define ATIO_EXEC_READ   BIT_1
 
#define ATIO_EXEC_WRITE   BIT_0
 
#define CTIO_A64_TYPE   0x1F
 
#define CTIO_SUCCESS   0x01
 
#define CTIO_ABORTED   0x02
 
#define CTIO_INVALID_RX_ID   0x08
 
#define CTIO_TIMEOUT   0x0B
 
#define CTIO_LIP_RESET   0x0E
 
#define CTIO_TARGET_RESET   0x17
 
#define CTIO_PORT_UNAVAILABLE   0x28
 
#define CTIO_PORT_LOGGED_OUT   0x29
 
#define CTIO_PORT_CONF_CHANGED   0x2A
 
#define CTIO_SRR_RECEIVED   0x45
 
#define CTIO_RET_TYPE   0x17 /* CTIO return entry */
 
#define ATIO_TYPE7   0x06 /* Accept target I/O entry for 24xx */
 
#define F_CTL_EXCH_CONTEXT_RESP   BIT_23
 
#define F_CTL_SEQ_CONTEXT_RESIP   BIT_22
 
#define F_CTL_LAST_SEQ   BIT_20
 
#define F_CTL_END_SEQ   BIT_19
 
#define F_CTL_SEQ_INITIATIVE   BIT_16
 
#define R_CTL_BASIC_LINK_SERV   0x80
 
#define R_CTL_B_ACC   0x4
 
#define R_CTL_B_RJT   0x5
 
#define FCP_CMND_TASK_MGMT_CLEAR_ACA   6
 
#define FCP_CMND_TASK_MGMT_TARGET_RESET   5
 
#define FCP_CMND_TASK_MGMT_LU_RESET   4
 
#define FCP_CMND_TASK_MGMT_CLEAR_TASK_SET   2
 
#define FCP_CMND_TASK_MGMT_ABORT_TASK_SET   1
 
#define ATIO_EXCHANGE_ADDRESS_UNKNOWN   0xFFFFFFFF
 
#define ATIO_PROCESSED   0xDEADDEAD /* Signature */
 
#define CTIO_TYPE7   0x12 /* Continue target I/O entry (for 24xx) */
 
#define CTIO7_NHANDLE_UNRECOGNIZED   0xFFFF
 
#define CTIO7_FLAGS_SEND_STATUS   BIT_15
 
#define CTIO7_FLAGS_TERMINATE   BIT_14
 
#define CTIO7_FLAGS_CONFORM_REQ   BIT_13
 
#define CTIO7_FLAGS_DONT_RET_CTIO   BIT_8
 
#define CTIO7_FLAGS_STATUS_MODE_0   0
 
#define CTIO7_FLAGS_STATUS_MODE_1   BIT_6
 
#define CTIO7_FLAGS_EXPLICIT_CONFORM   BIT_5
 
#define CTIO7_FLAGS_CONFIRM_SATISF   BIT_4
 
#define CTIO7_FLAGS_DSD_PTR   BIT_2
 
#define CTIO7_FLAGS_DATA_IN   BIT_1
 
#define CTIO7_FLAGS_DATA_OUT   BIT_0
 
#define ELS_PLOGI   0x3
 
#define ELS_FLOGI   0x4
 
#define ELS_LOGO   0x5
 
#define ELS_PRLI   0x20
 
#define ELS_PRLO   0x21
 
#define ELS_TPRLO   0x24
 
#define ELS_PDISC   0x50
 
#define ELS_ADISC   0x52
 
#define ABTS_RECV_24XX   0x54 /* ABTS received (for 24xx) */
 
#define ABTS_RESP_24XX   0x55 /* ABTS responce (for 24xx) */
 
#define ABTS_PARAM_ABORT_SEQ   BIT_0
 
#define SEQ_ID_VALID   0x80
 
#define SEQ_ID_INVALID   0x00
 
#define BA_RJT_REASON_CODE_INVALID_COMMAND   0x1
 
#define BA_RJT_REASON_CODE_UNABLE_TO_PERFORM   0x9
 
#define ABTS_CONTR_FLG_TERM_EXCHG   BIT_0
 
#define ABTS_RESP_COMPL_SUCCESS   0
 
#define ABTS_RESP_COMPL_SUBCODE_ERROR   0x31
 
#define ABTS_RESP_SUBCODE_ERR_ABORTED_EXCH_NOT_TERM   0x1E
 
#define QLA_TGT_TIMEOUT   10 /* in seconds */
 
#define QLA_TGT_MAX_HW_PENDING_TIME   60 /* in seconds */
 
#define IMM_NTFY_LIP_RESET   0x000E
 
#define IMM_NTFY_LIP_LINK_REINIT   0x000F
 
#define IMM_NTFY_IOCB_OVERFLOW   0x0016
 
#define IMM_NTFY_ABORT_TASK   0x0020
 
#define IMM_NTFY_PORT_LOGOUT   0x0029
 
#define IMM_NTFY_PORT_CONFIG   0x002A
 
#define IMM_NTFY_GLBL_TPRLO   0x002D
 
#define IMM_NTFY_GLBL_LOGO   0x002E
 
#define IMM_NTFY_RESOURCE   0x0034
 
#define IMM_NTFY_MSG_RX   0x0036
 
#define IMM_NTFY_SRR   0x0045
 
#define IMM_NTFY_ELS   0x0046
 
#define IMM_NTFY_TASK_MGMT_SHIFT   8
 
#define QLA_TGT_CLEAR_ACA   0x40
 
#define QLA_TGT_TARGET_RESET   0x20
 
#define QLA_TGT_LUN_RESET   0x10
 
#define QLA_TGT_CLEAR_TS   0x04
 
#define QLA_TGT_ABORT_TS   0x02
 
#define QLA_TGT_ABORT_ALL_SESS   0xFFFF
 
#define QLA_TGT_ABORT_ALL   0xFFFE
 
#define QLA_TGT_NEXUS_LOSS_SESS   0xFFFD
 
#define QLA_TGT_NEXUS_LOSS   0xFFFC
 
#define NOTIFY_ACK_RES_COUNT   BIT_8
 
#define NOTIFY_ACK_CLEAR_LIP_RESET   BIT_5
 
#define NOTIFY_ACK_TM_RESP_CODE_VALID   BIT_4
 
#define QLA_TGT_STATE_NEW   0 /* New command + target processing */
 
#define QLA_TGT_STATE_NEED_DATA   1 /* target needs data to continue */
 
#define QLA_TGT_STATE_DATA_IN   2 /* Data arrived + target processing */
 
#define QLA_TGT_STATE_PROCESSED   3 /* target done processing */
 
#define QLA_TGT_STATE_ABORTED   4 /* Command aborted */
 
#define QLA_TGT_NULL_HANDLE   0
 
#define QLA_TGT_SKIP_HANDLE   (0xFFFFFFFF & ~CTIO_COMPLETION_HANDLE_MARK)
 
#define ATIO_SIMPLE_QUEUE   0
 
#define ATIO_HEAD_OF_QUEUE   1
 
#define ATIO_ORDERED_QUEUE   2
 
#define ATIO_ACA_QUEUE   4
 
#define ATIO_UNTAGGED   5
 
#define FC_TM_SUCCESS   0
 
#define FC_TM_BAD_FCP_DATA   1
 
#define FC_TM_BAD_CMD   2
 
#define FC_TM_FCP_DATA_MISMATCH   3
 
#define FC_TM_REJECT   4
 
#define FC_TM_FAILED   5
 
#define QLA_TGT_PRE_XMIT_RESP_CMD_ABORTED   0x1717
 
#define pci_dma_lo32(a)   (a & 0xffffffff)
 
#define pci_dma_hi32(a)   0
 
#define QLA_TGT_SENSE_VALID(sense)
 
#define QLA_TGT_SESS_WORK_ABORT   1
 
#define QLA_TGT_SESS_WORK_TM   2
 
#define QLA24XX_MGMT_SEND_NACK   1
 
#define QLA_TGT_XMIT_DATA   1
 
#define QLA_TGT_XMIT_STATUS   2
 
#define QLA_TGT_XMIT_ALL   (QLA_TGT_XMIT_STATUS|QLA_TGT_XMIT_DATA)
 
#define QLA_TGT_MODE_ENABLED()   (ql2x_ini_mode != QLA2XXX_INI_MODE_ENABLED)
 

Functions

int qla2x00_wait_for_hba_online (struct scsi_qla_host *)
 
void qlt_disable_vha (struct scsi_qla_host *)
 
int qlt_add_target (struct qla_hw_data *, struct scsi_qla_host *)
 
int qlt_remove_target (struct qla_hw_data *, struct scsi_qla_host *)
 
int qlt_lport_register (struct qla_tgt_func_tmpl *, u64, int(*callback)(struct scsi_qla_host *), void *)
 
void qlt_lport_deregister (struct scsi_qla_host *)
 
void qlt_unreg_sess (struct qla_tgt_sess *)
 
void qlt_fc_port_added (struct scsi_qla_host *, fc_port_t *)
 
void qlt_fc_port_deleted (struct scsi_qla_host *, fc_port_t *)
 
void qlt_set_mode (struct scsi_qla_host *ha)
 
void qlt_clear_mode (struct scsi_qla_host *ha)
 
int __init qlt_init (void)
 
void qlt_exit (void)
 
void qlt_update_vp_map (struct scsi_qla_host *, int)
 
void qlt_24xx_atio_pkt_all_vps (struct scsi_qla_host *, struct atio_from_isp *)
 
void qlt_response_pkt_all_vps (struct scsi_qla_host *, response_t *)
 
int qlt_rdy_to_xfer (struct qla_tgt_cmd *)
 
int qlt_xmit_response (struct qla_tgt_cmd *, int, uint8_t)
 
void qlt_xmit_tm_rsp (struct qla_tgt_mgmt_cmd *)
 
void qlt_free_mcmd (struct qla_tgt_mgmt_cmd *)
 
void qlt_free_cmd (struct qla_tgt_cmd *cmd)
 
void qlt_ctio_completion (struct scsi_qla_host *, uint32_t)
 
void qlt_async_event (uint16_t, struct scsi_qla_host *, uint16_t *)
 
void qlt_enable_vha (struct scsi_qla_host *)
 
void qlt_vport_create (struct scsi_qla_host *, struct qla_hw_data *)
 
void qlt_rff_id (struct scsi_qla_host *, struct ct_sns_req *)
 
void qlt_init_atio_q_entries (struct scsi_qla_host *)
 
void qlt_24xx_process_atio_queue (struct scsi_qla_host *)
 
void qlt_24xx_config_rings (struct scsi_qla_host *, device_reg_t __iomem *)
 
void qlt_24xx_config_nvram_stage1 (struct scsi_qla_host *, struct nvram_24xx *)
 
void qlt_24xx_config_nvram_stage2 (struct scsi_qla_host *, struct init_cb_24xx *)
 
int qlt_24xx_process_response_error (struct scsi_qla_host *, struct sts_entry_24xx *)
 
void qlt_modify_vp_config (struct scsi_qla_host *, struct vp_config_entry_24xx *)
 
void qlt_probe_one_stage1 (struct scsi_qla_host *, struct qla_hw_data *)
 
int qlt_mem_alloc (struct qla_hw_data *)
 
void qlt_mem_free (struct qla_hw_data *)
 
void qlt_stop_phase1 (struct qla_tgt *)
 
void qlt_stop_phase2 (struct qla_tgt *)
 

Variables

struct imm_ntfy_from_isp __packed
 
struct qla_tgt_data qla_target
 

Macro Definition Documentation

#define ABTS_CONTR_FLG_TERM_EXCHG   BIT_0

Definition at line 582 of file qla_target.h.

#define ABTS_PARAM_ABORT_SEQ   BIT_0

Definition at line 544 of file qla_target.h.

#define ABTS_RECV_24XX   0x54 /* ABTS received (for 24xx) */

Definition at line 518 of file qla_target.h.

#define ABTS_RESP_24XX   0x55 /* ABTS responce (for 24xx) */

Definition at line 519 of file qla_target.h.

#define ABTS_RESP_COMPL_SUBCODE_ERROR   0x31

Definition at line 611 of file qla_target.h.

#define ABTS_RESP_COMPL_SUCCESS   0

Definition at line 610 of file qla_target.h.

#define ABTS_RESP_SUBCODE_ERR_ABORTED_EXCH_NOT_TERM   0x1E

Definition at line 621 of file qla_target.h.

#define ACCEPT_TGT_IO_TYPE   0x16 /* Accept target I/O entry. */

Definition at line 248 of file qla_target.h.

#define ATIO_ACA_QUEUE   4

Definition at line 716 of file qla_target.h.

#define ATIO_CANT_PROV_CAP   0x16

Definition at line 282 of file qla_target.h.

#define ATIO_CDB_VALID   0x3D

Definition at line 283 of file qla_target.h.

#define ATIO_EXCHANGE_ADDRESS_UNKNOWN   0xFFFFFFFF

Definition at line 403 of file qla_target.h.

#define ATIO_EXEC_READ   BIT_1

Definition at line 285 of file qla_target.h.

#define ATIO_EXEC_WRITE   BIT_0

Definition at line 286 of file qla_target.h.

#define ATIO_HEAD_OF_QUEUE   1

Definition at line 714 of file qla_target.h.

#define ATIO_ORDERED_QUEUE   2

Definition at line 715 of file qla_target.h.

#define ATIO_PATH_INVALID   0x07

Definition at line 281 of file qla_target.h.

#define ATIO_PROCESSED   0xDEADDEAD /* Signature */

Definition at line 412 of file qla_target.h.

#define ATIO_SIMPLE_QUEUE   0

Definition at line 713 of file qla_target.h.

#define ATIO_TYPE7   0x06 /* Accept target I/O entry for 24xx */

Definition at line 305 of file qla_target.h.

#define ATIO_UNTAGGED   5

Definition at line 717 of file qla_target.h.

#define BA_RJT_REASON_CODE_INVALID_COMMAND   0x1

Definition at line 562 of file qla_target.h.

#define BA_RJT_REASON_CODE_UNABLE_TO_PERFORM   0x9

Definition at line 563 of file qla_target.h.

#define CONTINUE_TGT_IO_TYPE   0x17

Definition at line 252 of file qla_target.h.

#define CTIO7_FLAGS_CONFIRM_SATISF   BIT_4

Definition at line 501 of file qla_target.h.

#define CTIO7_FLAGS_CONFORM_REQ   BIT_13

Definition at line 496 of file qla_target.h.

#define CTIO7_FLAGS_DATA_IN   BIT_1

Definition at line 503 of file qla_target.h.

#define CTIO7_FLAGS_DATA_OUT   BIT_0

Definition at line 504 of file qla_target.h.

#define CTIO7_FLAGS_DONT_RET_CTIO   BIT_8

Definition at line 497 of file qla_target.h.

#define CTIO7_FLAGS_DSD_PTR   BIT_2

Definition at line 502 of file qla_target.h.

#define CTIO7_FLAGS_EXPLICIT_CONFORM   BIT_5

Definition at line 500 of file qla_target.h.

#define CTIO7_FLAGS_SEND_STATUS   BIT_15

Definition at line 494 of file qla_target.h.

#define CTIO7_FLAGS_STATUS_MODE_0   0

Definition at line 498 of file qla_target.h.

#define CTIO7_FLAGS_STATUS_MODE_1   BIT_6

Definition at line 499 of file qla_target.h.

#define CTIO7_FLAGS_TERMINATE   BIT_14

Definition at line 495 of file qla_target.h.

#define CTIO7_NHANDLE_UNRECOGNIZED   0xFFFF

Definition at line 431 of file qla_target.h.

#define CTIO_A64_TYPE   0x1F

Definition at line 290 of file qla_target.h.

#define CTIO_ABORTED   0x02

Definition at line 292 of file qla_target.h.

#define CTIO_COMPLETION_HANDLE_MARK   BIT_29

Definition at line 62 of file qla_target.h.

#define CTIO_INTERMEDIATE_HANDLE_MARK   BIT_30

Definition at line 69 of file qla_target.h.

#define CTIO_INVALID_RX_ID   0x08

Definition at line 293 of file qla_target.h.

#define CTIO_LIP_RESET   0x0E

Definition at line 295 of file qla_target.h.

#define CTIO_PORT_CONF_CHANGED   0x2A

Definition at line 299 of file qla_target.h.

#define CTIO_PORT_LOGGED_OUT   0x29

Definition at line 298 of file qla_target.h.

#define CTIO_PORT_UNAVAILABLE   0x28

Definition at line 297 of file qla_target.h.

#define CTIO_RET_TYPE   0x17 /* CTIO return entry */

Definition at line 304 of file qla_target.h.

#define CTIO_SRR_RECEIVED   0x45

Definition at line 300 of file qla_target.h.

#define CTIO_SUCCESS   0x01

Definition at line 291 of file qla_target.h.

#define CTIO_TARGET_RESET   0x17

Definition at line 296 of file qla_target.h.

#define CTIO_TIMEOUT   0x0B

Definition at line 294 of file qla_target.h.

#define CTIO_TYPE7   0x12 /* Continue target I/O entry (for 24xx) */

Definition at line 417 of file qla_target.h.

#define ELS_ADISC   0x52

Definition at line 513 of file qla_target.h.

#define ELS_FLOGI   0x4

Definition at line 507 of file qla_target.h.

#define ELS_LOGO   0x5

Definition at line 508 of file qla_target.h.

#define ELS_PDISC   0x50

Definition at line 512 of file qla_target.h.

#define ELS_PLOGI   0x3

Definition at line 506 of file qla_target.h.

#define ELS_PRLI   0x20

Definition at line 509 of file qla_target.h.

#define ELS_PRLO   0x21

Definition at line 510 of file qla_target.h.

#define ELS_TPRLO   0x24

Definition at line 511 of file qla_target.h.

#define F_CTL_END_SEQ   BIT_19

Definition at line 340 of file qla_target.h.

#define F_CTL_EXCH_CONTEXT_RESP   BIT_23

Definition at line 337 of file qla_target.h.

#define F_CTL_LAST_SEQ   BIT_20

Definition at line 339 of file qla_target.h.

#define F_CTL_SEQ_CONTEXT_RESIP   BIT_22

Definition at line 338 of file qla_target.h.

#define F_CTL_SEQ_INITIATIVE   BIT_16

Definition at line 341 of file qla_target.h.

#define FC_TM_BAD_CMD   2

Definition at line 722 of file qla_target.h.

#define FC_TM_BAD_FCP_DATA   1

Definition at line 721 of file qla_target.h.

#define FC_TM_FAILED   5

Definition at line 725 of file qla_target.h.

#define FC_TM_FCP_DATA_MISMATCH   3

Definition at line 723 of file qla_target.h.

#define FC_TM_REJECT   4

Definition at line 724 of file qla_target.h.

#define FC_TM_SUCCESS   0

Definition at line 720 of file qla_target.h.

#define FCP_CMND_TASK_MGMT_ABORT_TASK_SET   1

Definition at line 357 of file qla_target.h.

#define FCP_CMND_TASK_MGMT_CLEAR_ACA   6

Definition at line 353 of file qla_target.h.

#define FCP_CMND_TASK_MGMT_CLEAR_TASK_SET   2

Definition at line 356 of file qla_target.h.

#define FCP_CMND_TASK_MGMT_LU_RESET   4

Definition at line 355 of file qla_target.h.

#define FCP_CMND_TASK_MGMT_TARGET_RESET   5

Definition at line 354 of file qla_target.h.

#define GET_TARGET_ID (   ha,
  iocb 
)
Value:
? le16_to_cpu((iocb)->u.isp2x.target.extended) \
: (uint16_t)(iocb)->u.isp2x.target.id.standard)

Definition at line 116 of file qla_target.h.

#define HANDLE_IS_CTIO_COMP (   h)    (h & CTIO_COMPLETION_HANDLE_MARK)

Definition at line 66 of file qla_target.h.

#define IMM_NTFY_ABORT_TASK   0x0020

Definition at line 673 of file qla_target.h.

#define IMM_NTFY_ELS   0x0046

Definition at line 681 of file qla_target.h.

#define IMM_NTFY_GLBL_LOGO   0x002E

Definition at line 677 of file qla_target.h.

#define IMM_NTFY_GLBL_TPRLO   0x002D

Definition at line 676 of file qla_target.h.

#define IMM_NTFY_IOCB_OVERFLOW   0x0016

Definition at line 672 of file qla_target.h.

#define IMM_NTFY_LIP_LINK_REINIT   0x000F

Definition at line 671 of file qla_target.h.

#define IMM_NTFY_LIP_RESET   0x000E

Definition at line 670 of file qla_target.h.

#define IMM_NTFY_MSG_RX   0x0036

Definition at line 679 of file qla_target.h.

#define IMM_NTFY_PORT_CONFIG   0x002A

Definition at line 675 of file qla_target.h.

#define IMM_NTFY_PORT_LOGOUT   0x0029

Definition at line 674 of file qla_target.h.

#define IMM_NTFY_RESOURCE   0x0034

Definition at line 678 of file qla_target.h.

#define IMM_NTFY_SRR   0x0045

Definition at line 680 of file qla_target.h.

#define IMM_NTFY_TASK_MGMT_SHIFT   8

Definition at line 684 of file qla_target.h.

#define IMMED_NOTIFY_TYPE   0x0D /* Immediate notify entry. */

Definition at line 121 of file qla_target.h.

#define NOTIFY24XX_FLAGS_GLOBAL_TPRLO   BIT_1

Definition at line 159 of file qla_target.h.

#define NOTIFY24XX_FLAGS_PUREX_IOCB   BIT_0

Definition at line 160 of file qla_target.h.

#define NOTIFY_ACK_CLEAR_LIP_RESET   BIT_5

Definition at line 698 of file qla_target.h.

#define NOTIFY_ACK_RES_COUNT   BIT_8

Definition at line 697 of file qla_target.h.

#define NOTIFY_ACK_SRR_FLAGS_ACCEPT   0

Definition at line 236 of file qla_target.h.

#define NOTIFY_ACK_SRR_FLAGS_REJECT   1

Definition at line 237 of file qla_target.h.

#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_NO_EXPL   0

Definition at line 241 of file qla_target.h.

#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_UNABLE_TO_SUPPLY_DATA   0x2a

Definition at line 242 of file qla_target.h.

#define NOTIFY_ACK_SRR_REJECT_REASON_UNABLE_TO_PERFORM   0x9

Definition at line 239 of file qla_target.h.

#define NOTIFY_ACK_SUCCESS   0x01

Definition at line 244 of file qla_target.h.

#define NOTIFY_ACK_TM_RESP_CODE_VALID   BIT_4

Definition at line 699 of file qla_target.h.

#define NOTIFY_ACK_TYPE   0x0E /* Notify acknowledge entry. */

Definition at line 182 of file qla_target.h.

#define OF_CONF_REQ   BIT_13 /* Confirmation Requested */

Definition at line 88 of file qla_target.h.

#define OF_DATA_IN   BIT_6 /* Data in to initiator */

Definition at line 81 of file qla_target.h.

#define OF_DATA_OUT   BIT_7 /* Data out from initiator */

Definition at line 83 of file qla_target.h.

#define OF_EXPL_CONF   BIT_5 /* Explicit Confirmation Requested */

Definition at line 80 of file qla_target.h.

#define OF_FAST_POST   BIT_9 /* Enable mailbox fast posting. */

Definition at line 87 of file qla_target.h.

#define OF_INC_RC   BIT_8 /* Increment command resource count */

Definition at line 86 of file qla_target.h.

#define OF_NO_DATA   (BIT_7 | BIT_6)

Definition at line 85 of file qla_target.h.

#define OF_SS_MODE_0   0

Definition at line 75 of file qla_target.h.

#define OF_SS_MODE_1   1

Definition at line 76 of file qla_target.h.

#define OF_SS_MODE_2   2

Definition at line 77 of file qla_target.h.

#define OF_SS_MODE_3   3

Definition at line 78 of file qla_target.h.

#define OF_SSTS   BIT_15 /* Send SCSI status */

Definition at line 90 of file qla_target.h.

#define OF_TERM_EXCH   BIT_14 /* Terminate exchange */

Definition at line 89 of file qla_target.h.

#define pci_dma_hi32 (   a)    0

Definition at line 739 of file qla_target.h.

#define pci_dma_lo32 (   a)    (a & 0xffffffff)

Definition at line 738 of file qla_target.h.

#define QLA24XX_MGMT_SEND_NACK   1

Definition at line 883 of file qla_target.h.

#define QLA2XXX_COMMAND_COUNT_INIT   250

Definition at line 53 of file qla_target.h.

#define QLA2XXX_IMMED_NOTIFY_COUNT_INIT   250

Definition at line 54 of file qla_target.h.

#define QLA2XXX_INI_MODE_DISABLED   1

Definition at line 50 of file qla_target.h.

#define QLA2XXX_INI_MODE_ENABLED   2

Definition at line 51 of file qla_target.h.

#define QLA2XXX_INI_MODE_EXCLUSIVE   0

Definition at line 49 of file qla_target.h.

#define QLA2XXX_INI_MODE_STR_DISABLED   "disabled"

Definition at line 46 of file qla_target.h.

#define QLA2XXX_INI_MODE_STR_ENABLED   "enabled"

Definition at line 47 of file qla_target.h.

#define QLA2XXX_INI_MODE_STR_EXCLUSIVE   "exclusive"

Definition at line 45 of file qla_target.h.

#define QLA2XXX_INITIATOR_MAGIC   57222

Definition at line 43 of file qla_target.h.

#define QLA2XXX_TARGET_MAGIC   269

Definition at line 37 of file qla_target.h.

#define QLA_TGT_ABORT_ALL   0xFFFE

Definition at line 692 of file qla_target.h.

#define QLA_TGT_ABORT_ALL_SESS   0xFFFF

Definition at line 691 of file qla_target.h.

#define QLA_TGT_ABORT_TS   0x02

Definition at line 690 of file qla_target.h.

#define QLA_TGT_CLEAR_ACA   0x40

Definition at line 686 of file qla_target.h.

#define QLA_TGT_CLEAR_TS   0x04

Definition at line 689 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CMD32   3

Definition at line 94 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CMD64   2

Definition at line 100 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CMD_24XX   1

Definition at line 108 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CONT32   7

Definition at line 95 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CONT64   5

Definition at line 101 of file qla_target.h.

#define QLA_TGT_DATASEGS_PER_CONT_24XX   5

Definition at line 109 of file qla_target.h.

#define QLA_TGT_LUN_RESET   0x10

Definition at line 688 of file qla_target.h.

#define QLA_TGT_MAX_HW_PENDING_TIME   60 /* in seconds */

Definition at line 667 of file qla_target.h.

#define QLA_TGT_MAX_SG32 (   ql)
Value:
(((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD32 + \
QLA_TGT_DATASEGS_PER_CONT32*((ql) - 1)) : 0)

Definition at line 96 of file qla_target.h.

#define QLA_TGT_MAX_SG64 (   ql)
Value:
(((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD64 + \
QLA_TGT_DATASEGS_PER_CONT64*((ql) - 1)) : 0)

Definition at line 102 of file qla_target.h.

#define QLA_TGT_MAX_SG_24XX (   ql)
Value:
(min(1270, ((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD_24XX + \

Definition at line 110 of file qla_target.h.

#define QLA_TGT_MODE_ENABLED ( )    (ql2x_ini_mode != QLA2XXX_INI_MODE_ENABLED)

Definition at line 950 of file qla_target.h.

#define QLA_TGT_NEXUS_LOSS   0xFFFC

Definition at line 694 of file qla_target.h.

#define QLA_TGT_NEXUS_LOSS_SESS   0xFFFD

Definition at line 693 of file qla_target.h.

#define QLA_TGT_NULL_HANDLE   0

Definition at line 709 of file qla_target.h.

#define QLA_TGT_PRE_XMIT_RESP_CMD_ABORTED   0x1717

Definition at line 732 of file qla_target.h.

#define QLA_TGT_SENSE_VALID (   sense)
Value:
((sense != NULL) && \
(((const uint8_t *)(sense))[0] & 0x70) == 0x70)

Definition at line 742 of file qla_target.h.

#define QLA_TGT_SESS_WORK_ABORT   1

Definition at line 865 of file qla_target.h.

#define QLA_TGT_SESS_WORK_TM   2

Definition at line 866 of file qla_target.h.

#define QLA_TGT_SKIP_HANDLE   (0xFFFFFFFF & ~CTIO_COMPLETION_HANDLE_MARK)

Definition at line 710 of file qla_target.h.

#define QLA_TGT_STATE_ABORTED   4 /* Command aborted */

Definition at line 706 of file qla_target.h.

#define QLA_TGT_STATE_DATA_IN   2 /* Data arrived + target processing */

Definition at line 704 of file qla_target.h.

#define QLA_TGT_STATE_NEED_DATA   1 /* target needs data to continue */

Definition at line 703 of file qla_target.h.

#define QLA_TGT_STATE_NEW   0 /* New command + target processing */

Definition at line 702 of file qla_target.h.

#define QLA_TGT_STATE_PROCESSED   3 /* target done processing */

Definition at line 705 of file qla_target.h.

#define QLA_TGT_TARGET_RESET   0x20

Definition at line 687 of file qla_target.h.

#define QLA_TGT_TIMEOUT   10 /* in seconds */

Definition at line 665 of file qla_target.h.

#define QLA_TGT_XMIT_ALL   (QLA_TGT_XMIT_STATUS|QLA_TGT_XMIT_DATA)

Definition at line 920 of file qla_target.h.

#define QLA_TGT_XMIT_DATA   1

Definition at line 918 of file qla_target.h.

#define QLA_TGT_XMIT_STATUS   2

Definition at line 919 of file qla_target.h.

#define R_CTL_B_ACC   0x4

Definition at line 344 of file qla_target.h.

#define R_CTL_B_RJT   0x5

Definition at line 345 of file qla_target.h.

#define R_CTL_BASIC_LINK_SERV   0x80

Definition at line 343 of file qla_target.h.

#define SEQ_ID_INVALID   0x00

Definition at line 551 of file qla_target.h.

#define SEQ_ID_VALID   0x80

Definition at line 550 of file qla_target.h.

#define SRR_IU_DATA_IN   0x1

Definition at line 148 of file qla_target.h.

#define SRR_IU_DATA_OUT   0x5

Definition at line 149 of file qla_target.h.

#define SRR_IU_STATUS   0x7

Definition at line 150 of file qla_target.h.

Function Documentation

int qla2x00_wait_for_hba_online ( struct scsi_qla_host )

Definition at line 799 of file qla_os.c.

void qlt_24xx_atio_pkt_all_vps ( struct scsi_qla_host ,
struct atio_from_isp  
)

Definition at line 182 of file qla_target.c.

void qlt_24xx_config_nvram_stage1 ( struct scsi_qla_host ,
struct nvram_24xx  
)

Definition at line 4702 of file qla_target.c.

void qlt_24xx_config_nvram_stage2 ( struct scsi_qla_host ,
struct init_cb_24xx  
)

Definition at line 4769 of file qla_target.c.

void qlt_24xx_config_rings ( struct scsi_qla_host ,
device_reg_t __iomem  
)

Definition at line 4682 of file qla_target.c.

void qlt_24xx_process_atio_queue ( struct scsi_qla_host )

Definition at line 4647 of file qla_target.c.

int qlt_24xx_process_response_error ( struct scsi_qla_host ,
struct sts_entry_24xx  
)

Definition at line 4781 of file qla_target.c.

int qlt_add_target ( struct qla_hw_data ,
struct scsi_qla_host  
)

Definition at line 4282 of file qla_target.c.

void qlt_async_event ( uint16_t  ,
struct scsi_qla_host ,
uint16_t  
)

Definition at line 3945 of file qla_target.c.

void qlt_clear_mode ( struct scsi_qla_host ha)

Definition at line 4493 of file qla_target.c.

void qlt_ctio_completion ( struct scsi_qla_host ,
uint32_t   
)

Definition at line 2570 of file qla_target.c.

void qlt_disable_vha ( struct scsi_qla_host )

Definition at line 4552 of file qla_target.c.

void qlt_enable_vha ( struct scsi_qla_host )

Definition at line 4521 of file qla_target.c.

void qlt_exit ( void  )

Definition at line 4951 of file qla_target.c.

void qlt_fc_port_added ( struct scsi_qla_host ,
fc_port_t  
)

Definition at line 825 of file qla_target.c.

void qlt_fc_port_deleted ( struct scsi_qla_host ,
fc_port_t  
)

Definition at line 892 of file qla_target.c.

void qlt_free_cmd ( struct qla_tgt_cmd cmd)

Definition at line 2278 of file qla_target.c.

void qlt_free_mcmd ( struct qla_tgt_mgmt_cmd )

Definition at line 1408 of file qla_target.c.

int __init qlt_init ( void  )

Definition at line 4889 of file qla_target.c.

void qlt_init_atio_q_entries ( struct scsi_qla_host )

Definition at line 4626 of file qla_target.c.

void qlt_lport_deregister ( struct scsi_qla_host vha)

qla_tgt_lport_deregister - Degister lport

: Registered scsi_qla_host pointer

Definition at line 4455 of file qla_target.c.

int qlt_lport_register ( struct qla_tgt_func_tmpl qla_tgt_ops,
u64  wwpn,
int(*)(struct scsi_qla_host *)  callback,
void target_lport_ptr 
)

qla_tgt_lport_register - register lport with external module

: Pointer for tcm_qla2xxx qla_tgt_ops : Passwd FC target WWPN : lport initialization callback for tcm_qla2xxx code : pointer for tcm_qla2xxx specific lport data

Definition at line 4384 of file qla_target.c.

int qlt_mem_alloc ( struct qla_hw_data )

Definition at line 4818 of file qla_target.c.

void qlt_mem_free ( struct qla_hw_data )

Definition at line 4839 of file qla_target.c.

void qlt_modify_vp_config ( struct scsi_qla_host ,
struct vp_config_entry_24xx  
)

Definition at line 4796 of file qla_target.c.

void qlt_probe_one_stage1 ( struct scsi_qla_host ,
struct qla_hw_data  
)

Definition at line 4807 of file qla_target.c.

int qlt_rdy_to_xfer ( struct qla_tgt_cmd )

Definition at line 2136 of file qla_target.c.

int qlt_remove_target ( struct qla_hw_data ,
struct scsi_qla_host  
)

Definition at line 4339 of file qla_target.c.

void qlt_response_pkt_all_vps ( struct scsi_qla_host ,
response_t  
)

Definition at line 236 of file qla_target.c.

void qlt_rff_id ( struct scsi_qla_host ,
struct ct_sns_req  
)

Definition at line 4601 of file qla_target.c.

void qlt_set_mode ( struct scsi_qla_host ha)

Definition at line 4472 of file qla_target.c.

void qlt_stop_phase1 ( struct qla_tgt )

Definition at line 943 of file qla_target.c.

void qlt_stop_phase2 ( struct qla_tgt )

Definition at line 998 of file qla_target.c.

void qlt_unreg_sess ( struct qla_tgt_sess )

Definition at line 365 of file qla_target.c.

void qlt_update_vp_map ( struct scsi_qla_host ,
int   
)

Definition at line 4854 of file qla_target.c.

void qlt_vport_create ( struct scsi_qla_host ,
struct qla_hw_data  
)

Definition at line 4581 of file qla_target.c.

int qlt_xmit_response ( struct qla_tgt_cmd ,
int  ,
uint8_t   
)

Definition at line 2021 of file qla_target.c.

void qlt_xmit_tm_rsp ( struct qla_tgt_mgmt_cmd )

Definition at line 1415 of file qla_target.c.

Variable Documentation

struct qla_tgt_data qla_target