Home
last modified time | relevance | path

Searched refs:phba (Results 1 – 25 of 28) sorted by relevance

12

/linux/drivers/scsi/lpfc/
H A Dlpfc_init.c72 static void __lpfc_cpuhp_remove(struct lpfc_hba *phba);
73 static void lpfc_cpuhp_remove(struct lpfc_hba *phba);
74 static void lpfc_cpuhp_add(struct lpfc_hba *phba);
86 static int lpfc_hba_down_post_s3(struct lpfc_hba *phba);
87 static int lpfc_hba_down_post_s4(struct lpfc_hba *phba);
93 static void lpfc_sli4_oas_verify(struct lpfc_hba *phba);
97 static void lpfc_sli4_async_cmstat_evt(struct lpfc_hba *phba);
98 static void lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba);
104 static int lpfc_vmid_res_alloc(struct lpfc_hba *phba, struct lpfc_vport *vport);
105 static void lpfc_cgn_update_tstamp(struct lpfc_hba *phba, struct lpfc_cgn_ts *ts);
[all …]
H A Dlpfc_mem.c60 lpfc_mem_free_sli_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mem_free_sli_mbox() argument
66 if (phba->sli_rev == LPFC_SLI_REV4 && in lpfc_mem_free_sli_mbox()
68 lpfc_sli4_mbox_cmd_free(phba, mbox); in lpfc_mem_free_sli_mbox()
70 lpfc_mbox_rsrc_cleanup(phba, mbox, MBOX_THD_UNLOCKED); in lpfc_mem_free_sli_mbox()
75 lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) { in lpfc_mem_alloc_active_rrq_pool_s4() argument
77 int max_xri = phba->sli4_hba.max_cfg_param.max_xri; in lpfc_mem_alloc_active_rrq_pool_s4()
83 phba->cfg_rrq_xri_bitmap_sz = bytes; in lpfc_mem_alloc_active_rrq_pool_s4()
84 phba->active_rrq_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE, in lpfc_mem_alloc_active_rrq_pool_s4()
86 if (!phba->active_rrq_pool) in lpfc_mem_alloc_active_rrq_pool_s4()
109 lpfc_mem_alloc(struct lpfc_hba *phba, int align) in lpfc_mem_alloc() argument
[all …]
H A Dlpfc_sli.c75 lpfc_sli4_els_preprocess_rspiocbq(struct lpfc_hba *phba,
81 static bool lpfc_sli4_fp_handle_cqe(struct lpfc_hba *phba,
85 static void lpfc_sli4_hba_handle_eqe(struct lpfc_hba *phba,
89 static bool lpfc_sli4_mbox_completions_pending(struct lpfc_hba *phba);
90 static bool lpfc_sli4_process_missed_mbox_completions(struct lpfc_hba *phba);
92 static void __lpfc_sli4_consume_cqe(struct lpfc_hba *phba,
95 static uint16_t lpfc_wqe_bpl2sgl(struct lpfc_hba *phba,
294 if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED) in lpfc_sli4_wq_put()
297 if (q->dpp_enable && q->phba->cfg_enable_dpp) { in lpfc_sli4_wq_put()
321 if (q->dpp_enable && q->phba->cfg_enable_dpp) { in lpfc_sli4_wq_put()
[all …]
H A Dlpfc_hbadisc.c75 static void lpfc_check_inactive_vmid(struct lpfc_hba *phba);
76 static void lpfc_check_vmid_qfpa_issue(struct lpfc_hba *phba);
161 struct lpfc_hba *phba; in lpfc_dev_loss_tmo_callbk() local
171 phba = vport->phba; in lpfc_dev_loss_tmo_callbk()
186 (phba->sli_rev == LPFC_SLI_REV4 && in lpfc_dev_loss_tmo_callbk()
187 !test_bit(HBA_SETUP, &phba->hba_flag))) { in lpfc_dev_loss_tmo_callbk()
278 if (phba->worker_thread) { in lpfc_dev_loss_tmo_callbk()
284 spin_lock_irqsave(&phba->hbalock, iflags); in lpfc_dev_loss_tmo_callbk()
287 list_add_tail(&evtp->evt_listp, &phba->work_list); in lpfc_dev_loss_tmo_callbk()
288 spin_unlock_irqrestore(&phba->hbalock, iflags); in lpfc_dev_loss_tmo_callbk()
[all …]
H A Dlpfc_attr.c123 struct lpfc_hba *phba = vport->phba; in lpfc_cmf_info_show() local
131 if (phba->cgn_i) in lpfc_cmf_info_show()
132 cp = (struct lpfc_cgn_info *)phba->cgn_i->virt; in lpfc_cmf_info_show()
137 phba->sli4_hba.pc_sli4_params.mi_cap, in lpfc_cmf_info_show()
139 phba->sli4_hba.pc_sli4_params.cmf, phba->cmf_timer_cnt); in lpfc_cmf_info_show()
144 if (!phba->sli4_hba.pc_sli4_params.cmf) in lpfc_cmf_info_show()
147 switch (phba->cgn_init_reg_signal) { in lpfc_cmf_info_show()
164 switch (phba->cgn_init_reg_fpin) { in lpfc_cmf_info_show()
185 switch (phba->cgn_reg_signal) { in lpfc_cmf_info_show()
202 switch (phba->cgn_reg_fpin) { in lpfc_cmf_info_show()
[all …]
H A Dlpfc_bsg.c140 lpfc_free_bsg_buffers(struct lpfc_hba *phba, struct lpfc_dmabuf *mlist) in lpfc_free_bsg_buffers() argument
148 lpfc_mbuf_free(phba, mlast->virt, mlast->phys); in lpfc_free_bsg_buffers()
151 lpfc_mbuf_free(phba, mlist->virt, mlist->phys); in lpfc_free_bsg_buffers()
158 lpfc_alloc_bsg_buffers(struct lpfc_hba *phba, unsigned int size, in lpfc_alloc_bsg_buffers() argument
180 lpfc_free_bsg_buffers(phba, mlist); in lpfc_alloc_bsg_buffers()
185 mp->virt = lpfc_mbuf_alloc(phba, MEM_PRI, &(mp->phys)); in lpfc_alloc_bsg_buffers()
190 lpfc_free_bsg_buffers(phba, mlist); in lpfc_alloc_bsg_buffers()
300 lpfc_bsg_send_mgmt_cmd_cmp(struct lpfc_hba *phba, in lpfc_bsg_send_mgmt_cmd_cmp() argument
317 spin_lock_irqsave(&phba->ct_ev_lock, flags); in lpfc_bsg_send_mgmt_cmd_cmp()
324 spin_unlock_irqrestore(&phba->ct_ev_lock, flags); in lpfc_bsg_send_mgmt_cmd_cmp()
[all …]
H A Dlpfc_nvmet.c217 lpfc_nvmet_get_ctx_for_xri(struct lpfc_hba *phba, u16 xri) in lpfc_nvmet_get_ctx_for_xri() argument
223 spin_lock_irqsave(&phba->sli4_hba.t_active_list_lock, iflag); in lpfc_nvmet_get_ctx_for_xri()
224 list_for_each_entry(ctxp, &phba->sli4_hba.t_active_ctx_list, list) { in lpfc_nvmet_get_ctx_for_xri()
231 spin_unlock_irqrestore(&phba->sli4_hba.t_active_list_lock, iflag); in lpfc_nvmet_get_ctx_for_xri()
239 lpfc_nvmet_get_ctx_for_oxid(struct lpfc_hba *phba, u16 oxid, u32 sid) in lpfc_nvmet_get_ctx_for_oxid() argument
245 spin_lock_irqsave(&phba->sli4_hba.t_active_list_lock, iflag); in lpfc_nvmet_get_ctx_for_oxid()
246 list_for_each_entry(ctxp, &phba->sli4_hba.t_active_ctx_list, list) { in lpfc_nvmet_get_ctx_for_oxid()
253 spin_unlock_irqrestore(&phba->sli4_hba.t_active_list_lock, iflag); in lpfc_nvmet_get_ctx_for_oxid()
262 lpfc_nvmet_defer_release(struct lpfc_hba *phba, in lpfc_nvmet_defer_release() argument
267 lpfc_printf_log(phba, KERN_INFO, LOG_NVME_ABTS, in lpfc_nvmet_defer_release()
[all …]
H A Dlpfc_vport.c88 lpfc_alloc_vpi(struct lpfc_hba *phba) in lpfc_alloc_vpi() argument
92 spin_lock_irq(&phba->hbalock); in lpfc_alloc_vpi()
94 vpi = find_next_zero_bit(phba->vpi_bmask, (phba->max_vpi + 1), 1); in lpfc_alloc_vpi()
95 if (vpi > phba->max_vpi) in lpfc_alloc_vpi()
98 set_bit(vpi, phba->vpi_bmask); in lpfc_alloc_vpi()
99 if (phba->sli_rev == LPFC_SLI_REV4) in lpfc_alloc_vpi()
100 phba->sli4_hba.max_cfg_param.vpi_used++; in lpfc_alloc_vpi()
101 spin_unlock_irq(&phba->hbalock); in lpfc_alloc_vpi()
106 lpfc_free_vpi(struct lpfc_hba *phba, int vpi) in lpfc_free_vpi() argument
110 spin_lock_irq(&phba->hbalock); in lpfc_free_vpi()
[all …]
H A Dlpfc_mbox.c63 lpfc_mbox_rsrc_prep(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mbox_rsrc_prep() argument
71 mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); in lpfc_mbox_rsrc_prep()
100 lpfc_mbox_rsrc_cleanup(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox, in lpfc_mbox_rsrc_cleanup() argument
111 __lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_mbox_rsrc_cleanup()
113 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_mbox_rsrc_cleanup()
117 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_mbox_rsrc_cleanup()
133 lpfc_dump_static_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, in lpfc_dump_static_vport() argument
151 if (phba->sli_rev != LPFC_SLI_REV4) { in lpfc_dump_static_vport()
157 rc = lpfc_mbox_rsrc_prep(phba, pmb); in lpfc_dump_static_vport()
159 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, in lpfc_dump_static_vport()
[all …]
H A Dlpfc_els.c57 static int lpfc_issue_fabric_iocb(struct lpfc_hba *phba,
59 static void lpfc_cmpl_els_edc(struct lpfc_hba *phba,
96 struct lpfc_hba *phba = vport->phba; in lpfc_els_chk_latt() local
100 phba->link_state == LPFC_LINK_DOWN || in lpfc_els_chk_latt()
101 phba->sli_rev > LPFC_SLI_REV3) in lpfc_els_chk_latt()
105 if (lpfc_readl(phba->HAregaddr, &ha_copy)) in lpfc_els_chk_latt()
115 phba->pport->port_state); in lpfc_els_chk_latt()
125 if (phba->link_state != LPFC_CLEAR_LA) in lpfc_els_chk_latt()
126 lpfc_issue_clear_la(phba, vport); in lpfc_els_chk_latt()
174 struct lpfc_hba *phba = vport->phba; in lpfc_prep_els_iocb() local
[all …]
H A Dlpfc_logmsg.h53 void lpfc_dmp_dbg(struct lpfc_hba *phba);
54 void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...);
59 dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
60 fmt, (vport)->phba->brd_no, vport->vpi, ##arg); }
62 #define lpfc_log_msg(phba, level, mask, fmt, arg...) \ argument
64 { uint32_t log_verbose = (phba)->pport ? \
65 (phba)->pport->cfg_log_verbose : \
66 (phba)->cfg_log_verbose; \
68 dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
69 fmt, phba->brd_no, ##arg); \
[all …]
H A Dlpfc_ct.c79 lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
83 lpfc_ct_ignore_hbq_buffer(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq, in lpfc_ct_ignore_hbq_buffer() argument
87 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, in lpfc_ct_ignore_hbq_buffer()
90 get_job_ulpstatus(phba, piocbq)); in lpfc_ct_ignore_hbq_buffer()
92 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, in lpfc_ct_ignore_hbq_buffer()
95 size, get_job_ulpstatus(phba, piocbq)); in lpfc_ct_ignore_hbq_buffer()
99 lpfc_ct_unsol_buffer(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq, in lpfc_ct_unsol_buffer() argument
102 lpfc_ct_ignore_hbq_buffer(phba, piocbq, mp, size); in lpfc_ct_unsol_buffer()
115 lpfc_ct_unsol_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, in lpfc_ct_unsol_cmpl() argument
128 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_ct_unsol_cmpl()
[all …]
H A Dlpfc_nportdisc.c177 lpfc_check_elscmpl_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, in lpfc_check_elscmpl_iocb() argument
183 u32 ulp_status = get_job_ulpstatus(phba, rspiocb); in lpfc_check_elscmpl_iocb()
200 if (phba->sli_rev == LPFC_SLI_REV4) { in lpfc_check_elscmpl_iocb()
222 lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) in lpfc_els_abort() argument
230 pring = lpfc_phba_elsring(phba); in lpfc_els_abort()
250 spin_lock_irq(&phba->hbalock); in lpfc_els_abort()
251 if (phba->sli_rev == LPFC_SLI_REV4) in lpfc_els_abort()
255 if (lpfc_check_sli_ndlp(phba, pring, iocb, ndlp)) in lpfc_els_abort()
258 if (phba->sli_rev == LPFC_SLI_REV4) in lpfc_els_abort()
260 spin_unlock_irq(&phba->hbalock); in lpfc_els_abort()
[all …]
H A Dlpfc.h614 struct lpfc_hba *phba; member
917 (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
944 (struct lpfc_hba *phba, uint32_t ring_number,
948 int (*lpfc_hba_down_post)(struct lpfc_hba *phba);
956 (struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
1585 lpfc_set_loopback_flag(struct lpfc_hba *phba) in lpfc_set_loopback_flag() argument
1587 if (phba->cfg_topology == FLAGS_LOCAL_LB) in lpfc_set_loopback_flag()
1588 phba->link_flag |= LS_LOOPBACK_MODE; in lpfc_set_loopback_flag()
1590 phba->link_flag &= ~LS_LOOPBACK_MODE; in lpfc_set_loopback_flag()
1594 lpfc_is_link_up(struct lpfc_hba *phba) in lpfc_is_link_up() argument
[all …]
H A Dlpfc_nvme.h101 struct lpfc_hba *phba; member
168 #define lpfc_get_ctx_list(phba, cpu, mrq) \ argument
169 (phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq))
196 struct lpfc_hba *phba; member
235 void (*gen_req_cmp)(struct lpfc_hba *phba,
238 void __lpfc_nvme_ls_req_cmp(struct lpfc_hba *phba, struct lpfc_vport *vport,
244 int lpfc_nvme_unsol_ls_issue_abort(struct lpfc_hba *phba,
249 void (*xmt_ls_rsp_cmp)(struct lpfc_hba *phba,
252 void __lpfc_nvme_xmt_ls_rsp_cmp(struct lpfc_hba *phba,
H A Dlpfc_disc.h142 struct lpfc_hba *phba; member
182 #define lpfc_ndlp_check_qdepth(phba, ndlp) \ argument
183 (ndlp->cmd_qdepth < phba->sli4_hba.max_cfg_param.max_xri)
H A Dlpfc_sli.h146 void (*fabric_cmd_cmpl)(struct lpfc_hba *phba, struct lpfc_iocbq *cmd,
148 void (*wait_cmd_cmpl)(struct lpfc_hba *phba, struct lpfc_iocbq *cmd,
150 void (*cmd_cmpl)(struct lpfc_hba *phba, struct lpfc_iocbq *cmd,
/linux/drivers/scsi/be2iscsi/
H A Dbe_main.c75 struct beiscsi_hba *phba = iscsi_host_priv(shost); \
77 phba->attr_##_name);\
82 beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\
85 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,\
88 phba->attr_##_name, val); \
89 phba->attr_##_name = val;\
92 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, \
106 struct beiscsi_hba *phba = iscsi_host_priv(shost);\
112 if (beiscsi_##_name##_change(phba, param_val) == 0) \
120 beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \
[all …]
H A Dbe_iscsi.c43 struct beiscsi_hba *phba; in beiscsi_session_create() local
54 phba = beiscsi_ep->phba; in beiscsi_session_create()
56 if (!beiscsi_hba_is_online(phba)) { in beiscsi_session_create()
57 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in beiscsi_session_create()
58 "BS_%d : HBA in error 0x%lx\n", phba->state); in beiscsi_session_create()
62 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in beiscsi_session_create()
64 if (cmds_max > beiscsi_ep->phba->params.wrbs_per_cxn) { in beiscsi_session_create()
65 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, in beiscsi_session_create()
69 beiscsi_ep->phba->params.wrbs_per_cxn, in beiscsi_session_create()
70 beiscsi_ep->phba->params.wrbs_per_cxn); in beiscsi_session_create()
[all …]
H A Dbe_cmds.c88 struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba, in alloc_mcc_wrb() argument
91 struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q; in alloc_mcc_wrb()
95 spin_lock(&phba->ctrl.mcc_lock); in alloc_mcc_wrb()
97 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT | in alloc_mcc_wrb()
100 mccq->used, phba->ctrl.mcc_tag_available); in alloc_mcc_wrb()
104 if (!phba->ctrl.mcc_tag_available) in alloc_mcc_wrb()
107 tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index]; in alloc_mcc_wrb()
109 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT | in alloc_mcc_wrb()
112 phba->ctrl.mcc_tag_available, in alloc_mcc_wrb()
113 phba->ctrl.mcc_alloc_index); in alloc_mcc_wrb()
[all …]
H A Dbe_mgmt.c34 struct beiscsi_hba *phba, in mgmt_vendor_specific_fw_cmd() argument
71 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_vendor_specific_fw_cmd()
79 wrb = alloc_mcc_wrb(phba, &tag); in mgmt_vendor_specific_fw_cmd()
92 be_mcc_notify(phba, tag); in mgmt_vendor_specific_fw_cmd()
109 int mgmt_open_connection(struct beiscsi_hba *phba, in mgmt_open_connection() argument
118 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_open_connection()
131 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, in mgmt_open_connection()
137 phwi_ctrlr = phba->phwi_ctrlr; in mgmt_open_connection()
142 def_hdr_id = (unsigned short)HWI_GET_DEF_HDRQ_ID(phba, ulp_num); in mgmt_open_connection()
143 def_data_id = (unsigned short)HWI_GET_DEF_BUFQ_ID(phba, ulp_num); in mgmt_open_connection()
[all …]
H A Dbe_mgmt.h29 int mgmt_open_connection(struct beiscsi_hba *phba,
35 struct beiscsi_hba *phba,
141 #define GET_MGMT_CONTROLLER_WS(phba) (phba->pmgmt_ws) argument
144 pa->lo = phba->init_mem[ISCSI_MEM_GLOBAL_HEADER].mem_array[0].\
146 pa->hi = phba->init_mem[ISCSI_MEM_GLOBAL_HEADER].mem_array[0].\
154 struct beiscsi_hba *phba; member
166 int beiscsi_mgmt_invalidate_icds(struct beiscsi_hba *phba,
170 int beiscsi_get_initiator_name(struct beiscsi_hba *phba, char *name, bool cfg);
172 int beiscsi_if_en_dhcp(struct beiscsi_hba *phba, u32 ip_type);
174 int beiscsi_if_en_static(struct beiscsi_hba *phba, u32 ip_type,
[all …]
H A Dbe_main.h251 #define chip_be2(phba) (phba->generation == BE_GEN2) argument
252 #define chip_be3_r(phba) (phba->generation == BE_GEN3) argument
253 #define is_chip_be2_be3r(phba) (chip_be3_r(phba) || (chip_be2(phba))) argument
261 #define BEISCSI_ULP_AVLBL_CID(phba, ulp_num) \ argument
262 (((struct ulp_cid_info *)phba->cid_array_info[ulp_num])->avlbl_cids)
263 #define BEISCSI_ULP0_AVLBL_CID(phba) \ argument
264 BEISCSI_ULP_AVLBL_CID(phba, BEISCSI_ULP0)
265 #define BEISCSI_ULP1_AVLBL_CID(phba) \ argument
266 BEISCSI_ULP_AVLBL_CID(phba, BEISCSI_ULP1)
299 (phba->cid_to_cri_map[cid] = cri_index)
[all …]
H A Dbe_iscsi.h16 void beiscsi_iface_create_default(struct beiscsi_hba *phba);
18 void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
32 void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
58 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
H A Dbe_cmds.h788 int beiscsi_cmd_function_reset(struct beiscsi_hba *phba);
792 int beiscsi_check_fw_rdy(struct beiscsi_hba *phba);
794 int beiscsi_init_sliport(struct beiscsi_hba *phba);
796 int beiscsi_cmd_iscsi_cleanup(struct beiscsi_hba *phba, unsigned short ulp_num);
798 int beiscsi_detect_ue(struct beiscsi_hba *phba);
800 int beiscsi_detect_tpe(struct beiscsi_hba *phba);
812 int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
818 int beiscsi_modify_eq_delay(struct beiscsi_hba *phba, struct be_set_eqd *,
820 int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
824 int __beiscsi_mcc_compl_status(struct beiscsi_hba *phba,
[all …]

12