Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/kthread.h>
#include <linux/crc32.h>
#include <linux/cpu.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/io.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_tcq.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
#include <scsi/fc_encode.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/fc/fc_fip.h>
#include <scsi/fc/fc_fc2.h>
#include <scsi/fc_frame.h>
#include <scsi/fc/fc_fcoe.h>
#include <scsi/fc/fc_fcp.h>
#include "57xx_hsi_bnx2fc.h"
#include "../../net/ethernet/broadcom/cnic_if.h"
#include "../../net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h"
#include "bnx2fc_constants.h"
#include "bnx2fc_debug.h"
Go to the source code of this file.
Data Structures | |
struct | bnx2fc_percpu_s |
struct | bnx2fc_hba |
struct | bnx2fc_interface |
struct | bnx2fc_lport |
struct | bnx2fc_cmd_mgr |
struct | bnx2fc_rport |
struct | bnx2fc_mp_req |
struct | bnx2fc_els_cb_arg |
struct | bnx2fc_cmd |
struct | io_bdt |
struct | bnx2fc_work |
struct | bnx2fc_unsol_els |
Variables | |
struct fcoe_percpu_s | bnx2fc_global |
struct workqueue_struct * | bnx2fc_wq |
#define BNX2FC_CAN_QUEUE BNX2FC_MAX_OUTSTANDING_CMNDS |
#define BNX2FC_CONFQ_WQE_SIZE (sizeof(struct fcoe_confqe)) |
#define BNX2FC_CQ_WQES_MAX (BNX2FC_SQ_WQES_MAX + BNX2FC_RQ_WQES_MAX) |
#define BNX2FC_ELS_MAX_SQES (BNX2FC_TM_MAX_SQES - 1) |
#define BNX2FC_ELSTM_XIDS BNX2FC_CAN_QUEUE |
#define bnx2fc_from_ctlr | ( | x | ) | ((struct bnx2fc_interface *)((x) + 1)) |
#define BNX2FC_MAX_TASKS (BNX2FC_MAX_OUTSTANDING_CMNDS + BNX2FC_ELSTM_XIDS) |
#define BNX2FC_MAX_XID (BNX2FC_MAX_OUTSTANDING_CMNDS + BNX2FC_ELSTM_XIDS - 1) |
#define BNX2FC_MFS (BNX2FC_MAX_PAYLOAD + sizeof(struct fc_frame_header)) |
#define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS)) |
#define BNX2FC_RQ_BUF_LOG_SZ (ilog2(BNX2FC_RQ_BUF_SZ)) |
#define BNX2FC_RQ_WQE_SIZE (BNX2FC_RQ_BUF_SZ) |
#define BNX2FC_SCSI_MAX_SQES ((3 * BNX2FC_SQ_WQES_MAX) / 8) |
#define BNX2FC_TASK_CTX_ARR_SZ (BNX2FC_MAX_TASKS/BNX2FC_TASKS_PER_PAGE) |
#define BNX2FC_TASKS_PER_PAGE (PAGE_SIZE/BNX2FC_TASK_SIZE) |
#define BNX2FC_TM_MAX_SQES ((BNX2FC_SQ_WQES_MAX) / 2) |
#define BNX2FC_XFERQ_WQE_SIZE (sizeof(struct fcoe_xfrqe)) |
#define CMD_SCSI_STATUS | ( | Cmnd | ) | ((Cmnd)->SCp.Status) |
#define FCOE_MAX_XID (FCOE_MIN_XID + FCOE_MAX_NUM_XIDS - 1) |
#define FCOE_MIN_XID (BNX2FC_MAX_XID + 1) |
#define FCOE_XIDS_PER_CPU (FCOE_MIN_XID + (512 * nr_cpu_ids) - 1) |
void bnx2fc_add_2_sq | ( | struct bnx2fc_rport * | tgt, |
u16 | xid | ||
) |
Definition at line 1395 of file bnx2fc_hwi.c.
void bnx2fc_arm_cq | ( | struct bnx2fc_rport * | tgt | ) |
Definition at line 982 of file bnx2fc_hwi.c.
void bnx2fc_build_fcp_cmnd | ( | struct bnx2fc_cmd * | io_req, |
struct fcp_cmnd * | fcp_cmnd | ||
) |
Definition at line 1698 of file bnx2fc_io.c.
|
read |
Definition at line 492 of file bnx2fc_io.c.
|
read |
Definition at line 242 of file bnx2fc_io.c.
void bnx2fc_cmd_mgr_free | ( | struct bnx2fc_cmd_mgr * | cmgr | ) |
Definition at line 364 of file bnx2fc_io.c.
Definition at line 547 of file bnx2fc_io.c.
void bnx2fc_cmd_timer_set | ( | struct bnx2fc_cmd * | io_req, |
unsigned int | timer_msec | ||
) |
Definition at line 27 of file bnx2fc_io.c.
bnx2fc_eh_abort - eh_abort_handler api to abort an outstanding SCSI command
: SCSI_ML command pointer
SCSI abort request handler
Definition at line 1155 of file bnx2fc_io.c.
bnx2fc_eh_device_reset - Reset a single LUN
: SCSI command
Set from SCSI host template to send task mgmt command to the target and wait for the response
Definition at line 1100 of file bnx2fc_io.c.
bnx2fc_eh_target_reset: Reset a target
: SCSI command
Set from SCSI host template to send task mgmt command to the target and wait for the response
Definition at line 1087 of file bnx2fc_io.c.
|
read |
Definition at line 894 of file bnx2fc_els.c.
|
read |
Definition at line 422 of file bnx2fc_io.c.
void bnx2fc_flush_active_ios | ( | struct bnx2fc_rport * | tgt | ) |
Definition at line 150 of file bnx2fc_tgt.c.
void bnx2fc_free_fw_resc | ( | struct bnx2fc_hba * | hba | ) |
Definition at line 2162 of file bnx2fc_hwi.c.
void bnx2fc_free_task_ctx | ( | struct bnx2fc_hba * | hba | ) |
Definition at line 1947 of file bnx2fc_hwi.c.
void bnx2fc_get_link_state | ( | struct bnx2fc_hba * | hba | ) |
bnx2fc_get_link_state - get network link state
: adapter instance pointer
updates adapter structure flag based on netdev state
Definition at line 790 of file bnx2fc_fcoe.c.
char* bnx2fc_get_next_rqe | ( | struct bnx2fc_rport * | tgt, |
u8 | num_items | ||
) |
Definition at line 1445 of file bnx2fc_hwi.c.
Definition at line 182 of file bnx2fc_fcoe.c.
bnx2fc_indicae_kcqe - process KCQE
: adapter structure pointer : kcqe pointer : Number of completion queue elements
Generic KCQ event handler
Definition at line 1323 of file bnx2fc_hwi.c.
void bnx2fc_init_cleanup_task | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task, | ||
u16 | orig_xid | ||
) |
Definition at line 1562 of file bnx2fc_hwi.c.
int bnx2fc_init_mp_req | ( | struct bnx2fc_cmd * | io_req | ) |
Definition at line 609 of file bnx2fc_io.c.
void bnx2fc_init_mp_task | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task | ||
) |
Definition at line 1600 of file bnx2fc_hwi.c.
void bnx2fc_init_seq_cleanup_task | ( | struct bnx2fc_cmd * | seq_clnup_req, |
struct fcoe_task_ctx_entry * | task, | ||
struct bnx2fc_cmd * | orig_io_req, | ||
u32 | offset | ||
) |
Definition at line 1472 of file bnx2fc_hwi.c.
void bnx2fc_init_task | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task | ||
) |
Definition at line 1696 of file bnx2fc_hwi.c.
int bnx2fc_initiate_abts | ( | struct bnx2fc_cmd * | io_req | ) |
Definition at line 842 of file bnx2fc_io.c.
int bnx2fc_initiate_cleanup | ( | struct bnx2fc_cmd * | io_req | ) |
Definition at line 1021 of file bnx2fc_io.c.
int bnx2fc_initiate_seq_cleanup | ( | struct bnx2fc_cmd * | orig_io_req, |
u32 | offset, | ||
enum fc_rctl | r_ctl | ||
) |
Definition at line 951 of file bnx2fc_io.c.
int bnx2fc_map_doorbell | ( | struct bnx2fc_rport * | tgt | ) |
Definition at line 1426 of file bnx2fc_hwi.c.
int bnx2fc_post_io_req | ( | struct bnx2fc_rport * | tgt, |
struct bnx2fc_cmd * | io_req | ||
) |
Definition at line 1966 of file bnx2fc_io.c.
void bnx2fc_process_abts_compl | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | num_rq | ||
) |
Definition at line 1344 of file bnx2fc_io.c.
void bnx2fc_process_cleanup_compl | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | num_rq | ||
) |
Definition at line 1331 of file bnx2fc_io.c.
void bnx2fc_process_cq_compl | ( | struct bnx2fc_rport * | tgt, |
u16 | wqe | ||
) |
Definition at line 871 of file bnx2fc_hwi.c.
void bnx2fc_process_els_compl | ( | struct bnx2fc_cmd * | els_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | num_rq | ||
) |
Definition at line 798 of file bnx2fc_els.c.
void bnx2fc_process_l2_frame_compl | ( | struct bnx2fc_rport * | tgt, |
unsigned char * | buf, | ||
u32 | frame_len, | ||
u16 | l2_oxid | ||
) |
Definition at line 542 of file bnx2fc_hwi.c.
int bnx2fc_process_new_cqes | ( | struct bnx2fc_rport * | tgt | ) |
Definition at line 1009 of file bnx2fc_hwi.c.
void bnx2fc_process_scsi_cmd_compl | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | num_rq | ||
) |
Definition at line 1879 of file bnx2fc_io.c.
void bnx2fc_process_seq_cleanup_compl | ( | struct bnx2fc_cmd * | seq_clnup_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | rx_state | ||
) |
Definition at line 1296 of file bnx2fc_io.c.
void bnx2fc_process_tm_compl | ( | struct bnx2fc_cmd * | io_req, |
struct fcoe_task_ctx_entry * | task, | ||
u8 | num_rq | ||
) |
Definition at line 1503 of file bnx2fc_io.c.
void bnx2fc_return_rqe | ( | struct bnx2fc_rport * | tgt, |
u8 | num_items | ||
) |
Definition at line 1460 of file bnx2fc_hwi.c.
void bnx2fc_ring_doorbell | ( | struct bnx2fc_rport * | tgt | ) |
Definition at line 1412 of file bnx2fc_hwi.c.
void bnx2fc_rport_event_handler | ( | struct fc_lport * | lport, |
struct fc_rport_priv * | rdata, | ||
enum fc_rport_event | event | ||
) |
This event_callback is called after successful completion of libfc initiated target login. bnx2fc can proceed with initiating the session establishment.
Definition at line 429 of file bnx2fc_tgt.c.
int bnx2fc_send_adisc | ( | struct bnx2fc_rport * | tgt, |
struct fc_frame * | fp | ||
) |
Definition at line 173 of file bnx2fc_els.c.
int bnx2fc_send_fw_fcoe_destroy_msg | ( | struct bnx2fc_hba * | hba | ) |
Definition at line 140 of file bnx2fc_hwi.c.
int bnx2fc_send_fw_fcoe_init_msg | ( | struct bnx2fc_hba * | hba | ) |
int bnx2fc_send_logo | ( | struct bnx2fc_rport * | tgt, |
struct fc_frame * | fp | ||
) |
Definition at line 201 of file bnx2fc_els.c.
int bnx2fc_send_rec | ( | struct bnx2fc_cmd * | orig_io_req | ) |
Definition at line 575 of file bnx2fc_els.c.
int bnx2fc_send_rls | ( | struct bnx2fc_rport * | tgt, |
struct fc_frame * | fp | ||
) |
Definition at line 229 of file bnx2fc_els.c.
int bnx2fc_send_rrq | ( | struct bnx2fc_cmd * | aborted_io_req | ) |
Definition at line 58 of file bnx2fc_els.c.
int bnx2fc_send_session_destroy_req | ( | struct bnx2fc_hba * | hba, |
struct bnx2fc_rport * | tgt | ||
) |
bnx2fc_send_session_destroy_req - initiates FCoE Session destroy
: port structure pointer : bnx2fc_rport structure pointer
Definition at line 485 of file bnx2fc_hwi.c.
int bnx2fc_send_session_disable_req | ( | struct fcoe_port * | port, |
struct bnx2fc_rport * | tgt | ||
) |
bnx2fc_send_session_disable_req - initiates FCoE Session disable
: port structure pointer : bnx2fc_rport structure pointer
Definition at line 420 of file bnx2fc_hwi.c.
int bnx2fc_send_session_ofld_req | ( | struct fcoe_port * | port, |
struct bnx2fc_rport * | tgt | ||
) |
bnx2fc_send_session_ofld_req - initiates FCoE Session offload process
: port structure pointer : bnx2fc_rport structure pointer
Definition at line 165 of file bnx2fc_hwi.c.
int bnx2fc_send_srr | ( | struct bnx2fc_cmd * | orig_io_req, |
u32 | offset, | ||
u8 | r_ctl | ||
) |
Definition at line 617 of file bnx2fc_els.c.
int bnx2fc_send_stat_req | ( | struct bnx2fc_hba * | hba | ) |
Definition at line 28 of file bnx2fc_hwi.c.
int bnx2fc_setup_fw_resc | ( | struct bnx2fc_hba * | hba | ) |
bnx2fc_setup_fw_resc - Allocate and map hash table and dummy buffer
: Pointer to adapter structure
Definition at line 2101 of file bnx2fc_hwi.c.
int bnx2fc_setup_task_ctx | ( | struct bnx2fc_hba * | hba | ) |
bnx2fc_setup_task_ctx - allocate and map task context
: pointer to adapter structure
allocate memory for task context, and associated BD table to be used by firmware
Definition at line 1857 of file bnx2fc_hwi.c.
|
read |
bnx2fc_tgt_lookup() - Lookup a bnx2fc_rport by port_id
: fcoe_port struct to lookup the target port on : The remote port ID to look up
Definition at line 577 of file bnx2fc_tgt.c.
struct fcoe_percpu_s bnx2fc_global |
Definition at line 50 of file bnx2fc_fcoe.c.
struct workqueue_struct* bnx2fc_wq |
Definition at line 45 of file bnx2fc_fcoe.c.