Lines Matching refs:phba
34 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()
146 ISCSI_GET_PDU_TEMPLATE_ADDRESS(phba, ptemplate_address); in mgmt_open_connection()
149 wrb = alloc_mcc_wrb(phba, &tag); in mgmt_open_connection()
186 i = phba->nxt_cqid++; in mgmt_open_connection()
187 if (phba->nxt_cqid == phba->num_cpus) in mgmt_open_connection()
188 phba->nxt_cqid = 0; in mgmt_open_connection()
190 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in mgmt_open_connection()
202 if (!is_chip_be2_be3r(phba)) { in mgmt_open_connection()
208 be_mcc_notify(phba, tag); in mgmt_open_connection()
222 static int beiscsi_exec_nemb_cmd(struct beiscsi_hba *phba, in beiscsi_exec_nemb_cmd() argument
228 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_exec_nemb_cmd()
235 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_exec_nemb_cmd()
253 tag_mem = &phba->ctrl.ptag_state[tag].tag_mem_state; in beiscsi_exec_nemb_cmd()
260 be_mcc_notify(phba, tag); in beiscsi_exec_nemb_cmd()
267 rc = beiscsi_mccq_compl_wait(phba, tag, NULL, nonemb_cmd); in beiscsi_exec_nemb_cmd()
293 static int beiscsi_prep_nemb_cmd(struct beiscsi_hba *phba, in beiscsi_prep_nemb_cmd() argument
297 cmd->va = dma_alloc_coherent(&phba->ctrl.pdev->dev, size, &cmd->dma, in beiscsi_prep_nemb_cmd()
300 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, in beiscsi_prep_nemb_cmd()
306 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in beiscsi_prep_nemb_cmd()
312 static void __beiscsi_eq_delay_compl(struct beiscsi_hba *phba, unsigned int tag) in __beiscsi_eq_delay_compl() argument
317 __beiscsi_mcc_compl_status(phba, tag, NULL, NULL); in __beiscsi_eq_delay_compl()
318 tag_mem = &phba->ctrl.ptag_state[tag].tag_mem_state; in __beiscsi_eq_delay_compl()
320 dma_free_coherent(&phba->pcidev->dev, tag_mem->size, in __beiscsi_eq_delay_compl()
326 int beiscsi_modify_eq_delay(struct beiscsi_hba *phba, in beiscsi_modify_eq_delay() argument
333 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_COMMON, in beiscsi_modify_eq_delay()
347 return beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, in beiscsi_modify_eq_delay()
358 int beiscsi_get_initiator_name(struct beiscsi_hba *phba, char *name, bool cfg) in beiscsi_get_initiator_name() argument
365 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI_INI, in beiscsi_get_initiator_name()
373 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, in beiscsi_get_initiator_name()
376 beiscsi_log(phba, KERN_ERR, in beiscsi_get_initiator_name()
385 unsigned int beiscsi_if_get_handle(struct beiscsi_hba *phba) in beiscsi_if_get_handle() argument
387 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_if_get_handle()
396 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_if_get_handle()
407 be_mcc_notify(phba, tag); in beiscsi_if_get_handle()
410 status = beiscsi_mccq_compl_wait(phba, tag, &wrb, NULL); in beiscsi_if_get_handle()
412 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_get_handle()
419 phba->interface_handle = pbe_allid->if_hndl_list[0]; in beiscsi_if_get_handle()
434 static int beiscsi_if_mod_gw(struct beiscsi_hba *phba, in beiscsi_if_mod_gw() argument
441 rt_val = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in beiscsi_if_mod_gw()
452 return beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, NULL, 0); in beiscsi_if_mod_gw()
455 int beiscsi_if_set_gw(struct beiscsi_hba *phba, u32 ip_type, u8 *gw) in beiscsi_if_set_gw() argument
461 rt_val = beiscsi_if_get_gw(phba, ip_type, &gw_resp); in beiscsi_if_set_gw()
463 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_set_gw()
469 rt_val = beiscsi_if_mod_gw(phba, IP_ACTION_DEL, ip_type, in beiscsi_if_set_gw()
472 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_set_gw()
478 rt_val = beiscsi_if_mod_gw(phba, IP_ACTION_ADD, ip_type, gw); in beiscsi_if_set_gw()
480 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_set_gw()
486 int beiscsi_if_get_gw(struct beiscsi_hba *phba, u32 ip_type, in beiscsi_if_get_gw() argument
493 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in beiscsi_if_get_gw()
502 return beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, in beiscsi_if_get_gw()
507 beiscsi_if_clr_ip(struct beiscsi_hba *phba, in beiscsi_if_clr_ip() argument
514 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in beiscsi_if_clr_ip()
524 phba->interface_handle; in beiscsi_if_clr_ip()
534 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, NULL, 0); in beiscsi_if_clr_ip()
536 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in beiscsi_if_clr_ip()
544 beiscsi_if_set_ip(struct beiscsi_hba *phba, u8 *ip, in beiscsi_if_set_ip() argument
552 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in beiscsi_if_set_ip()
562 phba->interface_handle; in beiscsi_if_set_ip()
572 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, NULL, 0); in beiscsi_if_set_ip()
578 __beiscsi_log(phba, KERN_ERR, in beiscsi_if_set_ip()
587 int beiscsi_if_en_static(struct beiscsi_hba *phba, u32 ip_type, in beiscsi_if_en_static() argument
595 rc = beiscsi_if_get_info(phba, ip_type, &if_info); in beiscsi_if_en_static()
600 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, in beiscsi_if_en_static()
608 reldhcp->interface_hndl = phba->interface_handle; in beiscsi_if_en_static()
610 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, NULL, 0); in beiscsi_if_en_static()
612 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_en_static()
621 rc = beiscsi_if_clr_ip(phba, if_info); in beiscsi_if_en_static()
628 rc = beiscsi_if_set_ip(phba, ip, subnet, ip_type); in beiscsi_if_en_static()
634 int beiscsi_if_en_dhcp(struct beiscsi_hba *phba, u32 ip_type) in beiscsi_if_en_dhcp() argument
643 rc = beiscsi_if_get_info(phba, ip_type, &if_info); in beiscsi_if_en_dhcp()
648 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_en_dhcp()
655 rc = beiscsi_if_clr_ip(phba, if_info); in beiscsi_if_en_dhcp()
663 rc = beiscsi_if_get_gw(phba, if_info->ip_addr.ip_type, &gw_resp); in beiscsi_if_en_dhcp()
665 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_en_dhcp()
671 rc = beiscsi_if_mod_gw(phba, IP_ACTION_DEL, in beiscsi_if_en_dhcp()
674 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in beiscsi_if_en_dhcp()
680 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in beiscsi_if_en_dhcp()
689 dhcpreq->interface_hndl = phba->interface_handle; in beiscsi_if_en_dhcp()
691 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, NULL, 0); in beiscsi_if_en_dhcp()
710 int beiscsi_if_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag) in beiscsi_if_set_vlan() argument
715 tag = be_cmd_set_vlan(phba, vlan_tag); in beiscsi_if_set_vlan()
717 beiscsi_log(phba, KERN_ERR, in beiscsi_if_set_vlan()
723 rc = beiscsi_mccq_compl_wait(phba, tag, NULL, NULL); in beiscsi_if_set_vlan()
725 beiscsi_log(phba, KERN_ERR, in beiscsi_if_set_vlan()
734 int beiscsi_if_get_info(struct beiscsi_hba *phba, int ip_type, in beiscsi_if_get_info() argument
742 rc = beiscsi_if_get_handle(phba); in beiscsi_if_get_info()
747 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, in beiscsi_if_get_info()
755 req->interface_hndl = phba->interface_handle; in beiscsi_if_get_info()
761 beiscsi_log(phba, KERN_ERR, in beiscsi_if_get_info()
766 dma_free_coherent(&phba->ctrl.pdev->dev, in beiscsi_if_get_info()
773 rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, *if_info, in beiscsi_if_get_info()
785 dma_free_coherent(&phba->ctrl.pdev->dev, nonemb_cmd.size, in beiscsi_if_get_info()
797 int mgmt_get_nic_conf(struct beiscsi_hba *phba, in mgmt_get_nic_conf() argument
803 rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI, in mgmt_get_nic_conf()
809 return beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL, in mgmt_get_nic_conf()
813 static void beiscsi_boot_process_compl(struct beiscsi_hba *phba, in beiscsi_boot_process_compl() argument
823 if (!test_bit(BEISCSI_HBA_BOOT_WORK, &phba->state)) { in beiscsi_boot_process_compl()
824 __beiscsi_log(phba, KERN_ERR, in beiscsi_boot_process_compl()
826 __func__, phba->state); in beiscsi_boot_process_compl()
830 if (phba->boot_struct.tag != tag) { in beiscsi_boot_process_compl()
831 __beiscsi_log(phba, KERN_ERR, in beiscsi_boot_process_compl()
833 __func__, tag, phba->boot_struct.tag); in beiscsi_boot_process_compl()
836 bs = &phba->boot_struct; in beiscsi_boot_process_compl()
841 status = __beiscsi_mcc_compl_status(phba, tag, NULL, NULL); in beiscsi_boot_process_compl()
848 status = __beiscsi_mcc_compl_status(phba, tag, &wrb, NULL); in beiscsi_boot_process_compl()
861 status = __beiscsi_mcc_compl_status(phba, tag, NULL, in beiscsi_boot_process_compl()
869 __beiscsi_log(phba, KERN_ERR, in beiscsi_boot_process_compl()
874 dma_free_coherent(&phba->ctrl.pdev->dev, bs->nonemb_cmd.size, in beiscsi_boot_process_compl()
879 status = __beiscsi_mcc_compl_status(phba, tag, &wrb, NULL); in beiscsi_boot_process_compl()
883 __beiscsi_log(phba, KERN_ERR, in beiscsi_boot_process_compl()
899 __beiscsi_log(phba, KERN_ERR, in beiscsi_boot_process_compl()
905 clear_bit(BEISCSI_HBA_BOOT_WORK, &phba->state); in beiscsi_boot_process_compl()
908 schedule_work(&phba->boot_work); in beiscsi_boot_process_compl()
919 unsigned int beiscsi_boot_logout_sess(struct beiscsi_hba *phba) in beiscsi_boot_logout_sess() argument
921 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_boot_logout_sess()
927 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_boot_logout_sess()
939 req->session_handle = phba->boot_struct.boot_sess.session_handle; in beiscsi_boot_logout_sess()
941 phba->boot_struct.tag = tag; in beiscsi_boot_logout_sess()
945 be_mcc_notify(phba, tag); in beiscsi_boot_logout_sess()
958 unsigned int beiscsi_boot_reopen_sess(struct beiscsi_hba *phba) in beiscsi_boot_reopen_sess() argument
960 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_boot_reopen_sess()
966 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_boot_reopen_sess()
980 phba->boot_struct.tag = tag; in beiscsi_boot_reopen_sess()
984 be_mcc_notify(phba, tag); in beiscsi_boot_reopen_sess()
999 unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba) in beiscsi_boot_get_sinfo() argument
1001 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_boot_get_sinfo()
1009 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_boot_get_sinfo()
1015 nonemb_cmd = &phba->boot_struct.nonemb_cmd; in beiscsi_boot_get_sinfo()
1017 nonemb_cmd->va = dma_alloc_coherent(&phba->ctrl.pdev->dev, in beiscsi_boot_get_sinfo()
1033 req->session_handle = phba->boot_struct.s_handle; in beiscsi_boot_get_sinfo()
1038 phba->boot_struct.tag = tag; in beiscsi_boot_get_sinfo()
1042 be_mcc_notify(phba, tag); in beiscsi_boot_get_sinfo()
1047 unsigned int __beiscsi_boot_get_shandle(struct beiscsi_hba *phba, int async) in __beiscsi_boot_get_shandle() argument
1049 struct be_ctrl_info *ctrl = &phba->ctrl; in __beiscsi_boot_get_shandle()
1055 wrb = alloc_mcc_wrb(phba, &tag); in __beiscsi_boot_get_shandle()
1068 phba->boot_struct.tag = tag; in __beiscsi_boot_get_shandle()
1073 be_mcc_notify(phba, tag); in __beiscsi_boot_get_shandle()
1088 int beiscsi_boot_get_shandle(struct beiscsi_hba *phba, unsigned int *s_handle) in beiscsi_boot_get_shandle() argument
1097 tag = __beiscsi_boot_get_shandle(phba, 0); in beiscsi_boot_get_shandle()
1099 beiscsi_log(phba, KERN_ERR, in beiscsi_boot_get_shandle()
1105 rc = beiscsi_mccq_compl_wait(phba, tag, &wrb, NULL); in beiscsi_boot_get_shandle()
1107 beiscsi_log(phba, KERN_ERR, in beiscsi_boot_get_shandle()
1116 __beiscsi_log(phba, KERN_INFO, in beiscsi_boot_get_shandle()
1156 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_fw_ver_disp() local
1158 return snprintf(buf, PAGE_SIZE, "%s\n", phba->fw_ver_str); in beiscsi_fw_ver_disp()
1175 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_active_session_disp() local
1179 if (test_bit(ulp_num, (void *)&phba->fw_config.ulp_supported)) { in beiscsi_active_session_disp()
1180 avlbl_cids = BEISCSI_ULP_AVLBL_CID(phba, ulp_num); in beiscsi_active_session_disp()
1181 total_cids = BEISCSI_GET_CID_COUNT(phba, ulp_num); in beiscsi_active_session_disp()
1207 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_free_session_disp() local
1211 if (test_bit(ulp_num, (void *)&phba->fw_config.ulp_supported)) in beiscsi_free_session_disp()
1214 BEISCSI_ULP_AVLBL_CID(phba, ulp_num)); in beiscsi_free_session_disp()
1238 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_adap_family_disp() local
1240 dev_id = phba->pcidev->device; in beiscsi_adap_family_disp()
1276 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_phys_port_disp() local
1279 phba->fw_config.phys_port); in beiscsi_phys_port_disp()
1432 unsigned int beiscsi_invalidate_cxn(struct beiscsi_hba *phba, in beiscsi_invalidate_cxn() argument
1436 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_invalidate_cxn()
1441 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_invalidate_cxn()
1464 be_mcc_notify(phba, tag); in beiscsi_invalidate_cxn()
1469 unsigned int beiscsi_upload_cxn(struct beiscsi_hba *phba, in beiscsi_upload_cxn() argument
1472 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_upload_cxn()
1478 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_upload_cxn()
1493 be_mcc_notify(phba, tag); in beiscsi_upload_cxn()
1498 int beiscsi_mgmt_invalidate_icds(struct beiscsi_hba *phba, in beiscsi_mgmt_invalidate_icds() argument
1502 struct be_ctrl_info *ctrl = &phba->ctrl; in beiscsi_mgmt_invalidate_icds()
1514 nonemb_cmd.va = dma_alloc_coherent(&phba->ctrl.pdev->dev, in beiscsi_mgmt_invalidate_icds()
1518 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH, in beiscsi_mgmt_invalidate_icds()
1524 wrb = alloc_mcc_wrb(phba, &tag); in beiscsi_mgmt_invalidate_icds()
1527 dma_free_coherent(&phba->ctrl.pdev->dev, nonemb_cmd.size, in beiscsi_mgmt_invalidate_icds()
1549 be_mcc_notify(phba, tag); in beiscsi_mgmt_invalidate_icds()
1552 rc = beiscsi_mccq_compl_wait(phba, tag, NULL, &nonemb_cmd); in beiscsi_mgmt_invalidate_icds()
1554 dma_free_coherent(&phba->ctrl.pdev->dev, nonemb_cmd.size, in beiscsi_mgmt_invalidate_icds()