Lines Matching defs:lpfc_hba
651 struct lpfc_hba { struct
654 (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, argument
657 (struct lpfc_hba *, struct lpfc_io_buf *); argument
659 (struct lpfc_hba *, struct lpfc_io_buf *); argument
661 (struct lpfc_hba *, struct lpfc_io_buf *); argument
663 (struct lpfc_hba *); argument
670 (struct lpfc_hba *, uint32_t, argument
672 void (*__lpfc_sli_release_iocbq)(struct lpfc_hba *, argument
674 int (*lpfc_hba_down_post)(struct lpfc_hba *phba); argument
678 (struct lpfc_hba *, struct lpfc_iocbq *, struct lpfc_iocbq *); argument
682 (struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); argument
686 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, argument
691 (struct lpfc_hba *, uint32_t, struct hbq_dmabuf *); argument
693 (struct lpfc_hba *); argument
695 (struct lpfc_hba *, uint32_t); argument
697 (struct lpfc_hba *); argument
699 (struct lpfc_hba *); argument
700 int (*lpfc_hba_init_link) argument
702 int (*lpfc_hba_down_link) argument
705 (struct lpfc_hba *); argument
708 (struct lpfc_hba *, struct lpfc_io_buf *); argument
712 struct lpfc_epd_pool epd_pool;
715 struct lpfc_sli4_hba sli4_hba;
717 struct workqueue_struct *wq;
718 struct delayed_work eq_delay_work;
721 struct delayed_work idle_stat_delay_work;
723 struct lpfc_sli sli;
724 uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
725 uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
726 uint32_t sli3_options; /* Mask of enabled SLI3 options */
735 uint32_t iocb_cmd_size;
736 uint32_t iocb_rsp_size;
738 struct lpfc_trunk_link trunk_link;
739 enum hba_state link_state;
740 uint32_t link_flag; /* link state flags */
749 uint32_t hba_flag; /* hba generic flags */
775 uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
776 struct lpfc_dmabuf slim2p;
778 MAILBOX_t *mbox;
779 uint32_t *mbox_ext;
780 struct lpfc_mbox_ext_buf_ctx mbox_ext_buf_ctx;
781 uint32_t ha_copy;
782 struct _PCB *pcb;
783 struct _IOCB *IOCBs;
785 struct lpfc_dmabuf hbqslimp;
787 uint16_t pci_cfg_value;
789 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
791 uint32_t fc_eventTag; /* event tag for link attention */
792 uint32_t link_events;
795 uint32_t fc_pref_DID; /* preferred D_ID */
796 uint8_t fc_pref_ALPA; /* preferred AL_PA */
797 uint32_t fc_edtovResol; /* E_D_TOV timer resolution */
798 uint32_t fc_edtov; /* E_D_TOV timer value */
799 uint32_t fc_arbtov; /* ARB_TOV timer value */
800 uint32_t fc_ratov; /* R_A_TOV timer value */
801 uint32_t fc_rttov; /* R_T_TOV timer value */
802 uint32_t fc_altov; /* AL_TOV timer value */
803 uint32_t fc_crtov; /* C_R_TOV timer value */
805 struct serv_parm fc_fabparam; /* fabric service parameters buffer */
806 uint8_t alpa_map[128]; /* AL_PA map from READ_LA */
808 uint32_t lmt;
810 uint32_t fc_topology; /* link topology, from LINK INIT */
811 uint32_t fc_topology_changed; /* link topology, from LINK INIT */
813 struct lpfc_stats fc_stat;
815 struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
816 uint32_t nport_event_cnt; /* timestamp for nlplist entry */
818 uint8_t wwnn[8];
819 uint8_t wwpn[8];
820 uint32_t RandomData[7];
821 uint8_t fcp_embed_io;
822 uint8_t nvme_support; /* Firmware supports NVME */
823 uint8_t nvmet_support; /* driver supports NVMET */
825 uint8_t mds_diags_support;
826 uint8_t bbcredit_support;
827 uint8_t enab_exp_wqcq_pages;
828 u8 nsler; /* Firmware supports FC-NVMe-2 SLER */
831 uint32_t cfg_ack0;
832 uint32_t cfg_xri_rebalancing;
833 uint32_t cfg_xpsgl;
834 uint32_t cfg_enable_npiv;
835 uint32_t cfg_enable_rrq;
836 uint32_t cfg_topology;
837 uint32_t cfg_link_speed;
840 uint32_t cfg_fcf_failover_policy;
841 uint32_t cfg_fcp_io_sched;
842 uint32_t cfg_ns_query;
843 uint32_t cfg_fcp2_no_tgt_reset;
844 uint32_t cfg_cr_delay;
845 uint32_t cfg_cr_count;
846 uint32_t cfg_multi_ring_support;
847 uint32_t cfg_multi_ring_rctl;
848 uint32_t cfg_multi_ring_type;
849 uint32_t cfg_poll;
850 uint32_t cfg_poll_tmo;
851 uint32_t cfg_task_mgmt_tmo;
852 uint32_t cfg_use_msi;
853 uint32_t cfg_auto_imax;
854 uint32_t cfg_fcp_imax;
855 uint32_t cfg_force_rscn;
856 uint32_t cfg_cq_poll_threshold;
857 uint32_t cfg_cq_max_proc_limit;
858 uint32_t cfg_fcp_cpu_map;
859 uint32_t cfg_fcp_mq_threshold;
860 uint32_t cfg_hdw_queue;
861 uint32_t cfg_irq_chann;
862 uint32_t cfg_suppress_rsp;
863 uint32_t cfg_nvme_oas;
864 uint32_t cfg_nvme_embed_cmd;
865 uint32_t cfg_nvmet_mrq_post;
866 uint32_t cfg_nvmet_mrq;
867 uint32_t cfg_enable_nvmet;
868 uint32_t cfg_nvme_enable_fb;
869 uint32_t cfg_nvmet_fb_size;
870 uint32_t cfg_total_seg_cnt;
871 uint32_t cfg_sg_seg_cnt;
872 uint32_t cfg_nvme_seg_cnt;
873 uint32_t cfg_scsi_seg_cnt;
874 uint32_t cfg_sg_dma_buf_size;
875 uint64_t cfg_soft_wwnn;
876 uint64_t cfg_soft_wwpn;
877 uint32_t cfg_hba_queue_depth;
878 uint32_t cfg_enable_hba_reset;
879 uint32_t cfg_enable_hba_heartbeat;
880 uint32_t cfg_fof;
881 uint32_t cfg_EnableXLane;
882 uint8_t cfg_oas_tgt_wwpn[8];
883 uint8_t cfg_oas_vpt_wwpn[8];
884 uint32_t cfg_oas_lun_state;
887 uint32_t cfg_oas_lun_status;
889 uint32_t cfg_oas_flags;
893 uint32_t cfg_oas_priority;
894 uint32_t cfg_XLanePriority;
895 uint32_t cfg_enable_bg;
896 uint32_t cfg_prot_mask;
897 uint32_t cfg_prot_guard;
898 uint32_t cfg_hostmem_hgp;
899 uint32_t cfg_log_verbose;
900 uint32_t cfg_enable_fc4_type;
901 uint32_t cfg_aer_support;
902 uint32_t cfg_sriov_nr_virtfn;
903 uint32_t cfg_request_firmware_upgrade;
904 uint32_t cfg_suppress_link_up;
905 uint32_t cfg_rrq_xri_bitmap_sz;
906 uint32_t cfg_delay_discovery;
907 uint32_t cfg_sli_mode;
911 uint32_t cfg_fdmi_on;
914 uint32_t cfg_enable_SmartSAN;
915 uint32_t cfg_enable_mds_diags;
916 uint32_t cfg_ras_fwlog_level;
917 uint32_t cfg_ras_fwlog_buffsize;
918 uint32_t cfg_ras_fwlog_func;
919 uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */
920 uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */
924 uint32_t cfg_enable_pbde;
925 struct nvmet_fc_target_port *targetport;
926 lpfc_vpd_t vpd; /* vital product data */
928 struct pci_dev *pcidev;
929 struct list_head work_list;
930 uint32_t work_ha; /* Host Attention Bits for WT */
931 uint32_t work_ha_mask; /* HA Bits owned by WT */
932 uint32_t work_hs; /* HS stored in case of ERRAT */
933 uint32_t work_status[2]; /* Extra status from SLIM */
935 wait_queue_head_t work_waitq;
936 struct task_struct *worker_thread;
937 unsigned long data_flags;
938 uint32_t border_sge_num;
940 uint32_t hbq_in_use; /* HBQs in use flag */
941 uint32_t hbq_count; /* Count of configured HBQs */
942 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
944 atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
945 atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
947 phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
948 phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
949 phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
950 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
952 void __iomem *ctrl_regs_memmap_p;/* Kernel memory mapped address for
955 void __iomem *pci_bar0_memmap_p; /* Kernel memory mapped address for
957 void __iomem *pci_bar2_memmap_p; /* Kernel memory mapped address for
959 void __iomem *pci_bar4_memmap_p; /* Kernel memory mapped address for
964 void __iomem *MBslimaddr; /* virtual address for mbox cmds */
965 void __iomem *HAregaddr; /* virtual address for host attn reg */
966 void __iomem *CAregaddr; /* virtual address for chip attn reg */
967 void __iomem *HSregaddr; /* virtual address for host status
969 void __iomem *HCregaddr; /* virtual address for host ctl reg */
971 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
972 struct lpfc_pgp *port_gp;
973 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
974 uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
976 int brd_no; /* FC board number */
977 char SerialNumber[32]; /* adapter Serial Number */
978 char OptionROMVersion[32]; /* adapter BIOS / Fcode version */
979 char BIOSVersion[16]; /* Boot BIOS version */
980 char ModelDesc[256]; /* Model Description */
981 char ModelName[80]; /* Model Name */
982 char ProgramType[256]; /* Program Type */
983 char Port[20]; /* Port No */
984 uint8_t vpd_flag; /* VPD data flag */
992 uint8_t soft_wwn_enable;
994 struct timer_list fcp_poll_timer;
995 struct timer_list eratt_poll;
996 uint32_t eratt_poll_interval;
998 uint64_t bg_guard_err_cnt;
999 uint64_t bg_apptag_err_cnt;
1000 uint64_t bg_reftag_err_cnt;
1003 spinlock_t scsi_buf_list_get_lock; /* SCSI buf alloc list lock */
1004 spinlock_t scsi_buf_list_put_lock; /* SCSI buf free list lock */
1005 struct list_head lpfc_scsi_buf_list_get;
1006 struct list_head lpfc_scsi_buf_list_put;
1007 uint32_t total_scsi_bufs;
1008 struct list_head lpfc_iocb_list;
1009 uint32_t total_iocbq_bufs;
1010 struct list_head active_rrq_list;
1011 spinlock_t hbalock;
1014 struct dma_pool *lpfc_sg_dma_buf_pool;
1015 struct dma_pool *lpfc_mbuf_pool;
1016 struct dma_pool *lpfc_hrb_pool; /* header receive buffer pool */
1017 struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
1018 struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
1019 struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
1020 struct dma_pool *lpfc_cmd_rsp_buf_pool;
1021 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
1023 mempool_t *mbox_mem_pool;
1024 mempool_t *nlp_mem_pool;
1025 mempool_t *rrq_pool;
1026 mempool_t *active_rrq_pool;
1028 struct fc_host_statistics link_stats;
1029 enum lpfc_irq_chann_mode irq_chann_mode;
1030 enum intr_type_t intr_type;
1031 uint32_t intr_mode;
1033 struct list_head port_list;
1034 spinlock_t port_list_lock; /* lock for port_list mutations */
1035 struct lpfc_vport *pport; /* physical lpfc_vport pointer */
1036 uint16_t max_vpi; /* Maximum virtual nports */
1039 uint16_t max_vports; /*
1045 uint16_t vpi_base;
1046 uint16_t vfi_base;
1047 unsigned long *vpi_bmask; /* vpi allocation table */
1048 uint16_t *vpi_ids;
1049 uint16_t vpi_count;
1050 struct list_head lpfc_vpi_blk_list;
1053 struct list_head fabric_iocb_list;
1054 atomic_t fabric_iocb_count;
1055 struct timer_list fabric_block_timer;
1056 unsigned long bit_flags;
1058 atomic_t num_rsrc_err;
1059 atomic_t num_cmd_success;
1060 unsigned long last_rsrc_error_time;
1061 unsigned long last_ramp_down_time;
1063 struct dentry *hba_debugfs_root;
1064 atomic_t debugfs_vport_count;
1065 struct dentry *debug_multixri_pools;
1066 struct dentry *debug_hbqinfo;
1067 struct dentry *debug_dumpHostSlim;
1068 struct dentry *debug_dumpHBASlim;
1069 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1070 struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1071 struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1072 struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1073 struct dentry *debug_writeApp; /* inject write app_tag errors */
1074 struct dentry *debug_writeRef; /* inject write ref_tag errors */
1075 struct dentry *debug_readGuard; /* inject read guard_tag errors */
1076 struct dentry *debug_readApp; /* inject read app_tag errors */
1077 struct dentry *debug_readRef; /* inject read ref_tag errors */
1079 struct dentry *debug_nvmeio_trc;
1080 struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1081 struct dentry *debug_hdwqinfo;
1083 struct dentry *debug_lockstat;
1085 struct dentry *debug_ras_log;
1086 atomic_t nvmeio_trc_cnt;
1087 uint32_t nvmeio_trc_size;
1088 uint32_t nvmeio_trc_output_idx;
1091 uint32_t lpfc_injerr_wgrd_cnt;
1092 uint32_t lpfc_injerr_wapp_cnt;
1093 uint32_t lpfc_injerr_wref_cnt;
1094 uint32_t lpfc_injerr_rgrd_cnt;
1095 uint32_t lpfc_injerr_rapp_cnt;
1096 uint32_t lpfc_injerr_rref_cnt;
1097 uint32_t lpfc_injerr_nportid;
1098 struct lpfc_name lpfc_injerr_wwpn;
1099 sector_t lpfc_injerr_lba;
1102 struct dentry *debug_slow_ring_trc;
1103 struct lpfc_debugfs_trc *slow_ring_trc;
1104 atomic_t slow_ring_trc_cnt;
1106 struct dentry *idiag_root;
1107 struct dentry *idiag_pci_cfg;
1108 struct dentry *idiag_bar_acc;
1109 struct dentry *idiag_que_info;
1110 struct dentry *idiag_que_acc;
1111 struct dentry *idiag_drb_acc;
1112 struct dentry *idiag_ctl_acc;
1113 struct dentry *idiag_mbx_acc;
1114 struct dentry *idiag_ext_acc;
1115 uint8_t lpfc_idiag_last_eq;
1117 uint16_t nvmeio_trc_on;
1120 struct list_head elsbuf;
1121 int elsbuf_cnt;
1122 int elsbuf_prev_cnt;
1124 uint8_t temp_sensor_support;
1126 unsigned long last_completion_time;
1127 unsigned long skipped_hb;
1128 struct timer_list hb_tmofunc;
1129 uint8_t hb_outstanding;
1130 struct timer_list rrq_tmr;
1131 enum hba_temp_state over_temp_state;
1133 spinlock_t ndlp_lock;
1139 uint32_t buffer_tag_count;
1140 int wait_4_mlo_maint_flg;
1141 wait_queue_head_t wait_4_mlo_m_q;
1146 uint8_t bucket_type;
1147 uint32_t bucket_base;
1148 uint32_t bucket_step;
1152 atomic_t fast_event_count;
1153 uint32_t fcoe_eventtag;
1154 uint32_t fcoe_eventtag_at_fcf_scan;
1155 uint32_t fcoe_cvl_eventtag;
1156 uint32_t fcoe_cvl_eventtag_attn;
1157 struct lpfc_fcf fcf;
1158 uint8_t fc_map[3];
1159 uint8_t valid_vlan;
1160 uint16_t vlan_id;
1161 struct list_head fcf_conn_rec_list;
1163 bool defer_flogi_acc_flag;
1164 uint16_t defer_flogi_acc_rx_id;
1165 uint16_t defer_flogi_acc_ox_id;
1167 spinlock_t ct_ev_lock; /* synchronize access to ct_ev_waiters */
1168 struct list_head ct_ev_waiters;
1169 struct unsol_rcv_ct_ctx ct_ctx[LPFC_CT_CTX_MAX];
1170 uint32_t ctx_idx;
1173 struct lpfc_ras_fwlog ras_fwlog;
1175 uint8_t menlo_flag; /* menlo generic flags */
1177 uint32_t iocb_cnt;
1178 uint32_t iocb_max;
1179 atomic_t sdev_cnt;
1180 spinlock_t devicelock; /* lock for luns list */
1181 mempool_t *device_data_mem_pool;
1182 struct list_head luns;
1193 uint16_t sfp_alarm;
1194 uint16_t sfp_warning;
1197 uint16_t hdwqstat_on;
1202 uint16_t ktime_on;
1203 uint64_t ktime_data_samples;
1204 uint64_t ktime_status_samples;
1205 uint64_t ktime_last_cmd;
1206 uint64_t ktime_seg1_total;
1207 uint64_t ktime_seg1_min;
1208 uint64_t ktime_seg1_max;
1209 uint64_t ktime_seg2_total;
1210 uint64_t ktime_seg2_min;
1211 uint64_t ktime_seg2_max;
1212 uint64_t ktime_seg3_total;
1213 uint64_t ktime_seg3_min;
1214 uint64_t ktime_seg3_max;
1215 uint64_t ktime_seg4_total;
1216 uint64_t ktime_seg4_min;
1217 uint64_t ktime_seg4_max;
1218 uint64_t ktime_seg5_total;
1219 uint64_t ktime_seg5_min;
1220 uint64_t ktime_seg5_max;
1221 uint64_t ktime_seg6_total;
1222 uint64_t ktime_seg6_min;
1223 uint64_t ktime_seg6_max;
1224 uint64_t ktime_seg7_total;
1225 uint64_t ktime_seg7_min;
1226 uint64_t ktime_seg7_max;
1227 uint64_t ktime_seg8_total;
1228 uint64_t ktime_seg8_min;
1229 uint64_t ktime_seg8_max;
1230 uint64_t ktime_seg9_total;
1231 uint64_t ktime_seg9_min;
1232 uint64_t ktime_seg9_max;
1233 uint64_t ktime_seg10_total;
1234 uint64_t ktime_seg10_min;
1235 uint64_t ktime_seg10_max;
1238 struct hlist_node cpuhp; /* used for cpuhp per hba callback */
1239 struct timer_list cpuhp_poll_timer;
1240 struct list_head poll_list; /* slowpath eq polling list */
1264 lpfc_set_loopback_flag(struct lpfc_hba *phba) in lpfc_set_loopback_flag() argument