Lines Matching defs:lpfc_hba
586 struct lpfc_hba { struct
591 (struct lpfc_hba *, struct lpfc_nodelist *); argument
593 (struct lpfc_hba *, struct lpfc_scsi_buf *); argument
595 (struct lpfc_hba *, struct lpfc_scsi_buf *); argument
597 (struct lpfc_hba *, struct lpfc_scsi_buf *); argument
599 (struct lpfc_hba *); argument
606 (struct lpfc_hba *, uint32_t, argument
608 void (*__lpfc_sli_release_iocbq)(struct lpfc_hba *, argument
610 int (*lpfc_hba_down_post)(struct lpfc_hba *phba); argument
614 (struct lpfc_hba *, struct lpfc_iocbq *, struct lpfc_iocbq *); argument
618 (struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); argument
622 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring, argument
627 (struct lpfc_hba *, uint32_t, struct hbq_dmabuf *); argument
629 (struct lpfc_hba *); argument
631 (struct lpfc_hba *, uint32_t); argument
633 (struct lpfc_hba *); argument
635 (struct lpfc_hba *); argument
636 int (*lpfc_hba_init_link) argument
638 int (*lpfc_hba_down_link) argument
641 (struct lpfc_hba *); argument
644 (struct lpfc_hba *, struct lpfc_scsi_buf *); argument
648 struct lpfc_sli4_hba sli4_hba;
650 struct workqueue_struct *wq;
652 struct lpfc_sli sli;
653 uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
654 uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
655 uint32_t sli3_options; /* Mask of enabled SLI3 options */
664 uint32_t iocb_cmd_size;
665 uint32_t iocb_rsp_size;
667 enum hba_state link_state;
668 uint32_t link_flag; /* link state flags */
677 uint32_t hba_flag; /* hba generic flags */
702 uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
703 struct lpfc_dmabuf slim2p;
705 MAILBOX_t *mbox;
706 uint32_t *mbox_ext;
707 struct lpfc_mbox_ext_buf_ctx mbox_ext_buf_ctx;
708 uint32_t ha_copy;
709 struct _PCB *pcb;
710 struct _IOCB *IOCBs;
712 struct lpfc_dmabuf hbqslimp;
714 uint16_t pci_cfg_value;
716 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
718 uint32_t fc_eventTag; /* event tag for link attention */
719 uint32_t link_events;
722 uint32_t fc_pref_DID; /* preferred D_ID */
723 uint8_t fc_pref_ALPA; /* preferred AL_PA */
724 uint32_t fc_edtovResol; /* E_D_TOV timer resolution */
725 uint32_t fc_edtov; /* E_D_TOV timer value */
726 uint32_t fc_arbtov; /* ARB_TOV timer value */
727 uint32_t fc_ratov; /* R_A_TOV timer value */
728 uint32_t fc_rttov; /* R_T_TOV timer value */
729 uint32_t fc_altov; /* AL_TOV timer value */
730 uint32_t fc_crtov; /* C_R_TOV timer value */
732 struct serv_parm fc_fabparam; /* fabric service parameters buffer */
733 uint8_t alpa_map[128]; /* AL_PA map from READ_LA */
735 uint32_t lmt;
737 uint32_t fc_topology; /* link topology, from LINK INIT */
738 uint32_t fc_topology_changed; /* link topology, from LINK INIT */
740 struct lpfc_stats fc_stat;
742 struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
743 uint32_t nport_event_cnt; /* timestamp for nlplist entry */
745 uint8_t wwnn[8];
746 uint8_t wwpn[8];
747 uint32_t RandomData[7];
748 uint8_t fcp_embed_io;
749 uint8_t nvme_support; /* Firmware supports NVME */
750 uint8_t nvmet_support; /* driver supports NVMET */
752 uint8_t mds_diags_support;
753 uint32_t initial_imax;
754 uint8_t bbcredit_support;
755 uint8_t enab_exp_wqcq_pages;
758 uint32_t cfg_ack0;
759 uint32_t cfg_enable_npiv;
760 uint32_t cfg_enable_rrq;
761 uint32_t cfg_topology;
762 uint32_t cfg_link_speed;
765 uint32_t cfg_fcf_failover_policy;
766 uint32_t cfg_fcp_io_sched;
767 uint32_t cfg_fcp2_no_tgt_reset;
768 uint32_t cfg_cr_delay;
769 uint32_t cfg_cr_count;
770 uint32_t cfg_multi_ring_support;
771 uint32_t cfg_multi_ring_rctl;
772 uint32_t cfg_multi_ring_type;
773 uint32_t cfg_poll;
774 uint32_t cfg_poll_tmo;
775 uint32_t cfg_task_mgmt_tmo;
776 uint32_t cfg_use_msi;
777 uint32_t cfg_auto_imax;
778 uint32_t cfg_fcp_imax;
779 uint32_t cfg_fcp_cpu_map;
780 uint32_t cfg_fcp_io_channel;
781 uint32_t cfg_suppress_rsp;
782 uint32_t cfg_nvme_oas;
783 uint32_t cfg_nvme_embed_cmd;
784 uint32_t cfg_nvme_io_channel;
785 uint32_t cfg_nvmet_mrq_post;
786 uint32_t cfg_nvmet_mrq;
787 uint32_t cfg_enable_nvmet;
788 uint32_t cfg_nvme_enable_fb;
789 uint32_t cfg_nvmet_fb_size;
790 uint32_t cfg_total_seg_cnt;
791 uint32_t cfg_sg_seg_cnt;
792 uint32_t cfg_nvme_seg_cnt;
793 uint32_t cfg_sg_dma_buf_size;
794 uint64_t cfg_soft_wwnn;
795 uint64_t cfg_soft_wwpn;
796 uint32_t cfg_hba_queue_depth;
797 uint32_t cfg_enable_hba_reset;
798 uint32_t cfg_enable_hba_heartbeat;
799 uint32_t cfg_fof;
800 uint32_t cfg_EnableXLane;
801 uint8_t cfg_oas_tgt_wwpn[8];
802 uint8_t cfg_oas_vpt_wwpn[8];
803 uint32_t cfg_oas_lun_state;
806 uint32_t cfg_oas_lun_status;
808 uint32_t cfg_oas_flags;
812 uint32_t cfg_oas_priority;
813 uint32_t cfg_XLanePriority;
814 uint32_t cfg_enable_bg;
815 uint32_t cfg_prot_mask;
816 uint32_t cfg_prot_guard;
817 uint32_t cfg_hostmem_hgp;
818 uint32_t cfg_log_verbose;
819 uint32_t cfg_aer_support;
820 uint32_t cfg_sriov_nr_virtfn;
821 uint32_t cfg_request_firmware_upgrade;
822 uint32_t cfg_iocb_cnt;
823 uint32_t cfg_suppress_link_up;
824 uint32_t cfg_rrq_xri_bitmap_sz;
825 uint32_t cfg_delay_discovery;
826 uint32_t cfg_sli_mode;
830 uint32_t cfg_enable_dss;
831 uint32_t cfg_fdmi_on;
834 uint32_t cfg_enable_SmartSAN;
835 uint32_t cfg_enable_mds_diags;
836 uint32_t cfg_enable_fc4_type;
837 uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */
838 uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */
839 uint32_t cfg_xri_split;
843 uint32_t cfg_enable_pbde;
844 uint32_t io_channel_irqs; /* number of irqs for io channels */
845 struct nvmet_fc_target_port *targetport;
846 lpfc_vpd_t vpd; /* vital product data */
848 struct pci_dev *pcidev;
849 struct list_head work_list;
850 uint32_t work_ha; /* Host Attention Bits for WT */
851 uint32_t work_ha_mask; /* HA Bits owned by WT */
852 uint32_t work_hs; /* HS stored in case of ERRAT */
853 uint32_t work_status[2]; /* Extra status from SLIM */
855 wait_queue_head_t work_waitq;
856 struct task_struct *worker_thread;
857 unsigned long data_flags;
859 uint32_t hbq_in_use; /* HBQs in use flag */
860 uint32_t hbq_count; /* Count of configured HBQs */
861 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
863 atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
864 atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
866 phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
867 phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
868 phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
869 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
871 void __iomem *ctrl_regs_memmap_p;/* Kernel memory mapped address for
874 void __iomem *pci_bar0_memmap_p; /* Kernel memory mapped address for
876 void __iomem *pci_bar2_memmap_p; /* Kernel memory mapped address for
878 void __iomem *pci_bar4_memmap_p; /* Kernel memory mapped address for
883 void __iomem *MBslimaddr; /* virtual address for mbox cmds */
884 void __iomem *HAregaddr; /* virtual address for host attn reg */
885 void __iomem *CAregaddr; /* virtual address for chip attn reg */
886 void __iomem *HSregaddr; /* virtual address for host status
888 void __iomem *HCregaddr; /* virtual address for host ctl reg */
890 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
891 struct lpfc_pgp *port_gp;
892 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
893 uint32_t *hbq_get; /* Host mem address of HBQ get ptrs */
895 int brd_no; /* FC board number */
896 char SerialNumber[32]; /* adapter Serial Number */
897 char OptionROMVersion[32]; /* adapter BIOS / Fcode version */
898 char ModelDesc[256]; /* Model Description */
899 char ModelName[80]; /* Model Name */
900 char ProgramType[256]; /* Program Type */
901 char Port[20]; /* Port No */
902 uint8_t vpd_flag; /* VPD data flag */
910 uint8_t soft_wwn_enable;
912 struct timer_list fcp_poll_timer;
913 struct timer_list eratt_poll;
914 uint32_t eratt_poll_interval;
919 atomic_t fc4ScsiInputRequests;
920 atomic_t fc4ScsiOutputRequests;
921 atomic_t fc4ScsiControlRequests;
922 atomic_t fc4ScsiIoCmpls;
924 uint64_t bg_guard_err_cnt;
925 uint64_t bg_apptag_err_cnt;
926 uint64_t bg_reftag_err_cnt;
929 spinlock_t scsi_buf_list_get_lock; /* SCSI buf alloc list lock */
930 spinlock_t scsi_buf_list_put_lock; /* SCSI buf free list lock */
931 struct list_head lpfc_scsi_buf_list_get;
932 struct list_head lpfc_scsi_buf_list_put;
933 uint32_t total_scsi_bufs;
934 spinlock_t nvme_buf_list_get_lock; /* NVME buf alloc list lock */
935 spinlock_t nvme_buf_list_put_lock; /* NVME buf free list lock */
936 struct list_head lpfc_nvme_buf_list_get;
937 struct list_head lpfc_nvme_buf_list_put;
938 uint32_t total_nvme_bufs;
939 uint32_t get_nvme_bufs;
940 uint32_t put_nvme_bufs;
941 struct list_head lpfc_iocb_list;
942 uint32_t total_iocbq_bufs;
943 struct list_head active_rrq_list;
944 spinlock_t hbalock;
947 struct dma_pool *lpfc_sg_dma_buf_pool;
948 struct dma_pool *lpfc_mbuf_pool;
949 struct dma_pool *lpfc_hrb_pool; /* header receive buffer pool */
950 struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
951 struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
952 struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
953 struct dma_pool *txrdy_payload_pool;
954 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
956 mempool_t *mbox_mem_pool;
957 mempool_t *nlp_mem_pool;
958 mempool_t *rrq_pool;
959 mempool_t *active_rrq_pool;
961 struct fc_host_statistics link_stats;
962 enum intr_type_t intr_type;
963 uint32_t intr_mode;
965 struct list_head port_list;
966 struct lpfc_vport *pport; /* physical lpfc_vport pointer */
967 uint16_t max_vpi; /* Maximum virtual nports */
969 uint16_t max_vports; /*
975 uint16_t vpi_base;
976 uint16_t vfi_base;
977 unsigned long *vpi_bmask; /* vpi allocation table */
978 uint16_t *vpi_ids;
979 uint16_t vpi_count;
980 struct list_head lpfc_vpi_blk_list;
983 struct list_head fabric_iocb_list;
984 atomic_t fabric_iocb_count;
985 struct timer_list fabric_block_timer;
986 unsigned long bit_flags;
988 atomic_t num_rsrc_err;
989 atomic_t num_cmd_success;
990 unsigned long last_rsrc_error_time;
991 unsigned long last_ramp_down_time;
993 struct dentry *hba_debugfs_root;
994 atomic_t debugfs_vport_count;
995 struct dentry *debug_hbqinfo;
996 struct dentry *debug_dumpHostSlim;
997 struct dentry *debug_dumpHBASlim;
998 struct dentry *debug_dumpData; /* BlockGuard BPL */
999 struct dentry *debug_dumpDif; /* BlockGuard BPL */
1000 struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1001 struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1002 struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1003 struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1004 struct dentry *debug_writeApp; /* inject write app_tag errors */
1005 struct dentry *debug_writeRef; /* inject write ref_tag errors */
1006 struct dentry *debug_readGuard; /* inject read guard_tag errors */
1007 struct dentry *debug_readApp; /* inject read app_tag errors */
1008 struct dentry *debug_readRef; /* inject read ref_tag errors */
1010 struct dentry *debug_nvmeio_trc;
1011 struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1012 atomic_t nvmeio_trc_cnt;
1013 uint32_t nvmeio_trc_size;
1014 uint32_t nvmeio_trc_output_idx;
1017 uint32_t lpfc_injerr_wgrd_cnt;
1018 uint32_t lpfc_injerr_wapp_cnt;
1019 uint32_t lpfc_injerr_wref_cnt;
1020 uint32_t lpfc_injerr_rgrd_cnt;
1021 uint32_t lpfc_injerr_rapp_cnt;
1022 uint32_t lpfc_injerr_rref_cnt;
1023 uint32_t lpfc_injerr_nportid;
1024 struct lpfc_name lpfc_injerr_wwpn;
1025 sector_t lpfc_injerr_lba;
1028 struct dentry *debug_slow_ring_trc;
1029 struct lpfc_debugfs_trc *slow_ring_trc;
1030 atomic_t slow_ring_trc_cnt;
1032 struct dentry *idiag_root;
1033 struct dentry *idiag_pci_cfg;
1034 struct dentry *idiag_bar_acc;
1035 struct dentry *idiag_que_info;
1036 struct dentry *idiag_que_acc;
1037 struct dentry *idiag_drb_acc;
1038 struct dentry *idiag_ctl_acc;
1039 struct dentry *idiag_mbx_acc;
1040 struct dentry *idiag_ext_acc;
1041 uint8_t lpfc_idiag_last_eq;
1043 uint16_t nvmeio_trc_on;
1046 struct list_head elsbuf;
1047 int elsbuf_cnt;
1048 int elsbuf_prev_cnt;
1050 uint8_t temp_sensor_support;
1052 unsigned long last_eqdelay_time;
1053 unsigned long last_completion_time;
1054 unsigned long skipped_hb;
1055 struct timer_list hb_tmofunc;
1056 uint8_t hb_outstanding;
1057 struct timer_list rrq_tmr;
1058 enum hba_temp_state over_temp_state;
1060 spinlock_t ndlp_lock;
1066 uint32_t buffer_tag_count;
1067 int wait_4_mlo_maint_flg;
1068 wait_queue_head_t wait_4_mlo_m_q;
1073 uint8_t bucket_type;
1074 uint32_t bucket_base;
1075 uint32_t bucket_step;
1079 atomic_t fast_event_count;
1080 uint32_t fcoe_eventtag;
1081 uint32_t fcoe_eventtag_at_fcf_scan;
1082 uint32_t fcoe_cvl_eventtag;
1083 uint32_t fcoe_cvl_eventtag_attn;
1084 struct lpfc_fcf fcf;
1085 uint8_t fc_map[3];
1086 uint8_t valid_vlan;
1087 uint16_t vlan_id;
1088 struct list_head fcf_conn_rec_list;
1090 spinlock_t ct_ev_lock; /* synchronize access to ct_ev_waiters */
1091 struct list_head ct_ev_waiters;
1092 struct unsol_rcv_ct_ctx ct_ctx[LPFC_CT_CTX_MAX];
1093 uint32_t ctx_idx;
1095 uint8_t menlo_flag; /* menlo generic flags */
1097 uint32_t iocb_cnt;
1098 uint32_t iocb_max;
1099 atomic_t sdev_cnt;
1100 uint8_t fips_spec_rev;
1101 uint8_t fips_level;
1102 spinlock_t devicelock; /* lock for luns list */
1103 mempool_t *device_data_mem_pool;
1104 struct list_head luns;
1115 uint16_t sfp_alarm;
1116 uint16_t sfp_warning;
1120 uint32_t cpucheck_rcv_io[LPFC_CHECK_CPU_CNT];
1121 uint32_t cpucheck_xmt_io[LPFC_CHECK_CPU_CNT];
1122 uint32_t cpucheck_cmpl_io[LPFC_CHECK_CPU_CNT];
1123 uint32_t cpucheck_ccmpl_io[LPFC_CHECK_CPU_CNT];
1124 uint16_t cpucheck_on;
1129 uint16_t ktime_on;
1130 uint64_t ktime_data_samples;
1131 uint64_t ktime_status_samples;
1132 uint64_t ktime_last_cmd;
1133 uint64_t ktime_seg1_total;
1134 uint64_t ktime_seg1_min;
1135 uint64_t ktime_seg1_max;
1136 uint64_t ktime_seg2_total;
1137 uint64_t ktime_seg2_min;
1138 uint64_t ktime_seg2_max;
1139 uint64_t ktime_seg3_total;
1140 uint64_t ktime_seg3_min;
1141 uint64_t ktime_seg3_max;
1142 uint64_t ktime_seg4_total;
1143 uint64_t ktime_seg4_min;
1144 uint64_t ktime_seg4_max;
1145 uint64_t ktime_seg5_total;
1146 uint64_t ktime_seg5_min;
1147 uint64_t ktime_seg5_max;
1148 uint64_t ktime_seg6_total;
1149 uint64_t ktime_seg6_min;
1173 lpfc_set_loopback_flag(struct lpfc_hba *phba) in lpfc_set_loopback_flag() argument