Lines Matching defs:lpfc_hba

925 struct lpfc_hba {  struct
928 (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, argument
931 (struct lpfc_hba *, struct lpfc_io_buf *); argument
933 (struct lpfc_hba *, struct lpfc_io_buf *); argument
935 (struct lpfc_hba *, struct lpfc_io_buf *); argument
937 (struct lpfc_hba *); argument
952 (struct lpfc_hba *, uint32_t, argument
955 (struct lpfc_hba *phba, uint32_t ring_number, argument
957 void (*__lpfc_sli_release_iocbq)(struct lpfc_hba *, argument
959 int (*lpfc_hba_down_post)(struct lpfc_hba *phba); argument
963 (struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); argument
967 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, argument
972 (struct lpfc_hba *, uint32_t, struct hbq_dmabuf *); argument
974 (struct lpfc_hba *); argument
976 (struct lpfc_hba *, uint32_t); argument
978 (struct lpfc_hba *); argument
980 (struct lpfc_hba *); argument
981 int (*lpfc_hba_init_link) argument
983 int (*lpfc_hba_down_link) argument
986 (struct lpfc_hba *); argument
989 (struct lpfc_hba *, struct lpfc_io_buf *); argument
992 void (*__lpfc_sli_prep_els_req_rsp)(struct lpfc_iocbq *cmdiocbq,
997 void (*__lpfc_sli_prep_gen_req)(struct lpfc_iocbq *cmdiocbq,
1000 void (*__lpfc_sli_prep_xmit_seq64)(struct lpfc_iocbq *cmdiocbq,
1004 void (*__lpfc_sli_prep_abort_xri)(struct lpfc_iocbq *cmdiocbq,
1010 struct lpfc_epd_pool epd_pool;
1013 struct lpfc_sli4_hba sli4_hba;
1015 struct workqueue_struct *wq;
1016 struct delayed_work eq_delay_work;
1019 struct delayed_work idle_stat_delay_work;
1021 struct lpfc_sli sli;
1022 uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
1023 uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
1024 uint32_t sli3_options; /* Mask of enabled SLI3 options */
1033 uint32_t iocb_cmd_size;
1034 uint32_t iocb_rsp_size;
1036 struct lpfc_trunk_link trunk_link;
1037 enum hba_state link_state;
1038 uint32_t link_flag; /* link state flags */
1049 unsigned long hba_flag; /* hba generic flags */
1051 struct completion *fw_dump_cmpl; /* cmpl event tracker for fw_dump */
1052 uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
1053 struct lpfc_dmabuf slim2p;
1055 MAILBOX_t *mbox;
1056 uint32_t *mbox_ext;
1057 struct lpfc_mbox_ext_buf_ctx mbox_ext_buf_ctx;
1058 uint32_t ha_copy;
1059 struct _PCB *pcb;
1060 struct _IOCB *IOCBs;
1062 struct lpfc_dmabuf hbqslimp;
1064 uint16_t pci_cfg_value;
1066 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
1068 uint32_t fc_eventTag; /* event tag for link attention */
1069 uint32_t link_events;
1072 uint32_t fc_pref_DID; /* preferred D_ID */
1073 uint8_t fc_pref_ALPA; /* preferred AL_PA */
1074 uint32_t fc_edtovResol; /* E_D_TOV timer resolution */
1075 uint32_t fc_edtov; /* E_D_TOV timer value */
1076 uint32_t fc_arbtov; /* ARB_TOV timer value */
1077 uint32_t fc_ratov; /* R_A_TOV timer value */
1078 uint32_t fc_rttov; /* R_T_TOV timer value */
1079 uint32_t fc_altov; /* AL_TOV timer value */
1080 uint32_t fc_crtov; /* C_R_TOV timer value */
1082 struct serv_parm fc_fabparam; /* fabric service parameters buffer */
1083 uint8_t alpa_map[128]; /* AL_PA map from READ_LA */
1085 uint32_t lmt;
1087 uint32_t fc_topology; /* link topology, from LINK INIT */
1088 uint32_t fc_topology_changed; /* link topology, from LINK INIT */
1090 struct lpfc_stats fc_stat;
1092 struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
1093 uint32_t nport_event_cnt; /* timestamp for nlplist entry */
1095 uint8_t wwnn[8];
1096 uint8_t wwpn[8];
1097 uint32_t RandomData[7];
1098 uint8_t fcp_embed_io;
1099 uint8_t nvmet_support; /* driver supports NVMET */
1101 uint8_t mds_diags_support;
1102 uint8_t bbcredit_support;
1103 uint8_t enab_exp_wqcq_pages;
1104 u8 nsler; /* Firmware supports FC-NVMe-2 SLER */
1107 uint32_t cfg_ack0;
1108 uint32_t cfg_xri_rebalancing;
1109 uint32_t cfg_xpsgl;
1110 uint32_t cfg_enable_npiv;
1111 uint32_t cfg_enable_rrq;
1112 uint32_t cfg_topology;
1113 uint32_t cfg_link_speed;
1116 uint32_t cfg_fcf_failover_policy;
1117 uint32_t cfg_fcp_io_sched;
1118 uint32_t cfg_ns_query;
1119 uint32_t cfg_fcp2_no_tgt_reset;
1120 uint32_t cfg_cr_delay;
1121 uint32_t cfg_cr_count;
1122 uint32_t cfg_multi_ring_support;
1123 uint32_t cfg_multi_ring_rctl;
1124 uint32_t cfg_multi_ring_type;
1125 uint32_t cfg_poll;
1126 uint32_t cfg_poll_tmo;
1127 uint32_t cfg_task_mgmt_tmo;
1128 uint32_t cfg_use_msi;
1129 uint32_t cfg_auto_imax;
1130 uint32_t cfg_fcp_imax;
1131 uint32_t cfg_force_rscn;
1132 uint32_t cfg_cq_poll_threshold;
1133 uint32_t cfg_cq_max_proc_limit;
1134 uint32_t cfg_fcp_cpu_map;
1135 uint32_t cfg_fcp_mq_threshold;
1136 uint32_t cfg_hdw_queue;
1137 uint32_t cfg_irq_chann;
1138 uint32_t cfg_suppress_rsp;
1139 uint32_t cfg_nvme_oas;
1140 uint32_t cfg_nvme_embed_cmd;
1141 uint32_t cfg_nvmet_mrq_post;
1142 uint32_t cfg_nvmet_mrq;
1143 uint32_t cfg_enable_nvmet;
1144 uint32_t cfg_nvme_enable_fb;
1145 uint32_t cfg_nvmet_fb_size;
1146 uint32_t cfg_total_seg_cnt;
1147 uint32_t cfg_sg_seg_cnt;
1148 uint32_t cfg_nvme_seg_cnt;
1149 uint32_t cfg_scsi_seg_cnt;
1150 uint32_t cfg_sg_dma_buf_size;
1151 uint32_t cfg_hba_queue_depth;
1152 uint32_t cfg_enable_hba_reset;
1153 uint32_t cfg_enable_hba_heartbeat;
1154 uint32_t cfg_fof;
1155 uint32_t cfg_EnableXLane;
1156 uint8_t cfg_oas_tgt_wwpn[8];
1157 uint8_t cfg_oas_vpt_wwpn[8];
1158 uint32_t cfg_oas_lun_state;
1161 uint32_t cfg_oas_lun_status;
1163 uint32_t cfg_oas_flags;
1167 uint32_t cfg_oas_priority;
1168 uint32_t cfg_XLanePriority;
1169 uint32_t cfg_enable_bg;
1170 uint32_t cfg_prot_mask;
1171 uint32_t cfg_prot_guard;
1172 uint32_t cfg_hostmem_hgp;
1173 uint32_t cfg_log_verbose;
1174 uint32_t cfg_enable_fc4_type;
1185 uint32_t cfg_sriov_nr_virtfn;
1186 uint32_t cfg_request_firmware_upgrade;
1187 uint32_t cfg_suppress_link_up;
1188 uint32_t cfg_rrq_xri_bitmap_sz;
1189 u32 cfg_fcp_wait_abts_rsp;
1190 uint32_t cfg_delay_discovery;
1191 uint32_t cfg_sli_mode;
1195 uint32_t cfg_fdmi_on;
1198 uint32_t cfg_enable_SmartSAN;
1199 uint32_t cfg_enable_mds_diags;
1200 uint32_t cfg_ras_fwlog_level;
1201 uint32_t cfg_ras_fwlog_buffsize;
1202 uint32_t cfg_ras_fwlog_func;
1203 uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */
1204 uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */
1205 uint32_t cfg_enable_pbde;
1206 uint32_t cfg_enable_mi;
1207 struct nvmet_fc_target_port *targetport;
1208 lpfc_vpd_t vpd; /* vital product data */
1210 u32 cfg_max_vmid; /* maximum VMIDs allowed per port */
1211 u32 cfg_vmid_app_header;
1214 u32 cfg_vmid_priority_tagging;
1215 u32 cfg_vmid_inactivity_timeout; /* Time after which the VMID */
1217 struct pci_dev *pcidev;
1218 struct list_head work_list;
1219 uint32_t work_ha; /* Host Attention Bits for WT */
1220 uint32_t work_ha_mask; /* HA Bits owned by WT */
1221 uint32_t work_hs; /* HS stored in case of ERRAT */
1222 uint32_t work_status[2]; /* Extra status from SLIM */
1224 wait_queue_head_t work_waitq;
1225 struct task_struct *worker_thread;
1226 unsigned long data_flags;
1227 uint32_t border_sge_num;
1229 uint32_t hbq_in_use; /* HBQs in use flag */
1230 uint32_t hbq_count; /* Count of configured HBQs */
1231 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
1233 atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
1234 atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
1236 phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
1237 phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
1238 phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
1239 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
1241 void __iomem *ctrl_regs_memmap_p;/* Kernel memory mapped address for
1244 void __iomem *pci_bar0_memmap_p; /* Kernel memory mapped address for
1246 void __iomem *pci_bar2_memmap_p; /* Kernel memory mapped address for
1248 void __iomem *pci_bar4_memmap_p; /* Kernel memory mapped address for
1253 void __iomem *MBslimaddr; /* virtual address for mbox cmds */
1254 void __iomem *HAregaddr; /* virtual address for host attn reg */
1255 void __iomem *CAregaddr; /* virtual address for chip attn reg */
1256 void __iomem *HSregaddr; /* virtual address for host status
1258 void __iomem *HCregaddr; /* virtual address for host ctl reg */
1260 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
1261 struct lpfc_pgp *port_gp;
1262 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
1263 uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
1265 int brd_no; /* FC board number */
1266 char SerialNumber[32]; /* adapter Serial Number */
1267 char OptionROMVersion[32]; /* adapter BIOS / Fcode version */
1268 char BIOSVersion[16]; /* Boot BIOS version */
1269 char ModelDesc[256]; /* Model Description */
1270 char ModelName[80]; /* Model Name */
1271 char ProgramType[256]; /* Program Type */
1272 char Port[20]; /* Port No */
1273 uint8_t vpd_flag; /* VPD data flag */
1282 struct timer_list fcp_poll_timer;
1283 struct timer_list eratt_poll;
1284 uint32_t eratt_poll_interval;
1286 uint64_t bg_guard_err_cnt;
1287 uint64_t bg_apptag_err_cnt;
1288 uint64_t bg_reftag_err_cnt;
1291 spinlock_t scsi_buf_list_get_lock; /* SCSI buf alloc list lock */
1292 spinlock_t scsi_buf_list_put_lock; /* SCSI buf free list lock */
1293 struct list_head lpfc_scsi_buf_list_get;
1294 struct list_head lpfc_scsi_buf_list_put;
1295 uint32_t total_scsi_bufs;
1296 struct list_head lpfc_iocb_list;
1297 uint32_t total_iocbq_bufs;
1298 spinlock_t rrq_list_lock; /* lock for active_rrq_list */
1299 struct list_head active_rrq_list;
1300 spinlock_t hbalock;
1301 struct work_struct unblock_request_work; /* SCSI layer unblock IOs */
1304 struct dma_pool *lpfc_sg_dma_buf_pool;
1305 struct dma_pool *lpfc_mbuf_pool;
1306 struct dma_pool *lpfc_hrb_pool; /* header receive buffer pool */
1307 struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
1308 struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
1309 struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
1310 struct dma_pool *lpfc_cmd_rsp_buf_pool;
1311 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
1313 mempool_t *mbox_mem_pool;
1314 mempool_t *nlp_mem_pool;
1315 mempool_t *rrq_pool;
1316 mempool_t *active_rrq_pool;
1318 struct fc_host_statistics link_stats;
1319 enum lpfc_irq_chann_mode irq_chann_mode;
1320 enum intr_type_t intr_type;
1321 uint32_t intr_mode;
1323 struct list_head port_list;
1324 spinlock_t port_list_lock; /* lock for port_list mutations */
1325 struct lpfc_vport *pport; /* physical lpfc_vport pointer */
1326 uint16_t max_vpi; /* Maximum virtual nports */
1329 uint16_t max_vports; /*
1335 uint16_t vpi_base;
1336 uint16_t vfi_base;
1337 unsigned long *vpi_bmask; /* vpi allocation table */
1338 uint16_t *vpi_ids;
1339 uint16_t vpi_count;
1340 struct list_head lpfc_vpi_blk_list;
1343 struct list_head fabric_iocb_list;
1344 atomic_t fabric_iocb_count;
1345 struct timer_list fabric_block_timer;
1346 unsigned long bit_flags;
1347 atomic_t num_rsrc_err;
1348 unsigned long last_rsrc_error_time;
1349 unsigned long last_ramp_down_time;
1351 struct dentry *hba_debugfs_root;
1352 atomic_t debugfs_vport_count;
1353 struct dentry *debug_multixri_pools;
1354 struct dentry *debug_hbqinfo;
1355 struct dentry *debug_dumpHostSlim;
1356 struct dentry *debug_dumpHBASlim;
1357 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1358 struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1359 struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1360 struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1361 struct dentry *debug_writeApp; /* inject write app_tag errors */
1362 struct dentry *debug_writeRef; /* inject write ref_tag errors */
1363 struct dentry *debug_readGuard; /* inject read guard_tag errors */
1364 struct dentry *debug_readApp; /* inject read app_tag errors */
1365 struct dentry *debug_readRef; /* inject read ref_tag errors */
1367 struct dentry *debug_nvmeio_trc;
1368 struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1369 struct dentry *debug_hdwqinfo;
1371 struct dentry *debug_lockstat;
1373 struct dentry *debug_cgn_buffer;
1374 struct dentry *debug_rx_monitor;
1375 struct dentry *debug_ras_log;
1376 atomic_t nvmeio_trc_cnt;
1377 uint32_t nvmeio_trc_size;
1378 uint32_t nvmeio_trc_output_idx;
1381 uint32_t lpfc_injerr_wgrd_cnt;
1382 uint32_t lpfc_injerr_wapp_cnt;
1383 uint32_t lpfc_injerr_wref_cnt;
1384 uint32_t lpfc_injerr_rgrd_cnt;
1385 uint32_t lpfc_injerr_rapp_cnt;
1386 uint32_t lpfc_injerr_rref_cnt;
1387 uint32_t lpfc_injerr_nportid;
1388 struct lpfc_name lpfc_injerr_wwpn;
1389 sector_t lpfc_injerr_lba;
1392 struct dentry *debug_slow_ring_trc;
1393 struct lpfc_debugfs_trc *slow_ring_trc;
1394 atomic_t slow_ring_trc_cnt;
1396 struct dentry *idiag_root;
1397 struct dentry *idiag_pci_cfg;
1398 struct dentry *idiag_bar_acc;
1399 struct dentry *idiag_que_info;
1400 struct dentry *idiag_que_acc;
1401 struct dentry *idiag_drb_acc;
1402 struct dentry *idiag_ctl_acc;
1403 struct dentry *idiag_mbx_acc;
1404 struct dentry *idiag_ext_acc;
1405 uint8_t lpfc_idiag_last_eq;
1407 uint16_t nvmeio_trc_on;
1410 struct list_head elsbuf;
1411 int elsbuf_cnt;
1412 int elsbuf_prev_cnt;
1414 uint8_t temp_sensor_support;
1416 unsigned long last_completion_time;
1417 unsigned long skipped_hb;
1418 struct timer_list hb_tmofunc;
1419 struct timer_list rrq_tmr;
1420 enum hba_temp_state over_temp_state;
1426 uint32_t buffer_tag_count;
1430 atomic_t fast_event_count;
1431 uint32_t fcoe_eventtag;
1432 uint32_t fcoe_eventtag_at_fcf_scan;
1433 uint32_t fcoe_cvl_eventtag;
1434 uint32_t fcoe_cvl_eventtag_attn;
1435 struct lpfc_fcf fcf;
1436 uint8_t fc_map[3];
1437 uint8_t valid_vlan;
1438 uint16_t vlan_id;
1439 struct list_head fcf_conn_rec_list;
1441 struct lpfc_defer_flogi_acc defer_flogi_acc;
1443 spinlock_t ct_ev_lock; /* synchronize access to ct_ev_waiters */
1444 struct list_head ct_ev_waiters;
1445 struct unsol_rcv_ct_ctx ct_ctx[LPFC_CT_CTX_MAX];
1446 uint32_t ctx_idx;
1447 struct timer_list inactive_vmid_poll;
1450 spinlock_t ras_fwlog_lock; /* do not take while holding another lock */
1451 struct lpfc_ras_fwlog ras_fwlog;
1453 uint32_t iocb_cnt;
1454 uint32_t iocb_max;
1455 atomic_t sdev_cnt;
1456 spinlock_t devicelock; /* lock for luns list */
1457 mempool_t *device_data_mem_pool;
1458 struct list_head luns;
1469 uint16_t sfp_alarm;
1470 uint16_t sfp_warning;
1473 uint16_t hdwqstat_on;
1478 uint16_t ktime_on;
1479 uint64_t ktime_data_samples;
1480 uint64_t ktime_status_samples;
1481 uint64_t ktime_last_cmd;
1482 uint64_t ktime_seg1_total;
1483 uint64_t ktime_seg1_min;
1484 uint64_t ktime_seg1_max;
1485 uint64_t ktime_seg2_total;
1486 uint64_t ktime_seg2_min;
1487 uint64_t ktime_seg2_max;
1488 uint64_t ktime_seg3_total;
1489 uint64_t ktime_seg3_min;
1490 uint64_t ktime_seg3_max;
1491 uint64_t ktime_seg4_total;
1492 uint64_t ktime_seg4_min;
1493 uint64_t ktime_seg4_max;
1494 uint64_t ktime_seg5_total;
1495 uint64_t ktime_seg5_min;
1496 uint64_t ktime_seg5_max;
1497 uint64_t ktime_seg6_total;
1498 uint64_t ktime_seg6_min;
1499 uint64_t ktime_seg6_max;
1500 uint64_t ktime_seg7_total;
1501 uint64_t ktime_seg7_min;
1502 uint64_t ktime_seg7_max;
1503 uint64_t ktime_seg8_total;
1504 uint64_t ktime_seg8_min;
1505 uint64_t ktime_seg8_max;
1506 uint64_t ktime_seg9_total;
1507 uint64_t ktime_seg9_min;
1508 uint64_t ktime_seg9_max;
1509 uint64_t ktime_seg10_total;
1510 uint64_t ktime_seg10_min;
1511 uint64_t ktime_seg10_max;
1514 struct lpfc_cgn_stat __percpu *cmf_stat;
1515 uint32_t cmf_interval_rate; /* timer interval limit in ms */
1516 uint32_t cmf_timer_cnt;
1518 uint64_t cmf_link_byte_count;
1519 uint64_t cmf_max_line_rate;
1520 uint64_t cmf_max_bytes_per_interval;
1521 uint64_t cmf_last_sync_bw;
1523 struct hrtimer cmf_timer;
1524 struct hrtimer cmf_stats_timer; /* 1 minute stats timer */
1525 atomic_t cmf_bw_wait;
1526 atomic_t cmf_busy;
1527 atomic_t cmf_stop_io; /* To block request and stop IO's */
1528 uint32_t cmf_active_mode;
1529 uint32_t cmf_info_per_interval;
1531 struct timespec64 cmf_latency; /* Interval congestion timestamp */
1532 uint32_t cmf_last_ts; /* Interval congestion time (ms) */
1533 uint32_t cmf_active_info;
1536 u8 cgn_reg_fpin; /* Negotiated value from RDF */
1537 u8 cgn_init_reg_fpin; /* Initial value from READ_CONFIG */
1543 u8 cgn_reg_signal; /* Negotiated value from EDC */
1544 u8 cgn_init_reg_signal; /* Initial value from READ_CONFIG */
1548 u16 cgn_fpin_frequency; /* In units of msecs */
1550 u32 cgn_sig_freq;
1551 u32 cgn_acqe_cnt;
1554 struct lpfc_rx_info_monitor *rx_monitor;
1555 atomic_t rx_max_read_cnt; /* Maximum read bytes */
1556 uint64_t rx_block_cnt;
1559 struct lpfc_cgn_param cgn_p;
1562 struct lpfc_cgn_acqe_stat cgn_acqe_stat;
1565 struct lpfc_dmabuf *cgn_i; /* Congestion Info buffer */
1566 atomic_t cgn_fabric_warn_cnt; /* Total warning cgn events for info */
1567 atomic_t cgn_fabric_alarm_cnt; /* Total alarm cgn events for info */
1568 atomic_t cgn_sync_warn_cnt; /* Total warning events for SYNC wqe */
1569 atomic_t cgn_sync_alarm_cnt; /* Total alarm events for SYNC wqe */
1570 atomic_t cgn_driver_evt_cnt; /* Total driver cgn events for fmw */
1571 atomic_t cgn_latency_evt_cnt;
1572 atomic64_t cgn_latency_evt; /* Avg latency per minute */
1573 unsigned long cgn_evt_timestamp;
1575 uint32_t cgn_evt_minute;
1581 struct hlist_node cpuhp; /* used for cpuhp per hba callback */
1582 struct timer_list cpuhp_poll_timer;
1583 struct list_head poll_list; /* slowpath eq polling list */
1586 char os_host_name[MAXHOSTNAMELEN];
1589 u32 degrade_activate_threshold;
1590 u32 degrade_deactivate_threshold;
1591 u32 fec_degrade_interval;
1593 atomic_t dbg_log_idx;
1594 atomic_t dbg_log_cnt;
1595 atomic_t dbg_log_dmping;
1596 struct dbg_log_ent dbg_log[DBG_LOG_SZ];