#include <linux/irq_poll.h>
#include <linux/cpufreq.h>
#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_SCSI_LPFC_DEBUG_FS)
#define CONFIG_SCSI_LPFC_DEBUG_FS
#endif
#define LPFC_ACTIVE_MBOX_WAIT_CNT …
#define LPFC_XRI_EXCH_BUSY_WAIT_TMO …
#define LPFC_XRI_EXCH_BUSY_WAIT_T1 …
#define LPFC_XRI_EXCH_BUSY_WAIT_T2 …
#define LPFC_RPI_LOW_WATER_MARK …
#define LPFC_UNREG_FCF …
#define LPFC_SKIP_UNREG_FCF …
#define LPFC_FCF_REDISCOVER_WAIT_TMO …
#define LPFC_NEMBED_MBOX_SGL_CNT …
#define LPFC_HBA_HDWQ_MIN …
#define LPFC_HBA_HDWQ_MAX …
#define LPFC_HBA_HDWQ_DEF …
#define LPFC_IRQ_CHANN_MIN …
#define LPFC_IRQ_CHANN_MAX …
#define LPFC_IRQ_CHANN_DEF …
#define LPFC_FCP_MQ_THRESHOLD_MIN …
#define LPFC_FCP_MQ_THRESHOLD_MAX …
#define LPFC_FCP_MQ_THRESHOLD_DEF …
#define LPFC_FCOE_FCF_DEF_INDEX …
#define LPFC_FCOE_FCF_GET_FIRST …
#define LPFC_FCOE_FCF_NEXT_NONE …
#define LPFC_FCOE_NULL_VID …
#define LPFC_FCOE_IGNORE_VID …
#define LPFC_FCOE_FCF_MAC3 …
#define LPFC_FCOE_FCF_MAC4 …
#define LPFC_FCOE_FCF_MAC5 …
#define LPFC_FCOE_FCF_MAP0 …
#define LPFC_FCOE_FCF_MAP1 …
#define LPFC_FCOE_FCF_MAP2 …
#define LPFC_FCOE_MAX_RCV_SIZE …
#define LPFC_FCOE_FKA_ADV_PER …
#define LPFC_FCOE_FIP_PRIORITY …
#define sli4_sid_from_fc_hdr(fc_hdr) …
#define sli4_did_from_fc_hdr(fc_hdr) …
#define sli4_fctl_from_fc_hdr(fc_hdr) …
#define sli4_type_from_fc_hdr(fc_hdr) …
#define LPFC_FW_RESET_MAXIMUM_WAIT_10MS_CNT …
#define INT_FW_UPGRADE …
#define RUN_FW_UPGRADE …
enum lpfc_sli4_queue_type { … };
enum lpfc_sli4_queue_subtype { … };
struct lpfc_rqb { … };
enum lpfc_poll_mode { … };
struct lpfc_idle_stat { … };
struct lpfc_queue { … };
struct lpfc_sli4_link { … };
struct lpfc_fcf_rec { … };
struct lpfc_fcf_pri_rec { … };
struct lpfc_fcf_pri { … };
#define LPFC_SLI4_FCF_TBL_INDX_MAX …
struct lpfc_fcf { … };
#define LPFC_REGION23_SIGNATURE …
#define LPFC_REGION23_VERSION …
#define LPFC_REGION23_LAST_REC …
#define DRIVER_SPECIFIC_TYPE …
#define LINUX_DRIVER_ID …
#define PORT_STE_TYPE …
struct lpfc_fip_param_hdr { … };
struct lpfc_fcoe_params { … };
struct lpfc_fcf_conn_hdr { … };
struct lpfc_fcf_conn_rec { … };
struct lpfc_fcf_conn_entry { … };
struct lpfc_bmbx { … };
#define LPFC_EQE_SIZE …
#define LPFC_EQE_SIZE_4B …
#define LPFC_EQE_SIZE_16B …
#define LPFC_CQE_SIZE …
#define LPFC_WQE_SIZE …
#define LPFC_WQE128_SIZE …
#define LPFC_MQE_SIZE …
#define LPFC_RQE_SIZE …
#define LPFC_EQE_DEF_COUNT …
#define LPFC_CQE_DEF_COUNT …
#define LPFC_CQE_EXP_COUNT …
#define LPFC_WQE_DEF_COUNT …
#define LPFC_WQE_EXP_COUNT …
#define LPFC_MQE_DEF_COUNT …
#define LPFC_RQE_DEF_COUNT …
#define LPFC_QUEUE_NOARM …
#define LPFC_QUEUE_REARM …
#define SLI4_CT_RPI …
#define SLI4_CT_VPI …
#define SLI4_CT_VFI …
#define SLI4_CT_FCFI …
struct lpfc_max_cfg_param { … };
struct lpfc_hba;
#define LPFC_SLI4_HANDLER_NAME_SZ …
struct lpfc_hba_eq_hdl { … };
#define lpfc_get_eq_hdl(eqidx) …
#define lpfc_get_aff_mask(eqidx) …
#define lpfc_get_irq(eqidx) …
struct lpfc_bbscn_params { … };
struct lpfc_pc_sli4_params { … };
#define LPFC_CQ_4K_PAGE_SZ …
#define LPFC_CQ_16K_PAGE_SZ …
#define LPFC_WQ_4K_PAGE_SZ …
#define LPFC_WQ_16K_PAGE_SZ …
struct lpfc_iov { … };
struct lpfc_sli4_lnk_info { … };
#define LPFC_SLI4_HANDLER_CNT …
struct lpfc_vector_map_info { … };
#define LPFC_VECTOR_MAP_EMPTY …
#define LPFC_IRQ_EMPTY …
#define XRI_BATCH …
struct lpfc_pbl_pool { … };
struct lpfc_pvt_pool { … };
struct lpfc_multixri_pool { … };
struct lpfc_fc4_ctrl_stat { … };
#ifdef LPFC_HDWQ_LOCK_STAT
struct lpfc_lock_stat {
uint32_t alloc_xri_get;
uint32_t alloc_xri_put;
uint32_t free_xri;
uint32_t wq_access;
uint32_t alloc_pvt_pool;
uint32_t mv_from_pvt_pool;
uint32_t mv_to_pub_pool;
uint32_t mv_to_pvt_pool;
uint32_t free_pub_pool;
uint32_t free_pvt_pool;
};
#endif
struct lpfc_eq_intr_info { … };
struct lpfc_sli4_hdw_queue { … };
#ifdef LPFC_HDWQ_LOCK_STAT
#define lpfc_qp_spin_lock_irqsave …
#define lpfc_qp_spin_lock …
#else
#define lpfc_qp_spin_lock_irqsave(lock, flag, qp, lstat) …
#define lpfc_qp_spin_lock(lock, qp, lstat) …
#endif
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
struct lpfc_hdwq_stat { … };
#endif
struct lpfc_sli4_hba { … };
enum lpfc_sge_type { … };
enum lpfc_sgl_state { … };
struct lpfc_sglq { … };
struct lpfc_rpi_hdr { … };
struct lpfc_rsrc_blks { … };
struct lpfc_rdp_context { … };
struct lpfc_lcb_context { … };
int lpfc_pci_function_reset(struct lpfc_hba *);
int lpfc_sli4_pdev_status_reg_wait(struct lpfc_hba *);
int lpfc_sli4_hba_setup(struct lpfc_hba *);
int lpfc_sli4_config(struct lpfc_hba *, struct lpfcMboxq *, uint8_t,
uint8_t, uint32_t, bool);
void lpfc_sli4_mbox_cmd_free(struct lpfc_hba *, struct lpfcMboxq *);
void lpfc_sli4_mbx_sge_set(struct lpfcMboxq *, uint32_t, dma_addr_t, uint32_t);
void lpfc_sli4_mbx_sge_get(struct lpfcMboxq *, uint32_t,
struct lpfc_mbx_sge *);
int lpfc_sli4_mbx_read_fcf_rec(struct lpfc_hba *, struct lpfcMboxq *,
uint16_t);
void lpfc_sli4_hba_reset(struct lpfc_hba *);
struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *phba,
uint32_t page_size,
uint32_t entry_size,
uint32_t entry_count, int cpu);
void lpfc_sli4_queue_free(struct lpfc_queue *);
int lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint32_t);
void lpfc_modify_hba_eq_delay(struct lpfc_hba *phba, uint32_t startq,
uint32_t numq, uint32_t usdelay);
int lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *, uint32_t, uint32_t);
int lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
struct lpfc_sli4_hdw_queue *hdwq, uint32_t type,
uint32_t subtype);
int32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *, uint32_t);
int lpfc_wq_create(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *, uint32_t);
int lpfc_rq_create(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *, struct lpfc_queue *, uint32_t);
int lpfc_mrq_create(struct lpfc_hba *phba, struct lpfc_queue **hrqp,
struct lpfc_queue **drqp, struct lpfc_queue **cqp,
uint32_t subtype);
int lpfc_eq_destroy(struct lpfc_hba *, struct lpfc_queue *);
int lpfc_cq_destroy(struct lpfc_hba *, struct lpfc_queue *);
int lpfc_mq_destroy(struct lpfc_hba *, struct lpfc_queue *);
int lpfc_wq_destroy(struct lpfc_hba *, struct lpfc_queue *);
int lpfc_rq_destroy(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *);
int lpfc_sli4_queue_setup(struct lpfc_hba *);
void lpfc_sli4_queue_unset(struct lpfc_hba *);
int lpfc_sli4_post_sgl(struct lpfc_hba *, dma_addr_t, dma_addr_t, uint16_t);
int lpfc_repost_io_sgl_list(struct lpfc_hba *phba);
uint16_t lpfc_sli4_next_xritag(struct lpfc_hba *);
void lpfc_sli4_free_xri(struct lpfc_hba *, int);
int lpfc_sli4_post_async_mbox(struct lpfc_hba *);
struct lpfc_cq_event *__lpfc_sli4_cq_event_alloc(struct lpfc_hba *);
struct lpfc_cq_event *lpfc_sli4_cq_event_alloc(struct lpfc_hba *);
void __lpfc_sli4_cq_event_release(struct lpfc_hba *, struct lpfc_cq_event *);
void lpfc_sli4_cq_event_release(struct lpfc_hba *, struct lpfc_cq_event *);
int lpfc_sli4_init_rpi_hdrs(struct lpfc_hba *);
int lpfc_sli4_post_rpi_hdr(struct lpfc_hba *, struct lpfc_rpi_hdr *);
int lpfc_sli4_post_all_rpi_hdrs(struct lpfc_hba *);
struct lpfc_rpi_hdr *lpfc_sli4_create_rpi_hdr(struct lpfc_hba *);
void lpfc_sli4_remove_rpi_hdrs(struct lpfc_hba *);
int lpfc_sli4_alloc_rpi(struct lpfc_hba *);
void lpfc_sli4_free_rpi(struct lpfc_hba *, int);
void lpfc_sli4_remove_rpis(struct lpfc_hba *);
void lpfc_sli4_async_event_proc(struct lpfc_hba *);
void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *);
int lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
void (*cmpl)(struct lpfc_hba *, LPFC_MBOXQ_t *),
struct lpfc_iocbq *iocbq);
void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba);
void lpfc_sli4_nvme_pci_offline_aborted(struct lpfc_hba *phba,
struct lpfc_io_buf *lpfc_ncmd);
void lpfc_sli4_nvme_xri_aborted(struct lpfc_hba *phba,
struct sli4_wcqe_xri_aborted *axri,
struct lpfc_io_buf *lpfc_ncmd);
void lpfc_sli4_io_xri_aborted(struct lpfc_hba *phba,
struct sli4_wcqe_xri_aborted *axri, int idx);
void lpfc_sli4_nvmet_xri_aborted(struct lpfc_hba *phba,
struct sli4_wcqe_xri_aborted *axri);
void lpfc_sli4_els_xri_aborted(struct lpfc_hba *,
struct sli4_wcqe_xri_aborted *);
void lpfc_sli4_vport_delete_els_xri_aborted(struct lpfc_vport *);
void lpfc_sli4_vport_delete_fcp_xri_aborted(struct lpfc_vport *);
int lpfc_sli4_brdreset(struct lpfc_hba *);
int lpfc_sli4_add_fcf_record(struct lpfc_hba *, struct fcf_record *);
void lpfc_sli_remove_dflt_fcf(struct lpfc_hba *);
int lpfc_sli4_get_els_iocb_cnt(struct lpfc_hba *);
int lpfc_sli4_get_iocb_cnt(struct lpfc_hba *phba);
int lpfc_sli4_init_vpi(struct lpfc_vport *);
void lpfc_sli4_eq_clr_intr(struct lpfc_queue *);
void lpfc_sli4_write_cq_db(struct lpfc_hba *phba, struct lpfc_queue *q,
uint32_t count, bool arm);
void lpfc_sli4_write_eq_db(struct lpfc_hba *phba, struct lpfc_queue *q,
uint32_t count, bool arm);
void lpfc_sli4_if6_eq_clr_intr(struct lpfc_queue *q);
void lpfc_sli4_if6_write_cq_db(struct lpfc_hba *phba, struct lpfc_queue *q,
uint32_t count, bool arm);
void lpfc_sli4_if6_write_eq_db(struct lpfc_hba *phba, struct lpfc_queue *q,
uint32_t count, bool arm);
void lpfc_sli4_fcfi_unreg(struct lpfc_hba *, uint16_t);
int lpfc_sli4_fcf_scan_read_fcf_rec(struct lpfc_hba *, uint16_t);
int lpfc_sli4_fcf_rr_read_fcf_rec(struct lpfc_hba *, uint16_t);
int lpfc_sli4_read_fcf_rec(struct lpfc_hba *, uint16_t);
void lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_mbx_cmpl_fcf_rr_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_mbx_cmpl_read_fcf_rec(struct lpfc_hba *, LPFC_MBOXQ_t *);
int lpfc_sli4_unregister_fcf(struct lpfc_hba *);
int lpfc_sli4_post_status_check(struct lpfc_hba *);
uint8_t lpfc_sli_config_mbox_subsys_get(struct lpfc_hba *, LPFC_MBOXQ_t *);
uint8_t lpfc_sli_config_mbox_opcode_get(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_sli4_ras_dma_free(struct lpfc_hba *phba);
struct sli4_hybrid_sgl *lpfc_get_sgl_per_hdwq(struct lpfc_hba *phba,
struct lpfc_io_buf *buf);
struct fcp_cmd_rsp_buf *lpfc_get_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
struct lpfc_io_buf *buf);
int lpfc_put_sgl_per_hdwq(struct lpfc_hba *phba, struct lpfc_io_buf *buf);
int lpfc_put_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
struct lpfc_io_buf *buf);
void lpfc_free_sgl_per_hdwq(struct lpfc_hba *phba,
struct lpfc_sli4_hdw_queue *hdwq);
void lpfc_free_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
struct lpfc_sli4_hdw_queue *hdwq);
static inline void *lpfc_sli4_qe(struct lpfc_queue *q, uint16_t idx)
{ … }
static inline bool
lpfc_sli4_unrecoverable_port(struct lpfc_register *portstat_reg)
{ … }