18c2ecf20Sopenharmony_ci/* bnx2fc.h: QLogic Linux FCoE offload driver. 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Copyright (c) 2008-2013 Broadcom Corporation 48c2ecf20Sopenharmony_ci * Copyright (c) 2014-2016 QLogic Corporation 58c2ecf20Sopenharmony_ci * Copyright (c) 2016-2017 Cavium Inc. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 88c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 98c2ecf20Sopenharmony_ci * the Free Software Foundation. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Written by: Bhanu Prakash Gollapudi (bprakash@broadcom.com) 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#ifndef _BNX2FC_H_ 158c2ecf20Sopenharmony_ci#define _BNX2FC_H_ 168c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#include <linux/module.h> 198c2ecf20Sopenharmony_ci#include <linux/moduleparam.h> 208c2ecf20Sopenharmony_ci#include <linux/kernel.h> 218c2ecf20Sopenharmony_ci#include <linux/skbuff.h> 228c2ecf20Sopenharmony_ci#include <linux/netdevice.h> 238c2ecf20Sopenharmony_ci#include <linux/etherdevice.h> 248c2ecf20Sopenharmony_ci#include <linux/if_ether.h> 258c2ecf20Sopenharmony_ci#include <linux/if_vlan.h> 268c2ecf20Sopenharmony_ci#include <linux/kthread.h> 278c2ecf20Sopenharmony_ci#include <linux/crc32.h> 288c2ecf20Sopenharmony_ci#include <linux/cpu.h> 298c2ecf20Sopenharmony_ci#include <linux/types.h> 308c2ecf20Sopenharmony_ci#include <linux/list.h> 318c2ecf20Sopenharmony_ci#include <linux/delay.h> 328c2ecf20Sopenharmony_ci#include <linux/timer.h> 338c2ecf20Sopenharmony_ci#include <linux/errno.h> 348c2ecf20Sopenharmony_ci#include <linux/pci.h> 358c2ecf20Sopenharmony_ci#include <linux/init.h> 368c2ecf20Sopenharmony_ci#include <linux/dma-mapping.h> 378c2ecf20Sopenharmony_ci#include <linux/workqueue.h> 388c2ecf20Sopenharmony_ci#include <linux/mutex.h> 398c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 408c2ecf20Sopenharmony_ci#include <linux/bitops.h> 418c2ecf20Sopenharmony_ci#include <linux/log2.h> 428c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 438c2ecf20Sopenharmony_ci#include <linux/sched/signal.h> 448c2ecf20Sopenharmony_ci#include <linux/io.h> 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#include <scsi/scsi.h> 478c2ecf20Sopenharmony_ci#include <scsi/scsi_host.h> 488c2ecf20Sopenharmony_ci#include <scsi/scsi_device.h> 498c2ecf20Sopenharmony_ci#include <scsi/scsi_cmnd.h> 508c2ecf20Sopenharmony_ci#include <scsi/scsi_eh.h> 518c2ecf20Sopenharmony_ci#include <scsi/scsi_tcq.h> 528c2ecf20Sopenharmony_ci#include <scsi/libfc.h> 538c2ecf20Sopenharmony_ci#include <scsi/libfcoe.h> 548c2ecf20Sopenharmony_ci#include <scsi/fc_encode.h> 558c2ecf20Sopenharmony_ci#include <scsi/scsi_transport.h> 568c2ecf20Sopenharmony_ci#include <scsi/scsi_transport_fc.h> 578c2ecf20Sopenharmony_ci#include <scsi/fc/fc_fip.h> 588c2ecf20Sopenharmony_ci#include <scsi/fc/fc_fc2.h> 598c2ecf20Sopenharmony_ci#include <scsi/fc_frame.h> 608c2ecf20Sopenharmony_ci#include <scsi/fc/fc_fcoe.h> 618c2ecf20Sopenharmony_ci#include <scsi/fc/fc_fcp.h> 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci#include "57xx_hsi_bnx2fc.h" 648c2ecf20Sopenharmony_ci#include "../../net/ethernet/broadcom/cnic_if.h" 658c2ecf20Sopenharmony_ci#include "../../net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h" 668c2ecf20Sopenharmony_ci#include "bnx2fc_constants.h" 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define BNX2FC_NAME "bnx2fc" 698c2ecf20Sopenharmony_ci#define BNX2FC_VERSION "2.12.13" 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define PFX "bnx2fc: " 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define BCM_CHIP_LEN 16 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define BNX2X_DOORBELL_PCI_BAR 2 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define BNX2FC_MAX_BD_LEN 0xffff 788c2ecf20Sopenharmony_ci#define BNX2FC_BD_SPLIT_SZ 0xffff 798c2ecf20Sopenharmony_ci#define BNX2FC_MAX_BDS_PER_CMD 255 808c2ecf20Sopenharmony_ci#define BNX2FC_FW_MAX_BDS_PER_CMD 255 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#define BNX2FC_SQ_WQES_MAX 256 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci#define BNX2FC_SCSI_MAX_SQES ((3 * BNX2FC_SQ_WQES_MAX) / 8) 858c2ecf20Sopenharmony_ci#define BNX2FC_TM_MAX_SQES ((BNX2FC_SQ_WQES_MAX) / 2) 868c2ecf20Sopenharmony_ci#define BNX2FC_ELS_MAX_SQES (BNX2FC_TM_MAX_SQES - 1) 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci#define BNX2FC_RQ_WQES_MAX 16 898c2ecf20Sopenharmony_ci#define BNX2FC_CQ_WQES_MAX (BNX2FC_SQ_WQES_MAX + BNX2FC_RQ_WQES_MAX) 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#define BNX2FC_NUM_MAX_SESS 1024 928c2ecf20Sopenharmony_ci#define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS)) 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci#define BNX2FC_MAX_NPIV 256 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define BNX2FC_MIN_PAYLOAD 256 978c2ecf20Sopenharmony_ci#define BNX2FC_MAX_PAYLOAD 2048 988c2ecf20Sopenharmony_ci#define BNX2FC_MFS \ 998c2ecf20Sopenharmony_ci (BNX2FC_MAX_PAYLOAD + sizeof(struct fc_frame_header)) 1008c2ecf20Sopenharmony_ci#define BNX2FC_MINI_JUMBO_MTU 2500 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define BNX2FC_RQ_BUF_SZ 256 1048c2ecf20Sopenharmony_ci#define BNX2FC_RQ_BUF_LOG_SZ (ilog2(BNX2FC_RQ_BUF_SZ)) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#define BNX2FC_SQ_WQE_SIZE (sizeof(struct fcoe_sqe)) 1078c2ecf20Sopenharmony_ci#define BNX2FC_CQ_WQE_SIZE (sizeof(struct fcoe_cqe)) 1088c2ecf20Sopenharmony_ci#define BNX2FC_RQ_WQE_SIZE (BNX2FC_RQ_BUF_SZ) 1098c2ecf20Sopenharmony_ci#define BNX2FC_XFERQ_WQE_SIZE (sizeof(struct fcoe_xfrqe)) 1108c2ecf20Sopenharmony_ci#define BNX2FC_CONFQ_WQE_SIZE (sizeof(struct fcoe_confqe)) 1118c2ecf20Sopenharmony_ci#define BNX2X_DB_SHIFT 3 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define BNX2FC_TASK_SIZE 128 1148c2ecf20Sopenharmony_ci#define BNX2FC_TASKS_PER_PAGE (PAGE_SIZE/BNX2FC_TASK_SIZE) 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci#define BNX2FC_MAX_ROWS_IN_HASH_TBL 8 1178c2ecf20Sopenharmony_ci#define BNX2FC_HASH_TBL_CHUNK_SIZE (16 * 1024) 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define BNX2FC_MAX_SEQS 255 1208c2ecf20Sopenharmony_ci#define BNX2FC_MAX_RETRY_CNT 3 1218c2ecf20Sopenharmony_ci#define BNX2FC_MAX_RPORT_RETRY_CNT 255 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#define BNX2FC_READ (1 << 1) 1248c2ecf20Sopenharmony_ci#define BNX2FC_WRITE (1 << 0) 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#define BNX2FC_MIN_XID 0 1278c2ecf20Sopenharmony_ci#define FCOE_MAX_NUM_XIDS 0x2000 1288c2ecf20Sopenharmony_ci#define FCOE_MAX_XID_OFFSET (FCOE_MAX_NUM_XIDS - 1) 1298c2ecf20Sopenharmony_ci#define FCOE_XIDS_PER_CPU_OFFSET ((512 * nr_cpu_ids) - 1) 1308c2ecf20Sopenharmony_ci#define BNX2FC_MAX_LUN 0xFFFF 1318c2ecf20Sopenharmony_ci#define BNX2FC_MAX_FCP_TGT 256 1328c2ecf20Sopenharmony_ci#define BNX2FC_MAX_CMD_LEN 16 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci#define BNX2FC_TM_TIMEOUT 60 /* secs */ 1358c2ecf20Sopenharmony_ci#define BNX2FC_IO_TIMEOUT 20000UL /* msecs */ 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci#define BNX2FC_WAIT_CNT 1200 1388c2ecf20Sopenharmony_ci#define BNX2FC_FW_TIMEOUT (3 * HZ) 1398c2ecf20Sopenharmony_ci#define PORT_MAX 2 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci#define CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* FC FCP Status */ 1448c2ecf20Sopenharmony_ci#define FC_GOOD 0 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci#define BNX2FC_RNID_HBA 0x7 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci#define SRR_RETRY_COUNT 5 1498c2ecf20Sopenharmony_ci#define REC_RETRY_COUNT 1 1508c2ecf20Sopenharmony_ci#define BNX2FC_NUM_ERR_BITS 63 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci#define BNX2FC_RELOGIN_WAIT_TIME 200 1538c2ecf20Sopenharmony_ci#define BNX2FC_RELOGIN_WAIT_CNT 10 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci#define BNX2FC_STATS(hba, stat, cnt) \ 1568c2ecf20Sopenharmony_ci do { \ 1578c2ecf20Sopenharmony_ci u32 val; \ 1588c2ecf20Sopenharmony_ci \ 1598c2ecf20Sopenharmony_ci val = fw_stats->stat.cnt; \ 1608c2ecf20Sopenharmony_ci if (hba->prev_stats.stat.cnt <= val) \ 1618c2ecf20Sopenharmony_ci val -= hba->prev_stats.stat.cnt; \ 1628c2ecf20Sopenharmony_ci else \ 1638c2ecf20Sopenharmony_ci val += (0xfffffff - hba->prev_stats.stat.cnt); \ 1648c2ecf20Sopenharmony_ci hba->bfw_stats.cnt += val; \ 1658c2ecf20Sopenharmony_ci } while (0) 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci/* bnx2fc driver uses only one instance of fcoe_percpu_s */ 1688c2ecf20Sopenharmony_ciextern struct fcoe_percpu_s bnx2fc_global; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ciextern struct workqueue_struct *bnx2fc_wq; 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_cistruct bnx2fc_percpu_s { 1738c2ecf20Sopenharmony_ci struct task_struct *iothread; 1748c2ecf20Sopenharmony_ci struct list_head work_list; 1758c2ecf20Sopenharmony_ci spinlock_t fp_work_lock; 1768c2ecf20Sopenharmony_ci}; 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_cistruct bnx2fc_fw_stats { 1798c2ecf20Sopenharmony_ci u64 fc_crc_cnt; 1808c2ecf20Sopenharmony_ci u64 fcoe_tx_pkt_cnt; 1818c2ecf20Sopenharmony_ci u64 fcoe_rx_pkt_cnt; 1828c2ecf20Sopenharmony_ci u64 fcoe_tx_byte_cnt; 1838c2ecf20Sopenharmony_ci u64 fcoe_rx_byte_cnt; 1848c2ecf20Sopenharmony_ci}; 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_cistruct bnx2fc_hba { 1878c2ecf20Sopenharmony_ci struct list_head list; 1888c2ecf20Sopenharmony_ci struct cnic_dev *cnic; 1898c2ecf20Sopenharmony_ci struct pci_dev *pcidev; 1908c2ecf20Sopenharmony_ci struct net_device *phys_dev; 1918c2ecf20Sopenharmony_ci unsigned long reg_with_cnic; 1928c2ecf20Sopenharmony_ci #define BNX2FC_CNIC_REGISTERED 1 1938c2ecf20Sopenharmony_ci struct bnx2fc_cmd_mgr *cmd_mgr; 1948c2ecf20Sopenharmony_ci spinlock_t hba_lock; 1958c2ecf20Sopenharmony_ci struct mutex hba_mutex; 1968c2ecf20Sopenharmony_ci struct mutex hba_stats_mutex; 1978c2ecf20Sopenharmony_ci unsigned long adapter_state; 1988c2ecf20Sopenharmony_ci #define ADAPTER_STATE_UP 0 1998c2ecf20Sopenharmony_ci #define ADAPTER_STATE_GOING_DOWN 1 2008c2ecf20Sopenharmony_ci #define ADAPTER_STATE_LINK_DOWN 2 2018c2ecf20Sopenharmony_ci #define ADAPTER_STATE_READY 3 2028c2ecf20Sopenharmony_ci unsigned long flags; 2038c2ecf20Sopenharmony_ci #define BNX2FC_FLAG_FW_INIT_DONE 0 2048c2ecf20Sopenharmony_ci #define BNX2FC_FLAG_DESTROY_CMPL 1 2058c2ecf20Sopenharmony_ci u32 next_conn_id; 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci /* xid resources */ 2088c2ecf20Sopenharmony_ci u16 max_xid; 2098c2ecf20Sopenharmony_ci u32 max_tasks; 2108c2ecf20Sopenharmony_ci u32 max_outstanding_cmds; 2118c2ecf20Sopenharmony_ci u32 elstm_xids; 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry **task_ctx; 2148c2ecf20Sopenharmony_ci dma_addr_t *task_ctx_dma; 2158c2ecf20Sopenharmony_ci struct regpair *task_ctx_bd_tbl; 2168c2ecf20Sopenharmony_ci dma_addr_t task_ctx_bd_dma; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci int hash_tbl_segment_count; 2198c2ecf20Sopenharmony_ci void **hash_tbl_segments; 2208c2ecf20Sopenharmony_ci void *hash_tbl_pbl; 2218c2ecf20Sopenharmony_ci dma_addr_t hash_tbl_pbl_dma; 2228c2ecf20Sopenharmony_ci struct fcoe_t2_hash_table_entry *t2_hash_tbl; 2238c2ecf20Sopenharmony_ci dma_addr_t t2_hash_tbl_dma; 2248c2ecf20Sopenharmony_ci char *t2_hash_tbl_ptr; 2258c2ecf20Sopenharmony_ci dma_addr_t t2_hash_tbl_ptr_dma; 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci char *dummy_buffer; 2288c2ecf20Sopenharmony_ci dma_addr_t dummy_buf_dma; 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci /* Active list of offloaded sessions */ 2318c2ecf20Sopenharmony_ci struct bnx2fc_rport **tgt_ofld_list; 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci /* statistics */ 2348c2ecf20Sopenharmony_ci struct bnx2fc_fw_stats bfw_stats; 2358c2ecf20Sopenharmony_ci struct fcoe_statistics_params prev_stats; 2368c2ecf20Sopenharmony_ci struct fcoe_statistics_params *stats_buffer; 2378c2ecf20Sopenharmony_ci dma_addr_t stats_buf_dma; 2388c2ecf20Sopenharmony_ci struct completion stat_req_done; 2398c2ecf20Sopenharmony_ci struct fcoe_capabilities fcoe_cap; 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci /*destroy handling */ 2428c2ecf20Sopenharmony_ci struct timer_list destroy_timer; 2438c2ecf20Sopenharmony_ci wait_queue_head_t destroy_wait; 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci /* linkdown handling */ 2468c2ecf20Sopenharmony_ci wait_queue_head_t shutdown_wait; 2478c2ecf20Sopenharmony_ci int wait_for_link_down; 2488c2ecf20Sopenharmony_ci int num_ofld_sess; 2498c2ecf20Sopenharmony_ci struct list_head vports; 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci char chip_num[BCM_CHIP_LEN]; 2528c2ecf20Sopenharmony_ci}; 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_cistruct bnx2fc_interface { 2558c2ecf20Sopenharmony_ci struct list_head list; 2568c2ecf20Sopenharmony_ci unsigned long if_flags; 2578c2ecf20Sopenharmony_ci #define BNX2FC_CTLR_INIT_DONE 0 2588c2ecf20Sopenharmony_ci struct bnx2fc_hba *hba; 2598c2ecf20Sopenharmony_ci struct net_device *netdev; 2608c2ecf20Sopenharmony_ci struct packet_type fcoe_packet_type; 2618c2ecf20Sopenharmony_ci struct packet_type fip_packet_type; 2628c2ecf20Sopenharmony_ci struct workqueue_struct *timer_work_queue; 2638c2ecf20Sopenharmony_ci struct kref kref; 2648c2ecf20Sopenharmony_ci u8 vlan_enabled; 2658c2ecf20Sopenharmony_ci int vlan_id; 2668c2ecf20Sopenharmony_ci bool enabled; 2678c2ecf20Sopenharmony_ci u8 tm_timeout; 2688c2ecf20Sopenharmony_ci}; 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci#define bnx2fc_from_ctlr(x) \ 2718c2ecf20Sopenharmony_ci ((struct bnx2fc_interface *)((x) + 1)) 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ci#define bnx2fc_to_ctlr(x) \ 2748c2ecf20Sopenharmony_ci ((struct fcoe_ctlr *)(((struct fcoe_ctlr *)(x)) - 1)) 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_cistruct bnx2fc_lport { 2778c2ecf20Sopenharmony_ci struct list_head list; 2788c2ecf20Sopenharmony_ci struct fc_lport *lport; 2798c2ecf20Sopenharmony_ci}; 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_cistruct bnx2fc_cmd_mgr { 2828c2ecf20Sopenharmony_ci struct bnx2fc_hba *hba; 2838c2ecf20Sopenharmony_ci u16 next_idx; 2848c2ecf20Sopenharmony_ci struct list_head *free_list; 2858c2ecf20Sopenharmony_ci spinlock_t *free_list_lock; 2868c2ecf20Sopenharmony_ci struct io_bdt **io_bdt_pool; 2878c2ecf20Sopenharmony_ci struct bnx2fc_cmd **cmds; 2888c2ecf20Sopenharmony_ci}; 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_cistruct bnx2fc_rport { 2918c2ecf20Sopenharmony_ci struct fcoe_port *port; 2928c2ecf20Sopenharmony_ci struct fc_rport *rport; 2938c2ecf20Sopenharmony_ci struct fc_rport_priv *rdata; 2948c2ecf20Sopenharmony_ci void __iomem *ctx_base; 2958c2ecf20Sopenharmony_ci#define DPM_TRIGER_TYPE 0x40 2968c2ecf20Sopenharmony_ci u32 io_timeout; 2978c2ecf20Sopenharmony_ci u32 fcoe_conn_id; 2988c2ecf20Sopenharmony_ci u32 context_id; 2998c2ecf20Sopenharmony_ci u32 sid; 3008c2ecf20Sopenharmony_ci int dev_type; 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci unsigned long flags; 3038c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_SESSION_READY 0x1 3048c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_OFFLOADED 0x2 3058c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_DISABLED 0x3 3068c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_DESTROYED 0x4 3078c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_OFLD_REQ_CMPL 0x5 3088c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_CTX_ALLOC_FAILURE 0x6 3098c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_UPLD_REQ_COMPL 0x7 3108c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_DISABLE_FAILED 0x9 3118c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ENABLED 0xa 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci u8 src_addr[ETH_ALEN]; 3148c2ecf20Sopenharmony_ci u32 max_sqes; 3158c2ecf20Sopenharmony_ci u32 max_rqes; 3168c2ecf20Sopenharmony_ci u32 max_cqes; 3178c2ecf20Sopenharmony_ci atomic_t free_sqes; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci struct b577xx_doorbell_set_prod sq_db; 3208c2ecf20Sopenharmony_ci struct b577xx_fcoe_rx_doorbell rx_db; 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_ci struct fcoe_sqe *sq; 3238c2ecf20Sopenharmony_ci dma_addr_t sq_dma; 3248c2ecf20Sopenharmony_ci u16 sq_prod_idx; 3258c2ecf20Sopenharmony_ci u8 sq_curr_toggle_bit; 3268c2ecf20Sopenharmony_ci u32 sq_mem_size; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci struct fcoe_cqe *cq; 3298c2ecf20Sopenharmony_ci dma_addr_t cq_dma; 3308c2ecf20Sopenharmony_ci u16 cq_cons_idx; 3318c2ecf20Sopenharmony_ci u8 cq_curr_toggle_bit; 3328c2ecf20Sopenharmony_ci u32 cq_mem_size; 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci void *rq; 3358c2ecf20Sopenharmony_ci dma_addr_t rq_dma; 3368c2ecf20Sopenharmony_ci u32 rq_prod_idx; 3378c2ecf20Sopenharmony_ci u32 rq_cons_idx; 3388c2ecf20Sopenharmony_ci u32 rq_mem_size; 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci void *rq_pbl; 3418c2ecf20Sopenharmony_ci dma_addr_t rq_pbl_dma; 3428c2ecf20Sopenharmony_ci u32 rq_pbl_size; 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ci struct fcoe_xfrqe *xferq; 3458c2ecf20Sopenharmony_ci dma_addr_t xferq_dma; 3468c2ecf20Sopenharmony_ci u32 xferq_mem_size; 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_ci struct fcoe_confqe *confq; 3498c2ecf20Sopenharmony_ci dma_addr_t confq_dma; 3508c2ecf20Sopenharmony_ci u32 confq_mem_size; 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_ci void *confq_pbl; 3538c2ecf20Sopenharmony_ci dma_addr_t confq_pbl_dma; 3548c2ecf20Sopenharmony_ci u32 confq_pbl_size; 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci struct fcoe_conn_db *conn_db; 3578c2ecf20Sopenharmony_ci dma_addr_t conn_db_dma; 3588c2ecf20Sopenharmony_ci u32 conn_db_mem_size; 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci struct fcoe_sqe *lcq; 3618c2ecf20Sopenharmony_ci dma_addr_t lcq_dma; 3628c2ecf20Sopenharmony_ci u32 lcq_mem_size; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci void *ofld_req[4]; 3658c2ecf20Sopenharmony_ci dma_addr_t ofld_req_dma[4]; 3668c2ecf20Sopenharmony_ci void *enbl_req; 3678c2ecf20Sopenharmony_ci dma_addr_t enbl_req_dma; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci spinlock_t tgt_lock; 3708c2ecf20Sopenharmony_ci spinlock_t cq_lock; 3718c2ecf20Sopenharmony_ci atomic_t num_active_ios; 3728c2ecf20Sopenharmony_ci u32 flush_in_prog; 3738c2ecf20Sopenharmony_ci unsigned long timestamp; 3748c2ecf20Sopenharmony_ci unsigned long retry_delay_timestamp; 3758c2ecf20Sopenharmony_ci struct list_head free_task_list; 3768c2ecf20Sopenharmony_ci struct bnx2fc_cmd *pending_queue[BNX2FC_SQ_WQES_MAX+1]; 3778c2ecf20Sopenharmony_ci struct list_head active_cmd_queue; 3788c2ecf20Sopenharmony_ci struct list_head els_queue; 3798c2ecf20Sopenharmony_ci struct list_head io_retire_queue; 3808c2ecf20Sopenharmony_ci struct list_head active_tm_queue; 3818c2ecf20Sopenharmony_ci 3828c2ecf20Sopenharmony_ci struct timer_list ofld_timer; 3838c2ecf20Sopenharmony_ci wait_queue_head_t ofld_wait; 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci struct timer_list upld_timer; 3868c2ecf20Sopenharmony_ci wait_queue_head_t upld_wait; 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_cistruct bnx2fc_mp_req { 3908c2ecf20Sopenharmony_ci u8 tm_flags; 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci u32 req_len; 3938c2ecf20Sopenharmony_ci void *req_buf; 3948c2ecf20Sopenharmony_ci dma_addr_t req_buf_dma; 3958c2ecf20Sopenharmony_ci struct fcoe_bd_ctx *mp_req_bd; 3968c2ecf20Sopenharmony_ci dma_addr_t mp_req_bd_dma; 3978c2ecf20Sopenharmony_ci struct fc_frame_header req_fc_hdr; 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_ci u32 resp_len; 4008c2ecf20Sopenharmony_ci void *resp_buf; 4018c2ecf20Sopenharmony_ci dma_addr_t resp_buf_dma; 4028c2ecf20Sopenharmony_ci struct fcoe_bd_ctx *mp_resp_bd; 4038c2ecf20Sopenharmony_ci dma_addr_t mp_resp_bd_dma; 4048c2ecf20Sopenharmony_ci struct fc_frame_header resp_fc_hdr; 4058c2ecf20Sopenharmony_ci}; 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_cistruct bnx2fc_els_cb_arg { 4088c2ecf20Sopenharmony_ci struct bnx2fc_cmd *aborted_io_req; 4098c2ecf20Sopenharmony_ci struct bnx2fc_cmd *io_req; 4108c2ecf20Sopenharmony_ci u16 l2_oxid; 4118c2ecf20Sopenharmony_ci u32 offset; 4128c2ecf20Sopenharmony_ci enum fc_rctl r_ctl; 4138c2ecf20Sopenharmony_ci}; 4148c2ecf20Sopenharmony_ci 4158c2ecf20Sopenharmony_ci/* bnx2fc command structure */ 4168c2ecf20Sopenharmony_cistruct bnx2fc_cmd { 4178c2ecf20Sopenharmony_ci struct list_head link; 4188c2ecf20Sopenharmony_ci u8 on_active_queue; 4198c2ecf20Sopenharmony_ci u8 on_tmf_queue; 4208c2ecf20Sopenharmony_ci u8 cmd_type; 4218c2ecf20Sopenharmony_ci#define BNX2FC_SCSI_CMD 1 4228c2ecf20Sopenharmony_ci#define BNX2FC_TASK_MGMT_CMD 2 4238c2ecf20Sopenharmony_ci#define BNX2FC_ABTS 3 4248c2ecf20Sopenharmony_ci#define BNX2FC_ELS 4 4258c2ecf20Sopenharmony_ci#define BNX2FC_CLEANUP 5 4268c2ecf20Sopenharmony_ci#define BNX2FC_SEQ_CLEANUP 6 4278c2ecf20Sopenharmony_ci u8 io_req_flags; 4288c2ecf20Sopenharmony_ci struct kref refcount; 4298c2ecf20Sopenharmony_ci struct fcoe_port *port; 4308c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt; 4318c2ecf20Sopenharmony_ci struct scsi_cmnd *sc_cmd; 4328c2ecf20Sopenharmony_ci struct bnx2fc_cmd_mgr *cmd_mgr; 4338c2ecf20Sopenharmony_ci struct bnx2fc_mp_req mp_req; 4348c2ecf20Sopenharmony_ci void (*cb_func)(struct bnx2fc_els_cb_arg *cb_arg); 4358c2ecf20Sopenharmony_ci struct bnx2fc_els_cb_arg *cb_arg; 4368c2ecf20Sopenharmony_ci struct delayed_work timeout_work; /* timer for ULP timeouts */ 4378c2ecf20Sopenharmony_ci struct completion abts_done; 4388c2ecf20Sopenharmony_ci struct completion cleanup_done; 4398c2ecf20Sopenharmony_ci int wait_for_abts_comp; 4408c2ecf20Sopenharmony_ci int wait_for_cleanup_comp; 4418c2ecf20Sopenharmony_ci u16 xid; 4428c2ecf20Sopenharmony_ci struct fcoe_err_report_entry err_entry; 4438c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task; 4448c2ecf20Sopenharmony_ci struct io_bdt *bd_tbl; 4458c2ecf20Sopenharmony_ci struct fcp_rsp *rsp; 4468c2ecf20Sopenharmony_ci size_t data_xfer_len; 4478c2ecf20Sopenharmony_ci unsigned long req_flags; 4488c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ISSUE_RRQ 0x1 4498c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ISSUE_ABTS 0x2 4508c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ABTS_DONE 0x3 4518c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_TM_COMPL 0x4 4528c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_TM_TIMEOUT 0x5 4538c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_IO_CLEANUP 0x6 4548c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_RETIRE_OXID 0x7 4558c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_EH_ABORT 0x8 4568c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_IO_COMPL 0x9 4578c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ELS_DONE 0xa 4588c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ELS_TIMEOUT 0xb 4598c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_CMD_LOST 0xc 4608c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_SRR_SENT 0xd 4618c2ecf20Sopenharmony_ci#define BNX2FC_FLAG_ISSUE_CLEANUP_REQ 0xe 4628c2ecf20Sopenharmony_ci u8 rec_retry; 4638c2ecf20Sopenharmony_ci u8 srr_retry; 4648c2ecf20Sopenharmony_ci u32 srr_offset; 4658c2ecf20Sopenharmony_ci u8 srr_rctl; 4668c2ecf20Sopenharmony_ci u32 fcp_resid; 4678c2ecf20Sopenharmony_ci u32 fcp_rsp_len; 4688c2ecf20Sopenharmony_ci u32 fcp_sns_len; 4698c2ecf20Sopenharmony_ci u8 cdb_status; /* SCSI IO status */ 4708c2ecf20Sopenharmony_ci u8 fcp_status; /* FCP IO status */ 4718c2ecf20Sopenharmony_ci u8 fcp_rsp_code; 4728c2ecf20Sopenharmony_ci u8 scsi_comp_flags; 4738c2ecf20Sopenharmony_ci}; 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_cistruct io_bdt { 4768c2ecf20Sopenharmony_ci struct bnx2fc_cmd *io_req; 4778c2ecf20Sopenharmony_ci struct fcoe_bd_ctx *bd_tbl; 4788c2ecf20Sopenharmony_ci dma_addr_t bd_tbl_dma; 4798c2ecf20Sopenharmony_ci u16 bd_valid; 4808c2ecf20Sopenharmony_ci}; 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_cistruct bnx2fc_work { 4838c2ecf20Sopenharmony_ci struct list_head list; 4848c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt; 4858c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task; 4868c2ecf20Sopenharmony_ci unsigned char rq_data[BNX2FC_RQ_BUF_SZ]; 4878c2ecf20Sopenharmony_ci u16 wqe; 4888c2ecf20Sopenharmony_ci u8 num_rq; 4898c2ecf20Sopenharmony_ci}; 4908c2ecf20Sopenharmony_cistruct bnx2fc_unsol_els { 4918c2ecf20Sopenharmony_ci struct fc_lport *lport; 4928c2ecf20Sopenharmony_ci struct fc_frame *fp; 4938c2ecf20Sopenharmony_ci struct bnx2fc_hba *hba; 4948c2ecf20Sopenharmony_ci struct work_struct unsol_els_work; 4958c2ecf20Sopenharmony_ci}; 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_cistruct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt); 5008c2ecf20Sopenharmony_cistruct bnx2fc_cmd *bnx2fc_elstm_alloc(struct bnx2fc_rport *tgt, int type); 5018c2ecf20Sopenharmony_civoid bnx2fc_cmd_release(struct kref *ref); 5028c2ecf20Sopenharmony_ciint bnx2fc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd); 5038c2ecf20Sopenharmony_ciint bnx2fc_send_fw_fcoe_init_msg(struct bnx2fc_hba *hba); 5048c2ecf20Sopenharmony_ciint bnx2fc_send_fw_fcoe_destroy_msg(struct bnx2fc_hba *hba); 5058c2ecf20Sopenharmony_ciint bnx2fc_send_session_ofld_req(struct fcoe_port *port, 5068c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt); 5078c2ecf20Sopenharmony_ciint bnx2fc_send_session_enable_req(struct fcoe_port *port, 5088c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt); 5098c2ecf20Sopenharmony_ciint bnx2fc_send_session_disable_req(struct fcoe_port *port, 5108c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt); 5118c2ecf20Sopenharmony_ciint bnx2fc_send_session_destroy_req(struct bnx2fc_hba *hba, 5128c2ecf20Sopenharmony_ci struct bnx2fc_rport *tgt); 5138c2ecf20Sopenharmony_ciint bnx2fc_map_doorbell(struct bnx2fc_rport *tgt); 5148c2ecf20Sopenharmony_civoid bnx2fc_indicate_kcqe(void *context, struct kcqe *kcq[], 5158c2ecf20Sopenharmony_ci u32 num_cqe); 5168c2ecf20Sopenharmony_ciint bnx2fc_setup_task_ctx(struct bnx2fc_hba *hba); 5178c2ecf20Sopenharmony_civoid bnx2fc_free_task_ctx(struct bnx2fc_hba *hba); 5188c2ecf20Sopenharmony_ciint bnx2fc_setup_fw_resc(struct bnx2fc_hba *hba); 5198c2ecf20Sopenharmony_civoid bnx2fc_free_fw_resc(struct bnx2fc_hba *hba); 5208c2ecf20Sopenharmony_cistruct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba); 5218c2ecf20Sopenharmony_civoid bnx2fc_cmd_mgr_free(struct bnx2fc_cmd_mgr *cmgr); 5228c2ecf20Sopenharmony_civoid bnx2fc_get_link_state(struct bnx2fc_hba *hba); 5238c2ecf20Sopenharmony_cichar *bnx2fc_get_next_rqe(struct bnx2fc_rport *tgt, u8 num_items); 5248c2ecf20Sopenharmony_civoid bnx2fc_return_rqe(struct bnx2fc_rport *tgt, u8 num_items); 5258c2ecf20Sopenharmony_ciint bnx2fc_get_paged_crc_eof(struct sk_buff *skb, int tlen); 5268c2ecf20Sopenharmony_ciint bnx2fc_send_rrq(struct bnx2fc_cmd *aborted_io_req); 5278c2ecf20Sopenharmony_ciint bnx2fc_send_adisc(struct bnx2fc_rport *tgt, struct fc_frame *fp); 5288c2ecf20Sopenharmony_ciint bnx2fc_send_logo(struct bnx2fc_rport *tgt, struct fc_frame *fp); 5298c2ecf20Sopenharmony_ciint bnx2fc_send_rls(struct bnx2fc_rport *tgt, struct fc_frame *fp); 5308c2ecf20Sopenharmony_ciint bnx2fc_initiate_cleanup(struct bnx2fc_cmd *io_req); 5318c2ecf20Sopenharmony_ciint bnx2fc_initiate_abts(struct bnx2fc_cmd *io_req); 5328c2ecf20Sopenharmony_civoid bnx2fc_cmd_timer_set(struct bnx2fc_cmd *io_req, 5338c2ecf20Sopenharmony_ci unsigned int timer_msec); 5348c2ecf20Sopenharmony_ciint bnx2fc_init_mp_req(struct bnx2fc_cmd *io_req); 5358c2ecf20Sopenharmony_civoid bnx2fc_init_cleanup_task(struct bnx2fc_cmd *io_req, 5368c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5378c2ecf20Sopenharmony_ci u16 orig_xid); 5388c2ecf20Sopenharmony_civoid bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnup_req, 5398c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5408c2ecf20Sopenharmony_ci struct bnx2fc_cmd *orig_io_req, 5418c2ecf20Sopenharmony_ci u32 offset); 5428c2ecf20Sopenharmony_civoid bnx2fc_init_mp_task(struct bnx2fc_cmd *io_req, 5438c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task); 5448c2ecf20Sopenharmony_civoid bnx2fc_init_task(struct bnx2fc_cmd *io_req, 5458c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task); 5468c2ecf20Sopenharmony_civoid bnx2fc_add_2_sq(struct bnx2fc_rport *tgt, u16 xid); 5478c2ecf20Sopenharmony_civoid bnx2fc_ring_doorbell(struct bnx2fc_rport *tgt); 5488c2ecf20Sopenharmony_ciint bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd); 5498c2ecf20Sopenharmony_ciint bnx2fc_eh_target_reset(struct scsi_cmnd *sc_cmd); 5508c2ecf20Sopenharmony_ciint bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd); 5518c2ecf20Sopenharmony_civoid bnx2fc_rport_event_handler(struct fc_lport *lport, 5528c2ecf20Sopenharmony_ci struct fc_rport_priv *rport, 5538c2ecf20Sopenharmony_ci enum fc_rport_event event); 5548c2ecf20Sopenharmony_civoid bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req, 5558c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5568c2ecf20Sopenharmony_ci u8 num_rq, unsigned char *rq_data); 5578c2ecf20Sopenharmony_civoid bnx2fc_process_cleanup_compl(struct bnx2fc_cmd *io_req, 5588c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5598c2ecf20Sopenharmony_ci u8 num_rq); 5608c2ecf20Sopenharmony_civoid bnx2fc_process_abts_compl(struct bnx2fc_cmd *io_req, 5618c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5628c2ecf20Sopenharmony_ci u8 num_rq); 5638c2ecf20Sopenharmony_civoid bnx2fc_process_tm_compl(struct bnx2fc_cmd *io_req, 5648c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5658c2ecf20Sopenharmony_ci u8 num_rq, unsigned char *rq_data); 5668c2ecf20Sopenharmony_civoid bnx2fc_process_els_compl(struct bnx2fc_cmd *els_req, 5678c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5688c2ecf20Sopenharmony_ci u8 num_rq); 5698c2ecf20Sopenharmony_civoid bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req, 5708c2ecf20Sopenharmony_ci struct fcp_cmnd *fcp_cmnd); 5718c2ecf20Sopenharmony_ci 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_civoid bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt); 5758c2ecf20Sopenharmony_cistruct fc_seq *bnx2fc_elsct_send(struct fc_lport *lport, u32 did, 5768c2ecf20Sopenharmony_ci struct fc_frame *fp, unsigned int op, 5778c2ecf20Sopenharmony_ci void (*resp)(struct fc_seq *, 5788c2ecf20Sopenharmony_ci struct fc_frame *, 5798c2ecf20Sopenharmony_ci void *), 5808c2ecf20Sopenharmony_ci void *arg, u32 timeout); 5818c2ecf20Sopenharmony_civoid bnx2fc_arm_cq(struct bnx2fc_rport *tgt); 5828c2ecf20Sopenharmony_ciint bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt); 5838c2ecf20Sopenharmony_civoid bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe, 5848c2ecf20Sopenharmony_ci unsigned char *rq_data, u8 num_rq, 5858c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task); 5868c2ecf20Sopenharmony_cistruct bnx2fc_rport *bnx2fc_tgt_lookup(struct fcoe_port *port, 5878c2ecf20Sopenharmony_ci u32 port_id); 5888c2ecf20Sopenharmony_civoid bnx2fc_process_l2_frame_compl(struct bnx2fc_rport *tgt, 5898c2ecf20Sopenharmony_ci unsigned char *buf, 5908c2ecf20Sopenharmony_ci u32 frame_len, u16 l2_oxid); 5918c2ecf20Sopenharmony_ciint bnx2fc_send_stat_req(struct bnx2fc_hba *hba); 5928c2ecf20Sopenharmony_ciint bnx2fc_post_io_req(struct bnx2fc_rport *tgt, struct bnx2fc_cmd *io_req); 5938c2ecf20Sopenharmony_ciint bnx2fc_send_rec(struct bnx2fc_cmd *orig_io_req); 5948c2ecf20Sopenharmony_ciint bnx2fc_send_srr(struct bnx2fc_cmd *orig_io_req, u32 offset, u8 r_ctl); 5958c2ecf20Sopenharmony_civoid bnx2fc_process_seq_cleanup_compl(struct bnx2fc_cmd *seq_clnup_req, 5968c2ecf20Sopenharmony_ci struct fcoe_task_ctx_entry *task, 5978c2ecf20Sopenharmony_ci u8 rx_state); 5988c2ecf20Sopenharmony_ciint bnx2fc_initiate_seq_cleanup(struct bnx2fc_cmd *orig_io_req, u32 offset, 5998c2ecf20Sopenharmony_ci enum fc_rctl r_ctl); 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ci 6028c2ecf20Sopenharmony_ci#include "bnx2fc_debug.h" 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_ci#endif 605