Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
qla_target.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <target/target_core_base.h>
#include <target/target_core_fabric.h>
#include "qla_def.h"
#include "qla_target.h"

Go to the source code of this file.

Macros

#define FCP_PTA_SIMPLE   0 /* simple task attribute */
 
#define FCP_PTA_HEADQ   1 /* head of queue task attribute */
 
#define FCP_PTA_ORDERED   2 /* ordered task attribute */
 
#define FCP_PTA_ACA   4 /* auto. contigent allegiance */
 
#define FCP_PTA_MASK   7 /* mask for task attribute field */
 
#define FCP_PRI_SHIFT   3 /* priority field starts in bit 3 */
 
#define FCP_PRI_RESVD_MASK   0x80 /* reserved bits in priority field */
 

Enumerations

enum  fcp_resp_rsp_codes {
  FCP_TMF_CMPL = 0, FCP_DATA_LEN_INVALID = 1, FCP_CMND_FIELDS_INVALID = 2, FCP_DATA_PARAM_MISMATCH = 3,
  FCP_TMF_REJECTED = 4, FCP_TMF_FAILED = 5, FCP_TMF_INVALID_LUN = 9, FCP_TMF_CMPL = 0,
  FCP_DATA_LEN_INVALID = 1, FCP_CMND_FIELDS_INVALID = 2, FCP_DATA_PARAM_MISMATCH = 3, FCP_TMF_REJECTED = 4,
  FCP_TMF_FAILED = 5, FCP_TMF_INVALID_LUN = 9
}
 

Functions

 module_param (qlini_mode, charp, S_IRUGO)
 
 MODULE_PARM_DESC (qlini_mode,"Determines when initiator mode will be enabled. Possible values: ""\"exclusive\" - initiator mode will be enabled on load, ""disabled on enabling target mode and then on disabling target mode ""enabled back; ""\"disabled\" - initiator mode will never be enabled; ""\"enabled\" (default) - initiator mode will always stay enabled.")
 
void qlt_24xx_atio_pkt_all_vps (struct scsi_qla_host *vha, struct atio_from_isp *atio)
 
void qlt_response_pkt_all_vps (struct scsi_qla_host *vha, response_t *pkt)
 
void qlt_unreg_sess (struct qla_tgt_sess *sess)
 
 EXPORT_SYMBOL (qlt_unreg_sess)
 
void qlt_fc_port_added (struct scsi_qla_host *vha, fc_port_t *fcport)
 
void qlt_fc_port_deleted (struct scsi_qla_host *vha, fc_port_t *fcport)
 
void qlt_stop_phase1 (struct qla_tgt *tgt)
 
 EXPORT_SYMBOL (qlt_stop_phase1)
 
void qlt_stop_phase2 (struct qla_tgt *tgt)
 
 EXPORT_SYMBOL (qlt_stop_phase2)
 
void qlt_release (struct qla_tgt *tgt)
 
void qlt_free_mcmd (struct qla_tgt_mgmt_cmd *mcmd)
 
 EXPORT_SYMBOL (qlt_free_mcmd)
 
void qlt_xmit_tm_rsp (struct qla_tgt_mgmt_cmd *mcmd)
 
 EXPORT_SYMBOL (qlt_xmit_tm_rsp)
 
int qlt_xmit_response (struct qla_tgt_cmd *cmd, int xmit_type, uint8_t scsi_status)
 
 EXPORT_SYMBOL (qlt_xmit_response)
 
int qlt_rdy_to_xfer (struct qla_tgt_cmd *cmd)
 
 EXPORT_SYMBOL (qlt_rdy_to_xfer)
 
void qlt_free_cmd (struct qla_tgt_cmd *cmd)
 
 EXPORT_SYMBOL (qlt_free_cmd)
 
void qlt_ctio_completion (struct scsi_qla_host *vha, uint32_t handle)
 
void qlt_async_event (uint16_t code, struct scsi_qla_host *vha, uint16_t *mailbox)
 
int qlt_add_target (struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
 
int qlt_remove_target (struct qla_hw_data *ha, struct scsi_qla_host *vha)
 
int qlt_lport_register (struct qla_tgt_func_tmpl *qla_tgt_ops, u64 wwpn, int(*callback)(struct scsi_qla_host *), void *target_lport_ptr)
 
 EXPORT_SYMBOL (qlt_lport_register)
 
void qlt_lport_deregister (struct scsi_qla_host *vha)
 
 EXPORT_SYMBOL (qlt_lport_deregister)
 
void qlt_set_mode (struct scsi_qla_host *vha)
 
void qlt_clear_mode (struct scsi_qla_host *vha)
 
void qlt_enable_vha (struct scsi_qla_host *vha)
 
 EXPORT_SYMBOL (qlt_enable_vha)
 
void qlt_disable_vha (struct scsi_qla_host *vha)
 
void qlt_vport_create (struct scsi_qla_host *vha, struct qla_hw_data *ha)
 
void qlt_rff_id (struct scsi_qla_host *vha, struct ct_sns_req *ct_req)
 
void qlt_init_atio_q_entries (struct scsi_qla_host *vha)
 
void qlt_24xx_process_atio_queue (struct scsi_qla_host *vha)
 
void qlt_24xx_config_rings (struct scsi_qla_host *vha, device_reg_t __iomem *reg)
 
void qlt_24xx_config_nvram_stage1 (struct scsi_qla_host *vha, struct nvram_24xx *nv)
 
void qlt_24xx_config_nvram_stage2 (struct scsi_qla_host *vha, struct init_cb_24xx *icb)
 
int qlt_24xx_process_response_error (struct scsi_qla_host *vha, struct sts_entry_24xx *pkt)
 
void qlt_modify_vp_config (struct scsi_qla_host *vha, struct vp_config_entry_24xx *vpmod)
 
void qlt_probe_one_stage1 (struct scsi_qla_host *base_vha, struct qla_hw_data *ha)
 
int qlt_mem_alloc (struct qla_hw_data *ha)
 
void qlt_mem_free (struct qla_hw_data *ha)
 
void qlt_update_vp_map (struct scsi_qla_host *vha, int cmd)
 
int __init qlt_init (void)
 
void qlt_exit (void)
 

Macro Definition Documentation

#define FCP_PRI_RESVD_MASK   0x80 /* reserved bits in priority field */

Definition at line 79 of file qla_target.c.

#define FCP_PRI_SHIFT   3 /* priority field starts in bit 3 */

Definition at line 78 of file qla_target.c.

#define FCP_PTA_ACA   4 /* auto. contigent allegiance */

Definition at line 76 of file qla_target.c.

#define FCP_PTA_HEADQ   1 /* head of queue task attribute */

Definition at line 74 of file qla_target.c.

#define FCP_PTA_MASK   7 /* mask for task attribute field */

Definition at line 77 of file qla_target.c.

#define FCP_PTA_ORDERED   2 /* ordered task attribute */

Definition at line 75 of file qla_target.c.

#define FCP_PTA_SIMPLE   0 /* simple task attribute */

Definition at line 73 of file qla_target.c.

Enumeration Type Documentation

Enumerator:
FCP_TMF_CMPL 
FCP_DATA_LEN_INVALID 
FCP_CMND_FIELDS_INVALID 
FCP_DATA_PARAM_MISMATCH 
FCP_TMF_REJECTED 
FCP_TMF_FAILED 
FCP_TMF_INVALID_LUN 
FCP_TMF_CMPL 
FCP_DATA_LEN_INVALID 
FCP_CMND_FIELDS_INVALID 
FCP_DATA_PARAM_MISMATCH 
FCP_TMF_REJECTED 
FCP_TMF_FAILED 
FCP_TMF_INVALID_LUN 

Definition at line 60 of file qla_target.c.

Function Documentation

EXPORT_SYMBOL ( qlt_unreg_sess  )
EXPORT_SYMBOL ( qlt_stop_phase1  )
EXPORT_SYMBOL ( qlt_stop_phase2  )
EXPORT_SYMBOL ( qlt_free_mcmd  )
EXPORT_SYMBOL ( qlt_xmit_tm_rsp  )
EXPORT_SYMBOL ( qlt_xmit_response  )
EXPORT_SYMBOL ( qlt_rdy_to_xfer  )
EXPORT_SYMBOL ( qlt_free_cmd  )
EXPORT_SYMBOL ( qlt_lport_register  )
EXPORT_SYMBOL ( qlt_lport_deregister  )
EXPORT_SYMBOL ( qlt_enable_vha  )
module_param ( qlini_mode  ,
charp  ,
S_IRUGO   
)
MODULE_PARM_DESC ( qlini_mode  ,
"Determines when initiator mode will be enabled. Possible values: ""\"exclusive\" - initiator mode will be enabled on  load,
""disabled on enabling target mode and then on disabling target mode""enabled back;""\"disabled\" - initiator mode will never be enabled; ""\"enabled\" (default) - initiator mode will always stay enabled."   
)
void qlt_24xx_atio_pkt_all_vps ( struct scsi_qla_host vha,
struct atio_from_isp atio 
)

Definition at line 182 of file qla_target.c.

void qlt_24xx_config_nvram_stage1 ( struct scsi_qla_host vha,
struct nvram_24xx nv 
)

Definition at line 4702 of file qla_target.c.

void qlt_24xx_config_nvram_stage2 ( struct scsi_qla_host vha,
struct init_cb_24xx icb 
)

Definition at line 4769 of file qla_target.c.

void qlt_24xx_config_rings ( struct scsi_qla_host vha,
device_reg_t __iomem reg 
)

Definition at line 4682 of file qla_target.c.

void qlt_24xx_process_atio_queue ( struct scsi_qla_host vha)

Definition at line 4647 of file qla_target.c.

int qlt_24xx_process_response_error ( struct scsi_qla_host vha,
struct sts_entry_24xx pkt 
)

Definition at line 4781 of file qla_target.c.

int qlt_add_target ( struct qla_hw_data ha,
struct scsi_qla_host base_vha 
)

Definition at line 4282 of file qla_target.c.

void qlt_async_event ( uint16_t  code,
struct scsi_qla_host vha,
uint16_t mailbox 
)

Definition at line 3945 of file qla_target.c.

void qlt_clear_mode ( struct scsi_qla_host vha)

Definition at line 4493 of file qla_target.c.

void qlt_ctio_completion ( struct scsi_qla_host vha,
uint32_t  handle 
)

Definition at line 2570 of file qla_target.c.

void qlt_disable_vha ( struct scsi_qla_host vha)

Definition at line 4552 of file qla_target.c.

void qlt_enable_vha ( struct scsi_qla_host vha)

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 vha,
fc_port_t fcport 
)

Definition at line 825 of file qla_target.c.

void qlt_fc_port_deleted ( struct scsi_qla_host vha,
fc_port_t fcport 
)

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 mcmd)

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 vha)

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 ha)

Definition at line 4818 of file qla_target.c.

void qlt_mem_free ( struct qla_hw_data ha)

Definition at line 4839 of file qla_target.c.

void qlt_modify_vp_config ( struct scsi_qla_host vha,
struct vp_config_entry_24xx vpmod 
)

Definition at line 4796 of file qla_target.c.

void qlt_probe_one_stage1 ( struct scsi_qla_host base_vha,
struct qla_hw_data ha 
)

Definition at line 4807 of file qla_target.c.

int qlt_rdy_to_xfer ( struct qla_tgt_cmd cmd)

Definition at line 2136 of file qla_target.c.

void qlt_release ( struct qla_tgt tgt)

Definition at line 1032 of file qla_target.c.

int qlt_remove_target ( struct qla_hw_data ha,
struct scsi_qla_host vha 
)

Definition at line 4339 of file qla_target.c.

void qlt_response_pkt_all_vps ( struct scsi_qla_host vha,
response_t pkt 
)

Definition at line 236 of file qla_target.c.

void qlt_rff_id ( struct scsi_qla_host vha,
struct ct_sns_req ct_req 
)

Definition at line 4601 of file qla_target.c.

void qlt_set_mode ( struct scsi_qla_host vha)

Definition at line 4472 of file qla_target.c.

void qlt_stop_phase1 ( struct qla_tgt tgt)

Definition at line 943 of file qla_target.c.

void qlt_stop_phase2 ( struct qla_tgt tgt)

Definition at line 998 of file qla_target.c.

void qlt_unreg_sess ( struct qla_tgt_sess sess)

Definition at line 365 of file qla_target.c.

void qlt_update_vp_map ( struct scsi_qla_host vha,
int  cmd 
)

Definition at line 4854 of file qla_target.c.

void qlt_vport_create ( struct scsi_qla_host vha,
struct qla_hw_data ha 
)

Definition at line 4581 of file qla_target.c.

int qlt_xmit_response ( struct qla_tgt_cmd cmd,
int  xmit_type,
uint8_t  scsi_status 
)

Definition at line 2021 of file qla_target.c.

void qlt_xmit_tm_rsp ( struct qla_tgt_mgmt_cmd mcmd)

Definition at line 1415 of file qla_target.c.