Lines Matching refs:phba
105 void beiscsi_ue_detect(struct beiscsi_hba *phba) in beiscsi_ue_detect() argument
111 if (phba->ue_detected) in beiscsi_ue_detect()
114 pci_read_config_dword(phba->pcidev, in beiscsi_ue_detect()
116 pci_read_config_dword(phba->pcidev, in beiscsi_ue_detect()
119 pci_read_config_dword(phba->pcidev, in beiscsi_ue_detect()
122 pci_read_config_dword(phba->pcidev, in beiscsi_ue_detect()
131 phba->ue_detected = true; in beiscsi_ue_detect()
132 beiscsi_log(phba, KERN_ERR, in beiscsi_ue_detect()
140 beiscsi_log(phba, KERN_ERR, in beiscsi_ue_detect()
150 beiscsi_log(phba, KERN_ERR, in beiscsi_ue_detect()
158 int be_cmd_modify_eq_delay(struct beiscsi_hba *phba, in be_cmd_modify_eq_delay() argument
161 struct be_ctrl_info *ctrl = &phba->ctrl; in be_cmd_modify_eq_delay()
168 tag = alloc_mcc_tag(phba); in be_cmd_modify_eq_delay()
174 wrb = wrb_from_mccq(phba); in be_cmd_modify_eq_delay()
190 be_mcc_notify(phba); in be_cmd_modify_eq_delay()
205 unsigned int mgmt_reopen_session(struct beiscsi_hba *phba, in mgmt_reopen_session() argument
209 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_reopen_session()
214 beiscsi_log(phba, KERN_INFO, in mgmt_reopen_session()
219 tag = alloc_mcc_tag(phba); in mgmt_reopen_session()
225 wrb = wrb_from_mccq(phba); in mgmt_reopen_session()
237 be_mcc_notify(phba); in mgmt_reopen_session()
242 unsigned int mgmt_get_boot_target(struct beiscsi_hba *phba) in mgmt_get_boot_target() argument
244 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_get_boot_target()
249 beiscsi_log(phba, KERN_INFO, in mgmt_get_boot_target()
254 tag = alloc_mcc_tag(phba); in mgmt_get_boot_target()
260 wrb = wrb_from_mccq(phba); in mgmt_get_boot_target()
268 be_mcc_notify(phba); in mgmt_get_boot_target()
273 unsigned int mgmt_get_session_info(struct beiscsi_hba *phba, in mgmt_get_session_info() argument
277 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_get_session_info()
284 beiscsi_log(phba, KERN_INFO, in mgmt_get_session_info()
289 tag = alloc_mcc_tag(phba); in mgmt_get_session_info()
298 wrb = wrb_from_mccq(phba); in mgmt_get_session_info()
313 be_mcc_notify(phba); in mgmt_get_session_info()
331 struct beiscsi_hba *phba) in mgmt_get_fw_config() argument
351 if (!is_chip_be2_be3r(phba)) { in mgmt_get_fw_config()
352 phba->fw_config.eqid_count = pfw_cfg->eqid_count; in mgmt_get_fw_config()
353 phba->fw_config.cqid_count = pfw_cfg->cqid_count; in mgmt_get_fw_config()
355 beiscsi_log(phba, KERN_INFO, in mgmt_get_fw_config()
358 phba->fw_config.eqid_count, in mgmt_get_fw_config()
359 phba->fw_config.cqid_count); in mgmt_get_fw_config()
366 &phba->fw_config.ulp_supported); in mgmt_get_fw_config()
368 phba->fw_config.phys_port = pfw_cfg->phys_port; in mgmt_get_fw_config()
370 if (test_bit(ulp_num, &phba->fw_config.ulp_supported)) { in mgmt_get_fw_config()
372 phba->fw_config.iscsi_cid_start[ulp_num] = in mgmt_get_fw_config()
374 phba->fw_config.iscsi_cid_count[ulp_num] = in mgmt_get_fw_config()
377 phba->fw_config.iscsi_icd_start[ulp_num] = in mgmt_get_fw_config()
379 phba->fw_config.iscsi_icd_count[ulp_num] = in mgmt_get_fw_config()
382 phba->fw_config.iscsi_chain_start[ulp_num] = in mgmt_get_fw_config()
384 phba->fw_config.iscsi_chain_count[ulp_num] = in mgmt_get_fw_config()
387 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, in mgmt_get_fw_config()
394 phba->fw_config. in mgmt_get_fw_config()
396 phba->fw_config. in mgmt_get_fw_config()
398 phba->fw_config. in mgmt_get_fw_config()
400 phba->fw_config. in mgmt_get_fw_config()
405 phba->fw_config.dual_ulp_aware = (pfw_cfg->function_mode & in mgmt_get_fw_config()
408 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, in mgmt_get_fw_config()
410 phba->fw_config.dual_ulp_aware); in mgmt_get_fw_config()
413 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, in mgmt_get_fw_config()
423 struct beiscsi_hba *phba) in mgmt_check_supported_fw() argument
435 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, in mgmt_check_supported_fw()
454 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, in mgmt_check_supported_fw()
463 phba->fw_config.iscsi_features = in mgmt_check_supported_fw()
465 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, in mgmt_check_supported_fw()
467 phba->fw_config.iscsi_features); in mgmt_check_supported_fw()
468 memcpy(phba->fw_ver_str, resp->params.hba_attribs. in mgmt_check_supported_fw()
471 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, in mgmt_check_supported_fw()
482 struct beiscsi_hba *phba, in mgmt_vendor_specific_fw_cmd() argument
520 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_vendor_specific_fw_cmd()
528 tag = alloc_mcc_tag(phba); in mgmt_vendor_specific_fw_cmd()
534 wrb = wrb_from_mccq(phba); in mgmt_vendor_specific_fw_cmd()
543 be_mcc_notify(phba); in mgmt_vendor_specific_fw_cmd()
558 int mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short ulp_num) in mgmt_epfw_cleanup() argument
560 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_epfw_cleanup()
561 struct be_mcc_wrb *wrb = wrb_from_mccq(phba); in mgmt_epfw_cleanup()
572 req->hdr_ring_id = cpu_to_le16(HWI_GET_DEF_HDRQ_ID(phba, ulp_num)); in mgmt_epfw_cleanup()
573 req->data_ring_id = cpu_to_le16(HWI_GET_DEF_BUFQ_ID(phba, ulp_num)); in mgmt_epfw_cleanup()
575 status = be_mcc_notify_wait(phba); in mgmt_epfw_cleanup()
577 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT, in mgmt_epfw_cleanup()
583 unsigned int mgmt_invalidate_icds(struct beiscsi_hba *phba, in mgmt_invalidate_icds() argument
589 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_invalidate_icds()
596 tag = alloc_mcc_tag(phba); in mgmt_invalidate_icds()
604 wrb = wrb_from_mccq(phba); in mgmt_invalidate_icds()
624 be_mcc_notify(phba); in mgmt_invalidate_icds()
629 unsigned int mgmt_invalidate_connection(struct beiscsi_hba *phba, in mgmt_invalidate_connection() argument
635 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_invalidate_connection()
641 tag = alloc_mcc_tag(phba); in mgmt_invalidate_connection()
646 wrb = wrb_from_mccq(phba); in mgmt_invalidate_connection()
661 be_mcc_notify(phba); in mgmt_invalidate_connection()
666 unsigned int mgmt_upload_connection(struct beiscsi_hba *phba, in mgmt_upload_connection() argument
669 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_upload_connection()
675 tag = alloc_mcc_tag(phba); in mgmt_upload_connection()
680 wrb = wrb_from_mccq(phba); in mgmt_upload_connection()
689 be_mcc_notify(phba); in mgmt_upload_connection()
704 int mgmt_open_connection(struct beiscsi_hba *phba, in mgmt_open_connection() argument
713 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_open_connection()
725 phwi_ctrlr = phba->phwi_ctrlr; in mgmt_open_connection()
730 def_hdr_id = (unsigned short)HWI_GET_DEF_HDRQ_ID(phba, ulp_num); in mgmt_open_connection()
731 def_data_id = (unsigned short)HWI_GET_DEF_BUFQ_ID(phba, ulp_num); in mgmt_open_connection()
734 ISCSI_GET_PDU_TEMPLATE_ADDRESS(phba, ptemplate_address); in mgmt_open_connection()
736 tag = alloc_mcc_tag(phba); in mgmt_open_connection()
741 wrb = wrb_from_mccq(phba); in mgmt_open_connection()
773 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, in mgmt_open_connection()
777 free_mcc_tag(&phba->ctrl, tag); in mgmt_open_connection()
782 i = phba->nxt_cqid++; in mgmt_open_connection()
783 if (phba->nxt_cqid == phba->num_cpus) in mgmt_open_connection()
784 phba->nxt_cqid = 0; in mgmt_open_connection()
786 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, in mgmt_open_connection()
798 if (!is_chip_be2_be3r(phba)) { in mgmt_open_connection()
804 be_mcc_notify(phba); in mgmt_open_connection()
809 unsigned int mgmt_get_all_if_id(struct beiscsi_hba *phba) in mgmt_get_all_if_id() argument
811 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_get_all_if_id()
827 phba->interface_handle = pbe_allid->if_hndl_list[0]; in mgmt_get_all_if_id()
829 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_get_all_if_id()
845 static int mgmt_exec_nonemb_cmd(struct beiscsi_hba *phba, in mgmt_exec_nonemb_cmd() argument
849 struct be_ctrl_info *ctrl = &phba->ctrl; in mgmt_exec_nonemb_cmd()
856 tag = alloc_mcc_tag(phba); in mgmt_exec_nonemb_cmd()
863 wrb = wrb_from_mccq(phba); in mgmt_exec_nonemb_cmd()
872 be_mcc_notify(phba); in mgmt_exec_nonemb_cmd()
875 rc = beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd); in mgmt_exec_nonemb_cmd()
885 beiscsi_log(phba, KERN_WARNING, in mgmt_exec_nonemb_cmd()
900 static int mgmt_alloc_cmd_data(struct beiscsi_hba *phba, struct be_dma_mem *cmd, in mgmt_alloc_cmd_data() argument
903 cmd->va = pci_zalloc_consistent(phba->ctrl.pdev, size, &cmd->dma); in mgmt_alloc_cmd_data()
905 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, in mgmt_alloc_cmd_data()
915 mgmt_static_ip_modify(struct beiscsi_hba *phba, in mgmt_static_ip_modify() argument
926 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_static_ip_modify()
939 phba->interface_handle; in mgmt_static_ip_modify()
962 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); in mgmt_static_ip_modify()
964 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_static_ip_modify()
969 static int mgmt_modify_gateway(struct beiscsi_hba *phba, uint8_t *gt_addr, in mgmt_modify_gateway() argument
977 rt_val = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_modify_gateway()
989 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); in mgmt_modify_gateway()
992 int mgmt_set_ip(struct beiscsi_hba *phba, in mgmt_set_ip() argument
1006 if (mgmt_get_all_if_id(phba)) in mgmt_set_ip()
1012 rc = mgmt_get_if_info(phba, ip_type, &if_info); in mgmt_set_ip()
1018 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_set_ip()
1033 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_set_ip()
1041 reldhcp->interface_hndl = phba->interface_handle; in mgmt_set_ip()
1044 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); in mgmt_set_ip()
1046 beiscsi_log(phba, KERN_WARNING, in mgmt_set_ip()
1056 rc = mgmt_static_ip_modify(phba, if_info, ip_param, NULL, in mgmt_set_ip()
1065 rc = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); in mgmt_set_ip()
1067 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_set_ip()
1074 rc = mgmt_modify_gateway(phba, gtway_addr, in mgmt_set_ip()
1078 beiscsi_log(phba, KERN_WARNING, in mgmt_set_ip()
1088 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_set_ip()
1097 dhcpreq->interface_hndl = phba->interface_handle; in mgmt_set_ip()
1100 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); in mgmt_set_ip()
1102 rc = mgmt_static_ip_modify(phba, if_info, ip_param, in mgmt_set_ip()
1111 int mgmt_set_gateway(struct beiscsi_hba *phba, in mgmt_set_gateway() argument
1119 rt_val = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); in mgmt_set_gateway()
1121 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_set_gateway()
1128 rt_val = mgmt_modify_gateway(phba, gtway_addr, IP_ACTION_DEL, in mgmt_set_gateway()
1131 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_set_gateway()
1138 rt_val = mgmt_modify_gateway(phba, gtway_addr, IP_ACTION_ADD, in mgmt_set_gateway()
1142 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, in mgmt_set_gateway()
1148 int mgmt_get_gateway(struct beiscsi_hba *phba, int ip_type, in mgmt_get_gateway() argument
1155 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_get_gateway()
1164 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, gateway, in mgmt_get_gateway()
1168 int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type, in mgmt_get_if_info() argument
1176 if (mgmt_get_all_if_id(phba)) in mgmt_get_if_info()
1180 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_get_if_info()
1187 req->interface_hndl = phba->interface_handle; in mgmt_get_if_info()
1193 beiscsi_log(phba, KERN_ERR, in mgmt_get_if_info()
1198 pci_free_consistent(phba->ctrl.pdev, in mgmt_get_if_info()
1205 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, *if_info, in mgmt_get_if_info()
1217 pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, in mgmt_get_if_info()
1229 int mgmt_get_nic_conf(struct beiscsi_hba *phba, in mgmt_get_nic_conf() argument
1235 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, in mgmt_get_nic_conf()
1241 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, nic, sizeof(*nic)); in mgmt_get_nic_conf()
1246 unsigned int be_cmd_get_initname(struct beiscsi_hba *phba) in be_cmd_get_initname() argument
1251 struct be_ctrl_info *ctrl = &phba->ctrl; in be_cmd_get_initname()
1254 tag = alloc_mcc_tag(phba); in be_cmd_get_initname()
1260 wrb = wrb_from_mccq(phba); in be_cmd_get_initname()
1268 be_mcc_notify(phba); in be_cmd_get_initname()
1273 unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba) in be_cmd_get_port_speed() argument
1278 struct be_ctrl_info *ctrl = &phba->ctrl; in be_cmd_get_port_speed()
1281 tag = alloc_mcc_tag(phba); in be_cmd_get_port_speed()
1287 wrb = wrb_from_mccq(phba); in be_cmd_get_port_speed()
1295 be_mcc_notify(phba); in be_cmd_get_port_speed()
1314 int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, in be_mgmt_get_boot_shandle() argument
1325 tag = mgmt_get_boot_target(phba); in be_mgmt_get_boot_shandle()
1327 beiscsi_log(phba, KERN_ERR, in be_mgmt_get_boot_shandle()
1333 rc = beiscsi_mccq_compl(phba, tag, &wrb, NULL); in be_mgmt_get_boot_shandle()
1335 beiscsi_log(phba, KERN_ERR, in be_mgmt_get_boot_shandle()
1345 beiscsi_log(phba, KERN_INFO, in be_mgmt_get_boot_shandle()
1358 tag = mgmt_reopen_session(phba, BE_REOPEN_BOOT_SESSIONS, in be_mgmt_get_boot_shandle()
1361 beiscsi_log(phba, KERN_ERR, in be_mgmt_get_boot_shandle()
1367 rc = beiscsi_mccq_compl(phba, tag, NULL, NULL); in be_mgmt_get_boot_shandle()
1369 beiscsi_log(phba, KERN_ERR, in be_mgmt_get_boot_shandle()
1377 beiscsi_log(phba, KERN_ERR, in be_mgmt_get_boot_shandle()
1395 int mgmt_set_vlan(struct beiscsi_hba *phba, in mgmt_set_vlan() argument
1401 tag = be_cmd_set_vlan(phba, vlan_tag); in mgmt_set_vlan()
1403 beiscsi_log(phba, KERN_ERR, in mgmt_set_vlan()
1409 rc = beiscsi_mccq_compl(phba, tag, NULL, NULL); in mgmt_set_vlan()
1411 beiscsi_log(phba, KERN_ERR, in mgmt_set_vlan()
1449 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_fw_ver_disp() local
1451 return snprintf(buf, PAGE_SIZE, "%s\n", phba->fw_ver_str); in beiscsi_fw_ver_disp()
1468 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_active_session_disp() local
1472 if (test_bit(ulp_num, (void *)&phba->fw_config.ulp_supported)) { in beiscsi_active_session_disp()
1473 avlbl_cids = BEISCSI_ULP_AVLBL_CID(phba, ulp_num); in beiscsi_active_session_disp()
1474 total_cids = BEISCSI_GET_CID_COUNT(phba, ulp_num); in beiscsi_active_session_disp()
1500 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_free_session_disp() local
1504 if (test_bit(ulp_num, (void *)&phba->fw_config.ulp_supported)) in beiscsi_free_session_disp()
1507 BEISCSI_ULP_AVLBL_CID(phba, ulp_num)); in beiscsi_free_session_disp()
1531 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_adap_family_disp() local
1533 dev_id = phba->pcidev->device; in beiscsi_adap_family_disp()
1568 struct beiscsi_hba *phba = iscsi_host_priv(shost); in beiscsi_phys_port_disp() local
1571 phba->fw_config.phys_port); in beiscsi_phys_port_disp()