Lines Matching defs:lpfc_hba

902 struct lpfc_hba {  struct
905 (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, argument
908 (struct lpfc_hba *, struct lpfc_io_buf *); argument
910 (struct lpfc_hba *, struct lpfc_io_buf *); argument
912 (struct lpfc_hba *, struct lpfc_io_buf *); argument
914 (struct lpfc_hba *); argument
925 (struct lpfc_hba *, uint32_t, argument
928 (struct lpfc_hba *phba, uint32_t ring_number, argument
930 void (*__lpfc_sli_release_iocbq)(struct lpfc_hba *, argument
932 int (*lpfc_hba_down_post)(struct lpfc_hba *phba); argument
936 (struct lpfc_hba *, struct lpfc_iocbq *, struct lpfc_iocbq *); argument
940 (struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); argument
944 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, argument
949 (struct lpfc_hba *, uint32_t, struct hbq_dmabuf *); argument
951 (struct lpfc_hba *); argument
953 (struct lpfc_hba *, uint32_t); argument
955 (struct lpfc_hba *); argument
957 (struct lpfc_hba *); argument
958 int (*lpfc_hba_init_link) argument
960 int (*lpfc_hba_down_link) argument
963 (struct lpfc_hba *); argument
966 (struct lpfc_hba *, struct lpfc_io_buf *); argument
970 struct lpfc_epd_pool epd_pool;
973 struct lpfc_sli4_hba sli4_hba;
975 struct workqueue_struct *wq;
976 struct delayed_work eq_delay_work;
979 struct delayed_work idle_stat_delay_work;
981 struct lpfc_sli sli;
982 uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
983 uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
984 uint32_t sli3_options; /* Mask of enabled SLI3 options */
993 uint32_t iocb_cmd_size;
994 uint32_t iocb_rsp_size;
996 struct lpfc_trunk_link trunk_link;
997 enum hba_state link_state;
998 uint32_t link_flag; /* link state flags */
1008 uint32_t hba_flag; /* hba generic flags */
1041 uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
1042 struct lpfc_dmabuf slim2p;
1044 MAILBOX_t *mbox;
1045 uint32_t *mbox_ext;
1046 struct lpfc_mbox_ext_buf_ctx mbox_ext_buf_ctx;
1047 uint32_t ha_copy;
1048 struct _PCB *pcb;
1049 struct _IOCB *IOCBs;
1051 struct lpfc_dmabuf hbqslimp;
1053 uint16_t pci_cfg_value;
1055 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
1057 uint32_t fc_eventTag; /* event tag for link attention */
1058 uint32_t link_events;
1061 uint32_t fc_pref_DID; /* preferred D_ID */
1062 uint8_t fc_pref_ALPA; /* preferred AL_PA */
1063 uint32_t fc_edtovResol; /* E_D_TOV timer resolution */
1064 uint32_t fc_edtov; /* E_D_TOV timer value */
1065 uint32_t fc_arbtov; /* ARB_TOV timer value */
1066 uint32_t fc_ratov; /* R_A_TOV timer value */
1067 uint32_t fc_rttov; /* R_T_TOV timer value */
1068 uint32_t fc_altov; /* AL_TOV timer value */
1069 uint32_t fc_crtov; /* C_R_TOV timer value */
1071 struct serv_parm fc_fabparam; /* fabric service parameters buffer */
1072 uint8_t alpa_map[128]; /* AL_PA map from READ_LA */
1074 uint32_t lmt;
1076 uint32_t fc_topology; /* link topology, from LINK INIT */
1077 uint32_t fc_topology_changed; /* link topology, from LINK INIT */
1079 struct lpfc_stats fc_stat;
1081 struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
1082 uint32_t nport_event_cnt; /* timestamp for nlplist entry */
1084 uint8_t wwnn[8];
1085 uint8_t wwpn[8];
1086 uint32_t RandomData[7];
1087 uint8_t fcp_embed_io;
1088 uint8_t nvmet_support; /* driver supports NVMET */
1090 uint8_t mds_diags_support;
1091 uint8_t bbcredit_support;
1092 uint8_t enab_exp_wqcq_pages;
1093 u8 nsler; /* Firmware supports FC-NVMe-2 SLER */
1096 uint32_t cfg_ack0;
1097 uint32_t cfg_xri_rebalancing;
1098 uint32_t cfg_xpsgl;
1099 uint32_t cfg_enable_npiv;
1100 uint32_t cfg_enable_rrq;
1101 uint32_t cfg_topology;
1102 uint32_t cfg_link_speed;
1105 uint32_t cfg_fcf_failover_policy;
1106 uint32_t cfg_fcp_io_sched;
1107 uint32_t cfg_ns_query;
1108 uint32_t cfg_fcp2_no_tgt_reset;
1109 uint32_t cfg_cr_delay;
1110 uint32_t cfg_cr_count;
1111 uint32_t cfg_multi_ring_support;
1112 uint32_t cfg_multi_ring_rctl;
1113 uint32_t cfg_multi_ring_type;
1114 uint32_t cfg_poll;
1115 uint32_t cfg_poll_tmo;
1116 uint32_t cfg_task_mgmt_tmo;
1117 uint32_t cfg_use_msi;
1118 uint32_t cfg_auto_imax;
1119 uint32_t cfg_fcp_imax;
1120 uint32_t cfg_force_rscn;
1121 uint32_t cfg_cq_poll_threshold;
1122 uint32_t cfg_cq_max_proc_limit;
1123 uint32_t cfg_fcp_cpu_map;
1124 uint32_t cfg_fcp_mq_threshold;
1125 uint32_t cfg_hdw_queue;
1126 uint32_t cfg_irq_chann;
1127 uint32_t cfg_suppress_rsp;
1128 uint32_t cfg_nvme_oas;
1129 uint32_t cfg_nvme_embed_cmd;
1130 uint32_t cfg_nvmet_mrq_post;
1131 uint32_t cfg_nvmet_mrq;
1132 uint32_t cfg_enable_nvmet;
1133 uint32_t cfg_nvme_enable_fb;
1134 uint32_t cfg_nvmet_fb_size;
1135 uint32_t cfg_total_seg_cnt;
1136 uint32_t cfg_sg_seg_cnt;
1137 uint32_t cfg_nvme_seg_cnt;
1138 uint32_t cfg_scsi_seg_cnt;
1139 uint32_t cfg_sg_dma_buf_size;
1140 uint64_t cfg_soft_wwnn;
1141 uint64_t cfg_soft_wwpn;
1142 uint32_t cfg_hba_queue_depth;
1143 uint32_t cfg_enable_hba_reset;
1144 uint32_t cfg_enable_hba_heartbeat;
1145 uint32_t cfg_fof;
1146 uint32_t cfg_EnableXLane;
1147 uint8_t cfg_oas_tgt_wwpn[8];
1148 uint8_t cfg_oas_vpt_wwpn[8];
1149 uint32_t cfg_oas_lun_state;
1152 uint32_t cfg_oas_lun_status;
1154 uint32_t cfg_oas_flags;
1158 uint32_t cfg_oas_priority;
1159 uint32_t cfg_XLanePriority;
1160 uint32_t cfg_enable_bg;
1161 uint32_t cfg_prot_mask;
1162 uint32_t cfg_prot_guard;
1163 uint32_t cfg_hostmem_hgp;
1164 uint32_t cfg_log_verbose;
1165 uint32_t cfg_enable_fc4_type;
1166 uint32_t cfg_aer_support;
1167 uint32_t cfg_sriov_nr_virtfn;
1168 uint32_t cfg_request_firmware_upgrade;
1169 uint32_t cfg_suppress_link_up;
1170 uint32_t cfg_rrq_xri_bitmap_sz;
1171 u32 cfg_fcp_wait_abts_rsp;
1172 uint32_t cfg_delay_discovery;
1173 uint32_t cfg_sli_mode;
1177 uint32_t cfg_fdmi_on;
1180 uint32_t cfg_enable_SmartSAN;
1181 uint32_t cfg_enable_mds_diags;
1182 uint32_t cfg_ras_fwlog_level;
1183 uint32_t cfg_ras_fwlog_buffsize;
1184 uint32_t cfg_ras_fwlog_func;
1185 uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */
1186 uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */
1190 uint32_t cfg_enable_pbde;
1191 uint32_t cfg_enable_mi;
1192 struct nvmet_fc_target_port *targetport;
1193 lpfc_vpd_t vpd; /* vital product data */
1195 u32 cfg_max_vmid; /* maximum VMIDs allowed per port */
1196 u32 cfg_vmid_app_header;
1199 u32 cfg_vmid_priority_tagging;
1200 u32 cfg_vmid_inactivity_timeout; /* Time after which the VMID */
1202 struct pci_dev *pcidev;
1203 struct list_head work_list;
1204 uint32_t work_ha; /* Host Attention Bits for WT */
1205 uint32_t work_ha_mask; /* HA Bits owned by WT */
1206 uint32_t work_hs; /* HS stored in case of ERRAT */
1207 uint32_t work_status[2]; /* Extra status from SLIM */
1209 wait_queue_head_t work_waitq;
1210 struct task_struct *worker_thread;
1211 unsigned long data_flags;
1212 uint32_t border_sge_num;
1214 uint32_t hbq_in_use; /* HBQs in use flag */
1215 uint32_t hbq_count; /* Count of configured HBQs */
1216 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
1218 atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
1219 atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
1221 phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
1222 phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
1223 phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
1224 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
1226 void __iomem *ctrl_regs_memmap_p;/* Kernel memory mapped address for
1229 void __iomem *pci_bar0_memmap_p; /* Kernel memory mapped address for
1231 void __iomem *pci_bar2_memmap_p; /* Kernel memory mapped address for
1233 void __iomem *pci_bar4_memmap_p; /* Kernel memory mapped address for
1238 void __iomem *MBslimaddr; /* virtual address for mbox cmds */
1239 void __iomem *HAregaddr; /* virtual address for host attn reg */
1240 void __iomem *CAregaddr; /* virtual address for chip attn reg */
1241 void __iomem *HSregaddr; /* virtual address for host status
1243 void __iomem *HCregaddr; /* virtual address for host ctl reg */
1245 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
1246 struct lpfc_pgp *port_gp;
1247 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
1248 uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
1250 int brd_no; /* FC board number */
1251 char SerialNumber[32]; /* adapter Serial Number */
1252 char OptionROMVersion[32]; /* adapter BIOS / Fcode version */
1253 char BIOSVersion[16]; /* Boot BIOS version */
1254 char ModelDesc[256]; /* Model Description */
1255 char ModelName[80]; /* Model Name */
1256 char ProgramType[256]; /* Program Type */
1257 char Port[20]; /* Port No */
1258 uint8_t vpd_flag; /* VPD data flag */
1266 uint8_t soft_wwn_enable;
1268 struct timer_list fcp_poll_timer;
1269 struct timer_list eratt_poll;
1270 uint32_t eratt_poll_interval;
1272 uint64_t bg_guard_err_cnt;
1273 uint64_t bg_apptag_err_cnt;
1274 uint64_t bg_reftag_err_cnt;
1277 spinlock_t scsi_buf_list_get_lock; /* SCSI buf alloc list lock */
1278 spinlock_t scsi_buf_list_put_lock; /* SCSI buf free list lock */
1279 struct list_head lpfc_scsi_buf_list_get;
1280 struct list_head lpfc_scsi_buf_list_put;
1281 uint32_t total_scsi_bufs;
1282 struct list_head lpfc_iocb_list;
1283 uint32_t total_iocbq_bufs;
1284 struct list_head active_rrq_list;
1285 spinlock_t hbalock;
1286 struct work_struct unblock_request_work; /* SCSI layer unblock IOs */
1289 struct dma_pool *lpfc_sg_dma_buf_pool;
1290 struct dma_pool *lpfc_mbuf_pool;
1291 struct dma_pool *lpfc_hrb_pool; /* header receive buffer pool */
1292 struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
1293 struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
1294 struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
1295 struct dma_pool *lpfc_cmd_rsp_buf_pool;
1296 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
1298 mempool_t *mbox_mem_pool;
1299 mempool_t *nlp_mem_pool;
1300 mempool_t *rrq_pool;
1301 mempool_t *active_rrq_pool;
1303 struct fc_host_statistics link_stats;
1304 enum lpfc_irq_chann_mode irq_chann_mode;
1305 enum intr_type_t intr_type;
1306 uint32_t intr_mode;
1308 struct list_head port_list;
1309 spinlock_t port_list_lock; /* lock for port_list mutations */
1310 struct lpfc_vport *pport; /* physical lpfc_vport pointer */
1311 uint16_t max_vpi; /* Maximum virtual nports */
1314 uint16_t max_vports; /*
1320 uint16_t vpi_base;
1321 uint16_t vfi_base;
1322 unsigned long *vpi_bmask; /* vpi allocation table */
1323 uint16_t *vpi_ids;
1324 uint16_t vpi_count;
1325 struct list_head lpfc_vpi_blk_list;
1328 struct list_head fabric_iocb_list;
1329 atomic_t fabric_iocb_count;
1330 struct timer_list fabric_block_timer;
1331 unsigned long bit_flags;
1333 atomic_t num_rsrc_err;
1334 atomic_t num_cmd_success;
1335 unsigned long last_rsrc_error_time;
1336 unsigned long last_ramp_down_time;
1338 struct dentry *hba_debugfs_root;
1339 atomic_t debugfs_vport_count;
1340 struct dentry *debug_multixri_pools;
1341 struct dentry *debug_hbqinfo;
1342 struct dentry *debug_dumpHostSlim;
1343 struct dentry *debug_dumpHBASlim;
1344 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1345 struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1346 struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1347 struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1348 struct dentry *debug_writeApp; /* inject write app_tag errors */
1349 struct dentry *debug_writeRef; /* inject write ref_tag errors */
1350 struct dentry *debug_readGuard; /* inject read guard_tag errors */
1351 struct dentry *debug_readApp; /* inject read app_tag errors */
1352 struct dentry *debug_readRef; /* inject read ref_tag errors */
1354 struct dentry *debug_nvmeio_trc;
1355 struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1356 struct dentry *debug_hdwqinfo;
1358 struct dentry *debug_lockstat;
1360 struct dentry *debug_cgn_buffer;
1361 struct dentry *debug_rx_monitor;
1362 struct dentry *debug_ras_log;
1363 atomic_t nvmeio_trc_cnt;
1364 uint32_t nvmeio_trc_size;
1365 uint32_t nvmeio_trc_output_idx;
1368 uint32_t lpfc_injerr_wgrd_cnt;
1369 uint32_t lpfc_injerr_wapp_cnt;
1370 uint32_t lpfc_injerr_wref_cnt;
1371 uint32_t lpfc_injerr_rgrd_cnt;
1372 uint32_t lpfc_injerr_rapp_cnt;
1373 uint32_t lpfc_injerr_rref_cnt;
1374 uint32_t lpfc_injerr_nportid;
1375 struct lpfc_name lpfc_injerr_wwpn;
1376 sector_t lpfc_injerr_lba;
1379 struct dentry *debug_slow_ring_trc;
1380 struct lpfc_debugfs_trc *slow_ring_trc;
1381 atomic_t slow_ring_trc_cnt;
1383 struct dentry *idiag_root;
1384 struct dentry *idiag_pci_cfg;
1385 struct dentry *idiag_bar_acc;
1386 struct dentry *idiag_que_info;
1387 struct dentry *idiag_que_acc;
1388 struct dentry *idiag_drb_acc;
1389 struct dentry *idiag_ctl_acc;
1390 struct dentry *idiag_mbx_acc;
1391 struct dentry *idiag_ext_acc;
1392 uint8_t lpfc_idiag_last_eq;
1394 uint16_t nvmeio_trc_on;
1397 struct list_head elsbuf;
1398 int elsbuf_cnt;
1399 int elsbuf_prev_cnt;
1401 uint8_t temp_sensor_support;
1403 unsigned long last_completion_time;
1404 unsigned long skipped_hb;
1405 struct timer_list hb_tmofunc;
1406 struct timer_list rrq_tmr;
1407 enum hba_temp_state over_temp_state;
1413 uint32_t buffer_tag_count;
1414 int wait_4_mlo_maint_flg;
1415 wait_queue_head_t wait_4_mlo_m_q;
1420 uint8_t bucket_type;
1421 uint32_t bucket_base;
1422 uint32_t bucket_step;
1426 atomic_t fast_event_count;
1427 uint32_t fcoe_eventtag;
1428 uint32_t fcoe_eventtag_at_fcf_scan;
1429 uint32_t fcoe_cvl_eventtag;
1430 uint32_t fcoe_cvl_eventtag_attn;
1431 struct lpfc_fcf fcf;
1432 uint8_t fc_map[3];
1433 uint8_t valid_vlan;
1434 uint16_t vlan_id;
1435 struct list_head fcf_conn_rec_list;
1437 bool defer_flogi_acc_flag;
1438 uint16_t defer_flogi_acc_rx_id;
1439 uint16_t defer_flogi_acc_ox_id;
1441 spinlock_t ct_ev_lock; /* synchronize access to ct_ev_waiters */
1442 struct list_head ct_ev_waiters;
1443 struct unsol_rcv_ct_ctx ct_ctx[LPFC_CT_CTX_MAX];
1444 uint32_t ctx_idx;
1445 struct timer_list inactive_vmid_poll;
1448 struct lpfc_ras_fwlog ras_fwlog;
1450 uint8_t menlo_flag; /* menlo generic flags */
1452 uint32_t iocb_cnt;
1453 uint32_t iocb_max;
1454 atomic_t sdev_cnt;
1455 spinlock_t devicelock; /* lock for luns list */
1456 mempool_t *device_data_mem_pool;
1457 struct list_head luns;
1468 uint16_t sfp_alarm;
1469 uint16_t sfp_warning;
1472 uint16_t hdwqstat_on;
1477 uint16_t ktime_on;
1478 uint64_t ktime_data_samples;
1479 uint64_t ktime_status_samples;
1480 uint64_t ktime_last_cmd;
1481 uint64_t ktime_seg1_total;
1482 uint64_t ktime_seg1_min;
1483 uint64_t ktime_seg1_max;
1484 uint64_t ktime_seg2_total;
1485 uint64_t ktime_seg2_min;
1486 uint64_t ktime_seg2_max;
1487 uint64_t ktime_seg3_total;
1488 uint64_t ktime_seg3_min;
1489 uint64_t ktime_seg3_max;
1490 uint64_t ktime_seg4_total;
1491 uint64_t ktime_seg4_min;
1492 uint64_t ktime_seg4_max;
1493 uint64_t ktime_seg5_total;
1494 uint64_t ktime_seg5_min;
1495 uint64_t ktime_seg5_max;
1496 uint64_t ktime_seg6_total;
1497 uint64_t ktime_seg6_min;
1498 uint64_t ktime_seg6_max;
1499 uint64_t ktime_seg7_total;
1500 uint64_t ktime_seg7_min;
1501 uint64_t ktime_seg7_max;
1502 uint64_t ktime_seg8_total;
1503 uint64_t ktime_seg8_min;
1504 uint64_t ktime_seg8_max;
1505 uint64_t ktime_seg9_total;
1506 uint64_t ktime_seg9_min;
1507 uint64_t ktime_seg9_max;
1508 uint64_t ktime_seg10_total;
1509 uint64_t ktime_seg10_min;
1510 uint64_t ktime_seg10_max;
1513 struct lpfc_cgn_stat __percpu *cmf_stat;
1514 uint32_t cmf_interval_rate; /* timer interval limit in ms */
1515 uint32_t cmf_timer_cnt;
1517 uint64_t cmf_link_byte_count;
1518 uint64_t cmf_max_line_rate;
1519 uint64_t cmf_max_bytes_per_interval;
1520 uint64_t cmf_last_sync_bw;
1522 struct hrtimer cmf_timer;
1523 atomic_t cmf_bw_wait;
1524 atomic_t cmf_busy;
1525 atomic_t cmf_stop_io; /* To block request and stop IO's */
1526 uint32_t cmf_active_mode;
1527 uint32_t cmf_info_per_interval;
1529 struct timespec64 cmf_latency; /* Interval congestion timestamp */
1530 uint32_t cmf_last_ts; /* Interval congestion time (ms) */
1531 uint32_t cmf_active_info;
1534 u8 cgn_reg_fpin; /* Negotiated value from RDF */
1535 u8 cgn_init_reg_fpin; /* Initial value from READ_CONFIG */
1541 u8 cgn_reg_signal; /* Negotiated value from EDC */
1542 u8 cgn_init_reg_signal; /* Initial value from READ_CONFIG */
1546 u16 cgn_fpin_frequency;
1548 u32 cgn_sig_freq;
1549 u32 cgn_acqe_cnt;
1552 struct rxtable_entry *rxtable; /* RX_monitor information */
1553 atomic_t rxtable_idx_head;
1555 atomic_t rxtable_idx_tail;
1556 atomic_t rx_max_read_cnt; /* Maximum read bytes */
1557 uint64_t rx_block_cnt;
1560 struct lpfc_cgn_param cgn_p;
1563 struct lpfc_cgn_acqe_stat cgn_acqe_stat;
1566 struct lpfc_dmabuf *cgn_i; /* Congestion Info buffer */
1567 atomic_t cgn_fabric_warn_cnt; /* Total warning cgn events for info */
1568 atomic_t cgn_fabric_alarm_cnt; /* Total alarm cgn events for info */
1569 atomic_t cgn_sync_warn_cnt; /* Total warning events for SYNC wqe */
1570 atomic_t cgn_sync_alarm_cnt; /* Total alarm events for SYNC wqe */
1571 atomic_t cgn_driver_evt_cnt; /* Total driver cgn events for fmw */
1572 atomic_t cgn_latency_evt_cnt;
1573 struct timespec64 cgn_daily_ts;
1574 atomic64_t cgn_latency_evt; /* Avg latency per minute */
1575 unsigned long cgn_evt_timestamp;
1577 uint32_t cgn_evt_minute;
1583 struct hlist_node cpuhp; /* used for cpuhp per hba callback */
1584 struct timer_list cpuhp_poll_timer;
1585 struct list_head poll_list; /* slowpath eq polling list */
1590 char os_host_name[MAXHOSTNAMELEN];
1593 struct scsi_host_template port_template;
1595 struct scsi_host_template vport_template;
1596 atomic_t dbg_log_idx;
1597 atomic_t dbg_log_cnt;
1598 atomic_t dbg_log_dmping;
1599 struct dbg_log_ent dbg_log[DBG_LOG_SZ];