37 unsigned int reopen_type,
38 unsigned int sess_handle)
47 "BG_%d : In bescsi_get_boot_target\n");
57 req = embedded_payload(wrb);
82 "BG_%d : In bescsi_get_boot_target\n");
92 req = embedded_payload(wrb);
105 u32 boot_session_handle,
110 unsigned int tag = 0;
117 "BG_%d : In beiscsi_get_session_info\n");
126 nonemb_cmd->
size =
sizeof(*resp);
127 req = nonemb_cmd->
va;
128 memset(req, 0,
sizeof(*req));
130 sge = nonembedded_sgl(wrb);
157 memset(wrb, 0,
sizeof(*wrb));
169 pfw_cfg->
ulp[0].icd_base;
171 pfw_cfg->
ulp[0].icd_count;
173 pfw_cfg->
ulp[0].sq_base;
175 pfw_cfg->
ulp[0].sq_count;
178 "BG_%d : FW reported MAX CXNS as %d\t"
179 "Max Supported = %d.\n",
186 "BG_%d : Failed in mgmt_get_fw_config\n");
199 struct be_sge *
sge = nonembedded_sgl(wrb);
205 if (nonemb_cmd.
va ==
NULL) {
207 "BG_%d : Failed to allocate memory for "
208 "mgmt_check_supported_fw\n");
213 memset(req, 0,
sizeof(*req));
215 memset(wrb, 0,
sizeof(*wrb));
226 "BG_%d : Firmware Version of CMD : %s\n"
227 "Firmware Version is : %s\n"
228 "Developer Build, not performing version check...\n",
230 .flashrom_version_string,
232 firmware_version_string);
235 resp->
params.hba_attribs.iscsi_features;
237 "BM_%d : phba->fw_config.iscsi_features = %d\n",
241 "BG_%d : Failed in mgmt_check_supported_fw\n");
245 nonemb_cmd.
va, nonemb_cmd.
dma);
258 unsigned int tag = 0;
265 resp = nonemb_cmd->
va;
274 memset(wrb, 0,
sizeof(*wrb));
278 offset = sector * sector_size +
offset;
291 "BG_%d : Unsupported cmd = 0x%x\n\n",
325 memset(wrb, 0,
sizeof(*wrb));
338 "BG_%d : mgmt_epfw_cleanup , FAILED\n");
345 unsigned int num_invalidate,
unsigned int cid,
353 unsigned int i,
tag = 0;
362 req = nonemb_cmd->
va;
363 memset(req, 0,
sizeof(*req));
365 sge = nonembedded_sgl(wrb);
374 for (i = 0; i < num_invalidate; i++) {
392 unsigned short issue_reset,
393 unsigned short savecfg_flag)
398 unsigned int tag = 0;
408 req = embedded_payload(wrb);
427 unsigned short cid,
unsigned int upload_flag)
432 unsigned int tag = 0;
441 req = embedded_payload(wrb);
466 unsigned short def_hdr_id;
467 unsigned short def_data_id;
468 struct phys_addr template_address = { 0, 0 };
470 unsigned int tag = 0;
480 ptemplate_address = &template_address;
489 memset(wrb, 0,
sizeof(*wrb));
490 sge = nonembedded_sgl(wrb);
492 req = nonemb_cmd->
va;
493 memset(req, 0,
sizeof(*req));
503 req->
ip_address.addr[0] = s_addr & 0x000000ff;
504 req->
ip_address.addr[1] = (s_addr & 0x0000ff00) >> 8;
505 req->
ip_address.addr[2] = (s_addr & 0x00ff0000) >> 16;
506 req->
ip_address.addr[3] = (s_addr & 0xff000000) >> 24;
514 &daddr_in6->
sin6_addr.in6_u.u6_addr8, 16);
518 &daddr_in6->
sin6_addr.in6_u.u6_addr8, 16);
522 "BG_%d : unknown addr family %d\n",
535 "BG_%d : i=%d cq_id=%d\n", i, req->
cq_id);
558 memset(wrb, 0,
sizeof(*wrb));
571 "BG_%d : Failed in mgmt_get_all_if_id\n");
578 static int mgmt_exec_nonemb_cmd(
struct beiscsi_hba *phba,
579 struct be_dma_mem *nonemb_cmd,
void *resp_buf,
584 unsigned short status, extd_status;
596 memset(wrb, 0,
sizeof(*wrb));
598 sge = nonembedded_sgl(wrb);
609 phba->
ctrl.mcc_numtag[tag]);
611 extd_status = (phba->
ctrl.mcc_numtag[
tag] & 0x0000FF00) >> 8;
612 status = phba->
ctrl.mcc_numtag[
tag] & 0x000000FF;
613 if (status || extd_status) {
616 "BG_%d : mgmt_exec_nonemb_cmd Failed status = %d"
617 "extd_status = %d\n", status, extd_status);
623 memcpy(resp_buf, nonemb_cmd->
va, resp_buf_len);
629 nonemb_cmd->
va, nonemb_cmd->
dma);
639 "BG_%d : Failed to allocate memory for if info\n");
660 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
671 req->
ip_params.ip_record.action = ip_action;
672 req->
ip_params.ip_record.interface_hndl =
674 req->
ip_params.ip_record.ip_addr.size_of_structure =
684 subnet_param->
value, subnet_param->
len);
693 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd,
NULL, 0);
696 "BG_%d : Failed to Modify existing IP Address\n");
708 rt_val = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
715 req->
action = gtway_action;
720 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd,
NULL, 0);
740 memset(&if_info, 0,
sizeof(if_info));
751 "BG_%d : DHCP Already Enabled\n");
764 memset(&if_info, 0,
sizeof(if_info));
765 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
772 reldhcp = nonemb_cmd.
va;
776 rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd,
NULL, 0);
780 "BG_%d : Failed to Delete existing dhcp\n");
788 rc = mgmt_static_ip_modify(phba, &if_info, ip_param,
NULL,
796 memset(>way_addr_set, 0,
sizeof(gtway_addr_set));
800 "BG_%d : Failed to Get Gateway Addr\n");
804 if (gtway_addr_set.
ip_addr.addr[0]) {
806 rc = mgmt_modify_gateway(phba, gtway_addr,
812 "BG_%d : Failed to clear Gateway Addr Set\n");
820 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
826 dhcpreq = nonemb_cmd.
va;
832 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd,
NULL, 0);
834 return mgmt_static_ip_modify(phba, &if_info, ip_param,
848 memset(>way_addr_set, 0,
sizeof(gtway_addr_set));
852 "BG_%d : Failed to Get Gateway Addr\n");
856 if (gtway_addr_set.
ip_addr.addr[0]) {
858 rt_val = mgmt_modify_gateway(phba, gtway_addr,
IP_ACTION_DEL,
862 "BG_%d : Failed to clear Gateway Addr Set\n");
868 rt_val = mgmt_modify_gateway(phba, gtway_addr,
IP_ACTION_ADD,
873 "BG_%d : Failed to Set Gateway Addr\n");
885 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
894 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, gateway,
908 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
918 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, if_info,
928 rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
934 return mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, nic,
sizeof(*nic));
941 unsigned int tag = 0;
954 req = embedded_payload(wrb);
968 unsigned int tag = 0;
981 req = embedded_payload(wrb);
1008 unsigned int *s_handle)
1012 unsigned int tag, wrb_num;
1014 unsigned short status, extd_status;
1023 "BG_%d : Getting Boot Target Info Failed\n");
1027 phba->
ctrl.mcc_numtag[tag]);
1029 wrb_num = (phba->
ctrl.mcc_numtag[
tag] & 0x00FF0000) >> 16;
1030 extd_status = (phba->
ctrl.mcc_numtag[
tag] & 0x0000FF00) >> 8;
1031 status = phba->
ctrl.mcc_numtag[
tag] & 0x000000FF;
1032 if (status || extd_status) {
1035 "BG_%d : mgmt_get_boot_target Failed"
1036 " status = %d extd_status = %d\n",
1037 status, extd_status);
1041 wrb = queue_get_wrb(mccq, wrb_num);
1043 boot_resp = embedded_payload(wrb);
1049 "BG_%d ;No boot targets configured\n");
1065 "BG_%d : mgmt_reopen_session Failed\n");
1069 phba->
ctrl.mcc_numtag[tag]);
1071 wrb_num = (phba->
ctrl.mcc_numtag[
tag] & 0x00FF0000) >> 16;
1072 extd_status = (phba->
ctrl.mcc_numtag[
tag] & 0x0000FF00) >> 8;
1073 status = phba->
ctrl.mcc_numtag[
tag] & 0x000000FF;
1074 if (status || extd_status) {
1077 "BG_%d : mgmt_reopen_session Failed"
1078 " status = %d extd_status = %d\n",
1079 status, extd_status);
1085 }
while (--boot_retry);
1090 "BG_%d : Login to Boot Target Failed\n");
1109 unsigned int tag, wrb_num;
1110 unsigned short status, extd_status;
1116 "BG_%d : VLAN Setting Failed\n");
1120 phba->
ctrl.mcc_numtag[tag]);
1122 wrb_num = (phba->
ctrl.mcc_numtag[
tag] & 0x00FF0000) >> 16;
1123 extd_status = (phba->
ctrl.mcc_numtag[
tag] & 0x0000FF00) >> 8;
1124 status = phba->
ctrl.mcc_numtag[
tag] & 0x000000FF;
1126 if (status || extd_status) {
1129 "BS_%d : status : %d extd_status : %d\n",
1130 status, extd_status);