Lines Matching defs:lpfc_hba

652 struct lpfc_hba {  struct
655 (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, argument
658 (struct lpfc_hba *, struct lpfc_io_buf *); argument
660 (struct lpfc_hba *, struct lpfc_io_buf *); argument
662 (struct lpfc_hba *, struct lpfc_io_buf *); argument
664 (struct lpfc_hba *); argument
671 (struct lpfc_hba *, uint32_t, argument
673 void (*__lpfc_sli_release_iocbq)(struct lpfc_hba *, argument
675 int (*lpfc_hba_down_post)(struct lpfc_hba *phba); argument
679 (struct lpfc_hba *, struct lpfc_iocbq *, struct lpfc_iocbq *); argument
683 (struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); argument
687 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, argument
692 (struct lpfc_hba *, uint32_t, struct hbq_dmabuf *); argument
694 (struct lpfc_hba *); argument
696 (struct lpfc_hba *, uint32_t); argument
698 (struct lpfc_hba *); argument
700 (struct lpfc_hba *); argument
701 int (*lpfc_hba_init_link) argument
703 int (*lpfc_hba_down_link) argument
706 (struct lpfc_hba *); argument
709 (struct lpfc_hba *, struct lpfc_io_buf *); argument
713 struct lpfc_epd_pool epd_pool;
716 struct lpfc_sli4_hba sli4_hba;
718 struct workqueue_struct *wq;
719 struct delayed_work eq_delay_work;
722 struct delayed_work idle_stat_delay_work;
724 struct lpfc_sli sli;
725 uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
726 uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
727 uint32_t sli3_options; /* Mask of enabled SLI3 options */
736 uint32_t iocb_cmd_size;
737 uint32_t iocb_rsp_size;
739 struct lpfc_trunk_link trunk_link;
740 enum hba_state link_state;
741 uint32_t link_flag; /* link state flags */
750 uint32_t hba_flag; /* hba generic flags */
775 struct completion *fw_dump_cmpl; /* cmpl event tracker for fw_dump */
776 uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
777 struct lpfc_dmabuf slim2p;
779 MAILBOX_t *mbox;
780 uint32_t *mbox_ext;
781 struct lpfc_mbox_ext_buf_ctx mbox_ext_buf_ctx;
782 uint32_t ha_copy;
783 struct _PCB *pcb;
784 struct _IOCB *IOCBs;
786 struct lpfc_dmabuf hbqslimp;
788 uint16_t pci_cfg_value;
790 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
792 uint32_t fc_eventTag; /* event tag for link attention */
793 uint32_t link_events;
796 uint32_t fc_pref_DID; /* preferred D_ID */
797 uint8_t fc_pref_ALPA; /* preferred AL_PA */
798 uint32_t fc_edtovResol; /* E_D_TOV timer resolution */
799 uint32_t fc_edtov; /* E_D_TOV timer value */
800 uint32_t fc_arbtov; /* ARB_TOV timer value */
801 uint32_t fc_ratov; /* R_A_TOV timer value */
802 uint32_t fc_rttov; /* R_T_TOV timer value */
803 uint32_t fc_altov; /* AL_TOV timer value */
804 uint32_t fc_crtov; /* C_R_TOV timer value */
806 struct serv_parm fc_fabparam; /* fabric service parameters buffer */
807 uint8_t alpa_map[128]; /* AL_PA map from READ_LA */
809 uint32_t lmt;
811 uint32_t fc_topology; /* link topology, from LINK INIT */
812 uint32_t fc_topology_changed; /* link topology, from LINK INIT */
814 struct lpfc_stats fc_stat;
816 struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
817 uint32_t nport_event_cnt; /* timestamp for nlplist entry */
819 uint8_t wwnn[8];
820 uint8_t wwpn[8];
821 uint32_t RandomData[7];
822 uint8_t fcp_embed_io;
823 uint8_t nvme_support; /* Firmware supports NVME */
824 uint8_t nvmet_support; /* driver supports NVMET */
826 uint8_t mds_diags_support;
827 uint8_t bbcredit_support;
828 uint8_t enab_exp_wqcq_pages;
829 u8 nsler; /* Firmware supports FC-NVMe-2 SLER */
832 uint32_t cfg_ack0;
833 uint32_t cfg_xri_rebalancing;
834 uint32_t cfg_xpsgl;
835 uint32_t cfg_enable_npiv;
836 uint32_t cfg_enable_rrq;
837 uint32_t cfg_topology;
838 uint32_t cfg_link_speed;
841 uint32_t cfg_fcf_failover_policy;
842 uint32_t cfg_fcp_io_sched;
843 uint32_t cfg_ns_query;
844 uint32_t cfg_fcp2_no_tgt_reset;
845 uint32_t cfg_cr_delay;
846 uint32_t cfg_cr_count;
847 uint32_t cfg_multi_ring_support;
848 uint32_t cfg_multi_ring_rctl;
849 uint32_t cfg_multi_ring_type;
850 uint32_t cfg_poll;
851 uint32_t cfg_poll_tmo;
852 uint32_t cfg_task_mgmt_tmo;
853 uint32_t cfg_use_msi;
854 uint32_t cfg_auto_imax;
855 uint32_t cfg_fcp_imax;
856 uint32_t cfg_force_rscn;
857 uint32_t cfg_cq_poll_threshold;
858 uint32_t cfg_cq_max_proc_limit;
859 uint32_t cfg_fcp_cpu_map;
860 uint32_t cfg_fcp_mq_threshold;
861 uint32_t cfg_hdw_queue;
862 uint32_t cfg_irq_chann;
863 uint32_t cfg_suppress_rsp;
864 uint32_t cfg_nvme_oas;
865 uint32_t cfg_nvme_embed_cmd;
866 uint32_t cfg_nvmet_mrq_post;
867 uint32_t cfg_nvmet_mrq;
868 uint32_t cfg_enable_nvmet;
869 uint32_t cfg_nvme_enable_fb;
870 uint32_t cfg_nvmet_fb_size;
871 uint32_t cfg_total_seg_cnt;
872 uint32_t cfg_sg_seg_cnt;
873 uint32_t cfg_nvme_seg_cnt;
874 uint32_t cfg_scsi_seg_cnt;
875 uint32_t cfg_sg_dma_buf_size;
876 uint64_t cfg_soft_wwnn;
877 uint64_t cfg_soft_wwpn;
878 uint32_t cfg_hba_queue_depth;
879 uint32_t cfg_enable_hba_reset;
880 uint32_t cfg_enable_hba_heartbeat;
881 uint32_t cfg_fof;
882 uint32_t cfg_EnableXLane;
883 uint8_t cfg_oas_tgt_wwpn[8];
884 uint8_t cfg_oas_vpt_wwpn[8];
885 uint32_t cfg_oas_lun_state;
888 uint32_t cfg_oas_lun_status;
890 uint32_t cfg_oas_flags;
894 uint32_t cfg_oas_priority;
895 uint32_t cfg_XLanePriority;
896 uint32_t cfg_enable_bg;
897 uint32_t cfg_prot_mask;
898 uint32_t cfg_prot_guard;
899 uint32_t cfg_hostmem_hgp;
900 uint32_t cfg_log_verbose;
901 uint32_t cfg_enable_fc4_type;
912 uint32_t cfg_aer_support;
913 uint32_t cfg_sriov_nr_virtfn;
914 uint32_t cfg_request_firmware_upgrade;
915 uint32_t cfg_suppress_link_up;
916 uint32_t cfg_rrq_xri_bitmap_sz;
917 uint32_t cfg_delay_discovery;
918 uint32_t cfg_sli_mode;
922 uint32_t cfg_fdmi_on;
925 uint32_t cfg_enable_SmartSAN;
926 uint32_t cfg_enable_mds_diags;
927 uint32_t cfg_ras_fwlog_level;
928 uint32_t cfg_ras_fwlog_buffsize;
929 uint32_t cfg_ras_fwlog_func;
930 uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */
931 uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */
932 uint32_t cfg_enable_pbde;
933 struct nvmet_fc_target_port *targetport;
934 lpfc_vpd_t vpd; /* vital product data */
936 struct pci_dev *pcidev;
937 struct list_head work_list;
938 uint32_t work_ha; /* Host Attention Bits for WT */
939 uint32_t work_ha_mask; /* HA Bits owned by WT */
940 uint32_t work_hs; /* HS stored in case of ERRAT */
941 uint32_t work_status[2]; /* Extra status from SLIM */
943 wait_queue_head_t work_waitq;
944 struct task_struct *worker_thread;
945 unsigned long data_flags;
946 uint32_t border_sge_num;
948 uint32_t hbq_in_use; /* HBQs in use flag */
949 uint32_t hbq_count; /* Count of configured HBQs */
950 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
952 atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
953 atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
955 phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
956 phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
957 phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
958 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
960 void __iomem *ctrl_regs_memmap_p;/* Kernel memory mapped address for
963 void __iomem *pci_bar0_memmap_p; /* Kernel memory mapped address for
965 void __iomem *pci_bar2_memmap_p; /* Kernel memory mapped address for
967 void __iomem *pci_bar4_memmap_p; /* Kernel memory mapped address for
972 void __iomem *MBslimaddr; /* virtual address for mbox cmds */
973 void __iomem *HAregaddr; /* virtual address for host attn reg */
974 void __iomem *CAregaddr; /* virtual address for chip attn reg */
975 void __iomem *HSregaddr; /* virtual address for host status
977 void __iomem *HCregaddr; /* virtual address for host ctl reg */
979 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
980 struct lpfc_pgp *port_gp;
981 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
982 uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
984 int brd_no; /* FC board number */
985 char SerialNumber[32]; /* adapter Serial Number */
986 char OptionROMVersion[32]; /* adapter BIOS / Fcode version */
987 char BIOSVersion[16]; /* Boot BIOS version */
988 char ModelDesc[256]; /* Model Description */
989 char ModelName[80]; /* Model Name */
990 char ProgramType[256]; /* Program Type */
991 char Port[20]; /* Port No */
992 uint8_t vpd_flag; /* VPD data flag */
1000 uint8_t soft_wwn_enable;
1002 struct timer_list fcp_poll_timer;
1003 struct timer_list eratt_poll;
1004 uint32_t eratt_poll_interval;
1006 uint64_t bg_guard_err_cnt;
1007 uint64_t bg_apptag_err_cnt;
1008 uint64_t bg_reftag_err_cnt;
1011 spinlock_t scsi_buf_list_get_lock; /* SCSI buf alloc list lock */
1012 spinlock_t scsi_buf_list_put_lock; /* SCSI buf free list lock */
1013 struct list_head lpfc_scsi_buf_list_get;
1014 struct list_head lpfc_scsi_buf_list_put;
1015 uint32_t total_scsi_bufs;
1016 struct list_head lpfc_iocb_list;
1017 uint32_t total_iocbq_bufs;
1018 struct list_head active_rrq_list;
1019 spinlock_t hbalock;
1022 struct dma_pool *lpfc_sg_dma_buf_pool;
1023 struct dma_pool *lpfc_mbuf_pool;
1024 struct dma_pool *lpfc_hrb_pool; /* header receive buffer pool */
1025 struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
1026 struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
1027 struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
1028 struct dma_pool *lpfc_cmd_rsp_buf_pool;
1029 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
1031 mempool_t *mbox_mem_pool;
1032 mempool_t *nlp_mem_pool;
1033 mempool_t *rrq_pool;
1034 mempool_t *active_rrq_pool;
1036 struct fc_host_statistics link_stats;
1037 enum lpfc_irq_chann_mode irq_chann_mode;
1038 enum intr_type_t intr_type;
1039 uint32_t intr_mode;
1041 struct list_head port_list;
1042 spinlock_t port_list_lock; /* lock for port_list mutations */
1043 struct lpfc_vport *pport; /* physical lpfc_vport pointer */
1044 uint16_t max_vpi; /* Maximum virtual nports */
1047 uint16_t max_vports; /*
1053 uint16_t vpi_base;
1054 uint16_t vfi_base;
1055 unsigned long *vpi_bmask; /* vpi allocation table */
1056 uint16_t *vpi_ids;
1057 uint16_t vpi_count;
1058 struct list_head lpfc_vpi_blk_list;
1061 struct list_head fabric_iocb_list;
1062 atomic_t fabric_iocb_count;
1063 struct timer_list fabric_block_timer;
1064 unsigned long bit_flags;
1066 atomic_t num_rsrc_err;
1067 atomic_t num_cmd_success;
1068 unsigned long last_rsrc_error_time;
1069 unsigned long last_ramp_down_time;
1071 struct dentry *hba_debugfs_root;
1072 atomic_t debugfs_vport_count;
1073 struct dentry *debug_multixri_pools;
1074 struct dentry *debug_hbqinfo;
1075 struct dentry *debug_dumpHostSlim;
1076 struct dentry *debug_dumpHBASlim;
1077 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1078 struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1079 struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1080 struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1081 struct dentry *debug_writeApp; /* inject write app_tag errors */
1082 struct dentry *debug_writeRef; /* inject write ref_tag errors */
1083 struct dentry *debug_readGuard; /* inject read guard_tag errors */
1084 struct dentry *debug_readApp; /* inject read app_tag errors */
1085 struct dentry *debug_readRef; /* inject read ref_tag errors */
1087 struct dentry *debug_nvmeio_trc;
1088 struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1089 struct dentry *debug_hdwqinfo;
1091 struct dentry *debug_lockstat;
1093 struct dentry *debug_ras_log;
1094 atomic_t nvmeio_trc_cnt;
1095 uint32_t nvmeio_trc_size;
1096 uint32_t nvmeio_trc_output_idx;
1099 uint32_t lpfc_injerr_wgrd_cnt;
1100 uint32_t lpfc_injerr_wapp_cnt;
1101 uint32_t lpfc_injerr_wref_cnt;
1102 uint32_t lpfc_injerr_rgrd_cnt;
1103 uint32_t lpfc_injerr_rapp_cnt;
1104 uint32_t lpfc_injerr_rref_cnt;
1105 uint32_t lpfc_injerr_nportid;
1106 struct lpfc_name lpfc_injerr_wwpn;
1107 sector_t lpfc_injerr_lba;
1110 struct dentry *debug_slow_ring_trc;
1111 struct lpfc_debugfs_trc *slow_ring_trc;
1112 atomic_t slow_ring_trc_cnt;
1114 struct dentry *idiag_root;
1115 struct dentry *idiag_pci_cfg;
1116 struct dentry *idiag_bar_acc;
1117 struct dentry *idiag_que_info;
1118 struct dentry *idiag_que_acc;
1119 struct dentry *idiag_drb_acc;
1120 struct dentry *idiag_ctl_acc;
1121 struct dentry *idiag_mbx_acc;
1122 struct dentry *idiag_ext_acc;
1123 uint8_t lpfc_idiag_last_eq;
1125 uint16_t nvmeio_trc_on;
1128 struct list_head elsbuf;
1129 int elsbuf_cnt;
1130 int elsbuf_prev_cnt;
1132 uint8_t temp_sensor_support;
1134 unsigned long last_completion_time;
1135 unsigned long skipped_hb;
1136 struct timer_list hb_tmofunc;
1137 uint8_t hb_outstanding;
1138 struct timer_list rrq_tmr;
1139 enum hba_temp_state over_temp_state;
1141 spinlock_t ndlp_lock;
1147 uint32_t buffer_tag_count;
1148 int wait_4_mlo_maint_flg;
1149 wait_queue_head_t wait_4_mlo_m_q;
1154 uint8_t bucket_type;
1155 uint32_t bucket_base;
1156 uint32_t bucket_step;
1160 atomic_t fast_event_count;
1161 uint32_t fcoe_eventtag;
1162 uint32_t fcoe_eventtag_at_fcf_scan;
1163 uint32_t fcoe_cvl_eventtag;
1164 uint32_t fcoe_cvl_eventtag_attn;
1165 struct lpfc_fcf fcf;
1166 uint8_t fc_map[3];
1167 uint8_t valid_vlan;
1168 uint16_t vlan_id;
1169 struct list_head fcf_conn_rec_list;
1171 bool defer_flogi_acc_flag;
1172 uint16_t defer_flogi_acc_rx_id;
1173 uint16_t defer_flogi_acc_ox_id;
1175 spinlock_t ct_ev_lock; /* synchronize access to ct_ev_waiters */
1176 struct list_head ct_ev_waiters;
1177 struct unsol_rcv_ct_ctx ct_ctx[LPFC_CT_CTX_MAX];
1178 uint32_t ctx_idx;
1181 struct lpfc_ras_fwlog ras_fwlog;
1183 uint8_t menlo_flag; /* menlo generic flags */
1185 uint32_t iocb_cnt;
1186 uint32_t iocb_max;
1187 atomic_t sdev_cnt;
1188 spinlock_t devicelock; /* lock for luns list */
1189 mempool_t *device_data_mem_pool;
1190 struct list_head luns;
1201 uint16_t sfp_alarm;
1202 uint16_t sfp_warning;
1205 uint16_t hdwqstat_on;
1210 uint16_t ktime_on;
1211 uint64_t ktime_data_samples;
1212 uint64_t ktime_status_samples;
1213 uint64_t ktime_last_cmd;
1214 uint64_t ktime_seg1_total;
1215 uint64_t ktime_seg1_min;
1216 uint64_t ktime_seg1_max;
1217 uint64_t ktime_seg2_total;
1218 uint64_t ktime_seg2_min;
1219 uint64_t ktime_seg2_max;
1220 uint64_t ktime_seg3_total;
1221 uint64_t ktime_seg3_min;
1222 uint64_t ktime_seg3_max;
1223 uint64_t ktime_seg4_total;
1224 uint64_t ktime_seg4_min;
1225 uint64_t ktime_seg4_max;
1226 uint64_t ktime_seg5_total;
1227 uint64_t ktime_seg5_min;
1228 uint64_t ktime_seg5_max;
1229 uint64_t ktime_seg6_total;
1230 uint64_t ktime_seg6_min;
1231 uint64_t ktime_seg6_max;
1232 uint64_t ktime_seg7_total;
1233 uint64_t ktime_seg7_min;
1234 uint64_t ktime_seg7_max;
1235 uint64_t ktime_seg8_total;
1236 uint64_t ktime_seg8_min;
1237 uint64_t ktime_seg8_max;
1238 uint64_t ktime_seg9_total;
1239 uint64_t ktime_seg9_min;
1240 uint64_t ktime_seg9_max;
1241 uint64_t ktime_seg10_total;
1242 uint64_t ktime_seg10_min;
1243 uint64_t ktime_seg10_max;
1246 struct hlist_node cpuhp; /* used for cpuhp per hba callback */
1247 struct timer_list cpuhp_poll_timer;
1248 struct list_head poll_list; /* slowpath eq polling list */
1272 lpfc_set_loopback_flag(struct lpfc_hba *phba) in lpfc_set_loopback_flag() argument