Lines Matching refs:hba

33 static int32_t		emlxs_dfc_get_rev(emlxs_hba_t *hba, dfc_t *dfc,
35 static int32_t emlxs_dfc_get_hbainfo(emlxs_hba_t *hba, dfc_t *dfc,
37 static int32_t emlxs_dfc_get_hbastats(emlxs_hba_t *hba, dfc_t *dfc,
39 static int32_t emlxs_dfc_get_drvstats(emlxs_hba_t *hba, dfc_t *dfc,
41 static int32_t emlxs_dfc_set_diag(emlxs_hba_t *hba, dfc_t *dfc,
43 static int32_t emlxs_dfc_send_mbox(emlxs_hba_t *hba, dfc_t *dfc,
45 static int32_t emlxs_dfc_read_pci(emlxs_hba_t *hba, dfc_t *dfc,
47 static int32_t emlxs_dfc_write_pci(emlxs_hba_t *hba, dfc_t *dfc,
49 static int32_t emlxs_dfc_get_cfg(emlxs_hba_t *hba, dfc_t *dfc,
51 static int32_t emlxs_dfc_set_cfg(emlxs_hba_t *hba, dfc_t *dfc,
53 static int32_t emlxs_dfc_send_menlo(emlxs_hba_t *hba, dfc_t *dfc,
55 static int32_t emlxs_dfc_send_ct(emlxs_hba_t *hba, dfc_t *dfc,
57 static int32_t emlxs_dfc_send_ct_rsp(emlxs_hba_t *hba, dfc_t *dfc,
59 static int32_t emlxs_dfc_write_flash(emlxs_hba_t *hba, dfc_t *dfc,
61 static int32_t emlxs_dfc_read_flash(emlxs_hba_t *hba, dfc_t *dfc,
63 static int32_t emlxs_dfc_send_els(emlxs_hba_t *hba, dfc_t *dfc,
65 static int32_t emlxs_dfc_loopback_test(emlxs_hba_t *hba, dfc_t *dfc,
67 static int32_t emlxs_dfc_reset_port(emlxs_hba_t *hba, dfc_t *dfc,
69 static int32_t emlxs_dfc_get_dump_region(emlxs_hba_t *hba, dfc_t *dfc,
71 static int32_t emlxs_dfc_loopback_mode(emlxs_hba_t *hba, dfc_t *dfc,
73 static int32_t emlxs_dfc_get_ioinfo(emlxs_hba_t *hba, dfc_t *dfc,
75 static int32_t emlxs_dfc_get_linkinfo(emlxs_hba_t *hba, dfc_t *dfc,
77 static int32_t emlxs_dfc_read_mem(emlxs_hba_t *hba, dfc_t *dfc,
79 static int32_t emlxs_dfc_write_mem(emlxs_hba_t *hba, dfc_t *dfc,
81 static int32_t emlxs_dfc_write_ctlreg(emlxs_hba_t *hba, dfc_t *dfc,
83 static int32_t emlxs_dfc_read_ctlreg(emlxs_hba_t *hba, dfc_t *dfc,
85 static int32_t emlxs_dfc_get_event(emlxs_hba_t *hba, dfc_t *dfc,
87 static int32_t emlxs_dfc_set_event(emlxs_hba_t *hba, dfc_t *dfc,
89 static int32_t emlxs_dfc_get_eventinfo(emlxs_hba_t *hba, dfc_t *dfc,
91 static int32_t emlxs_dfc_get_nodeinfo(emlxs_hba_t *hba, dfc_t *dfc,
95 static int32_t emlxs_dfc_get_fctstat(emlxs_hba_t *hba, dfc_t *dfc,
99 static int32_t emlxs_dfc_create_vport(emlxs_hba_t *hba, dfc_t *dfc,
101 static int32_t emlxs_dfc_destroy_vport(emlxs_hba_t *hba, dfc_t *dfc,
103 static int32_t emlxs_dfc_get_vportinfo(emlxs_hba_t *hba, dfc_t *dfc,
105 static int32_t emlxs_dfc_npiv_resource(emlxs_hba_t *hba, dfc_t *dfc,
107 static int32_t emlxs_dfc_npiv_test(emlxs_hba_t *hba, dfc_t *dfc,
109 static emlxs_port_t *emlxs_vport_find_wwpn(emlxs_hba_t *hba, uint8_t *wwpn);
112 static int32_t emlxs_dfc_init_auth(emlxs_hba_t *hba, dfc_t *dfc,
114 static int32_t emlxs_dfc_get_auth_cfg(emlxs_hba_t *hba, dfc_t *dfc,
116 static int32_t emlxs_dfc_set_auth_cfg(emlxs_hba_t *hba, dfc_t *dfc,
118 static int32_t emlxs_dfc_get_auth_pwd(emlxs_hba_t *hba, dfc_t *dfc,
120 static int32_t emlxs_dfc_set_auth_pwd(emlxs_hba_t *hba, dfc_t *dfc,
122 static int32_t emlxs_dfc_get_auth_status(emlxs_hba_t *hba, dfc_t *dfc,
124 static int32_t emlxs_dfc_get_auth_cfg_table(emlxs_hba_t *hba,
126 static int32_t emlxs_dfc_get_auth_key_table(emlxs_hba_t *hba,
131 static int32_t emlxs_dfc_sd_set_bucket(emlxs_hba_t *hba, dfc_t *dfc,
133 static int32_t emlxs_dfc_sd_destroy_bucket(emlxs_hba_t *hba,
135 static int32_t emlxs_dfc_sd_get_bucket(emlxs_hba_t *hba, dfc_t *dfc,
137 static int32_t emlxs_dfc_sd_start_collection(emlxs_hba_t *hba,
139 static int32_t emlxs_dfc_sd_stop_collection(emlxs_hba_t *hba,
141 static int32_t emlxs_dfc_sd_reset_collection(emlxs_hba_t *hba,
143 static int32_t emlxs_dfc_sd_get_data(emlxs_hba_t *hba, dfc_t *dfc,
145 static int32_t emlxs_dfc_sd_set_event(emlxs_hba_t *hba, dfc_t *dfc,
147 static int32_t emlxs_dfc_sd_get_event(emlxs_hba_t *hba, dfc_t *dfc,
151 static int32_t emlxs_dfc_send_scsi_fcp(emlxs_hba_t *hba, dfc_t *dfc,
154 static int32_t emlxs_fcio_manage(emlxs_hba_t *hba, dfc_t *dfc,
212 static int32_t emlxs_dfc_get_persist_linkdown(emlxs_hba_t *hba,
214 static int32_t emlxs_dfc_set_persist_linkdown(emlxs_hba_t *hba,
218 static int32_t emlxs_dfc_get_fcflist(emlxs_hba_t *hba, dfc_t *dfc,
220 static int32_t emlxs_dfc_send_mbox4(emlxs_hba_t *hba, dfc_t *dfc,
222 static int emlxs_dfc_rd_be_fcf(emlxs_hba_t *hba, dfc_t *dfc,
224 static int emlxs_dfc_set_be_dcbx(emlxs_hba_t *hba, dfc_t *dfc,
226 static int emlxs_dfc_get_be_dcbx(emlxs_hba_t *hba, dfc_t *dfc,
228 static int emlxs_dfc_get_qos(emlxs_hba_t *hba, dfc_t *dfc,
237 int (*func)(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode);
363 emlxs_dfc_func(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_func() argument
381 rval = emlxs_dfc_table[i].func(hba, dfc, mode); in emlxs_dfc_func()
415 emlxs_dfc_copyin(emlxs_hba_t *hba, void *arg, dfc_t *dfc1, dfc_t *dfc2, in emlxs_dfc_copyin() argument
554 emlxs_dfc_copyout(emlxs_hba_t *hba, void *arg, dfc_t *dfc2, dfc_t *dfc1, in emlxs_dfc_copyout() argument
668 emlxs_dfc_manage(emlxs_hba_t *hba, void *arg, int32_t mode) in emlxs_dfc_manage() argument
676 rval = emlxs_dfc_copyin(hba, arg, &dfc1, &dfc2, mode); in emlxs_dfc_manage()
682 rval = emlxs_dfc_func(hba, &dfc2, mode); in emlxs_dfc_manage()
689 rval = emlxs_dfc_copyout(hba, arg, &dfc2, &dfc1, mode); in emlxs_dfc_manage()
803 emlxs_fcio_manage(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_fcio_manage() argument
911 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_host_params() local
944 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_host_params()
993 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_host_params()
1233 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_adapter_attrs() local
1259 hba->model_info.manufacturer, in emlxs_fcio_get_adapter_attrs()
1263 (void) strncpy(hba_attrs->Model, hba->model_info.model, in emlxs_fcio_get_adapter_attrs()
1266 hba->model_info.model_desc, in emlxs_fcio_get_adapter_attrs()
1288 (hba->model_info.device_id << 16) | in emlxs_fcio_get_adapter_attrs()
1289 hba->model_info.vendor_id; in emlxs_fcio_get_adapter_attrs()
1290 hba_attrs->NumberOfPorts = hba->num_of_ports; in emlxs_fcio_get_adapter_attrs()
1306 hba->model_info.manufacturer, in emlxs_fcio_get_adapter_attrs()
1310 (void) strncpy(hba_attrs->Model, hba->model_info.model, in emlxs_fcio_get_adapter_attrs()
1313 hba->model_info.model_desc, in emlxs_fcio_get_adapter_attrs()
1335 (hba->model_info.device_id << 16) | in emlxs_fcio_get_adapter_attrs()
1336 hba->model_info.vendor_id; in emlxs_fcio_get_adapter_attrs()
1337 hba_attrs->NumberOfPorts = hba->num_of_ports; in emlxs_fcio_get_adapter_attrs()
1353 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_adapter_port_attrs() local
1399 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_adapter_port_attrs()
1400 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_fcio_get_adapter_port_attrs()
1409 if (hba->flag & FC_PT_TO_PT) { in emlxs_fcio_get_adapter_port_attrs()
1418 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_fcio_get_adapter_port_attrs()
1424 switch (hba->linkspeed) { in emlxs_fcio_get_adapter_port_attrs()
1553 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_adapter_port_attrs()
1554 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_fcio_get_adapter_port_attrs()
1563 if (hba->flag & FC_PT_TO_PT) { in emlxs_fcio_get_adapter_port_attrs()
1572 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_fcio_get_adapter_port_attrs()
1578 switch (hba->linkspeed) { in emlxs_fcio_get_adapter_port_attrs()
1774 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_dev_list() local
1839 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_dev_list()
1917 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_dev_list()
2032 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_topology() local
2051 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_topology()
2126 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_other_adapter_ports() local
2140 if (index > hba->vpi_max) { in emlxs_fcio_get_other_adapter_ports()
2146 (void) ddi_pathname(hba->dip, path); in emlxs_fcio_get_other_adapter_ports()
2158 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_disc_port_attrs() local
2204 (hba->state >= FC_LINK_UP)) { in emlxs_fcio_get_disc_port_attrs()
2209 if (!(hba->flag & FC_FABRIC_ATTACHED)) { in emlxs_fcio_get_disc_port_attrs()
2210 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_disc_port_attrs()
2219 switch (hba->linkspeed) { in emlxs_fcio_get_disc_port_attrs()
2255 else if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_disc_port_attrs()
2263 switch (hba->linkspeed) { in emlxs_fcio_get_disc_port_attrs()
2344 (hba->state >= FC_LINK_UP)) { in emlxs_fcio_get_disc_port_attrs()
2349 if (!(hba->flag & FC_FABRIC_ATTACHED)) { in emlxs_fcio_get_disc_port_attrs()
2350 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_disc_port_attrs()
2359 switch (hba->linkspeed) { in emlxs_fcio_get_disc_port_attrs()
2395 else if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_disc_port_attrs()
2403 switch (hba->linkspeed) { in emlxs_fcio_get_disc_port_attrs()
2461 emlxs_hba_t *hba = HBA; in emlxs_fcio_get_port_attrs() local
2514 (hba->state >= FC_LINK_UP)) { in emlxs_fcio_get_port_attrs()
2519 if (!(hba->flag & FC_FABRIC_ATTACHED)) { in emlxs_fcio_get_port_attrs()
2520 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_port_attrs()
2529 switch (hba->linkspeed) { in emlxs_fcio_get_port_attrs()
2565 else if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_port_attrs()
2573 switch (hba->linkspeed) { in emlxs_fcio_get_port_attrs()
2661 (hba->state >= FC_LINK_UP)) { in emlxs_fcio_get_port_attrs()
2666 if (!(hba->flag & FC_FABRIC_ATTACHED)) { in emlxs_fcio_get_port_attrs()
2667 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_port_attrs()
2676 switch (hba->linkspeed) { in emlxs_fcio_get_port_attrs()
2712 else if (hba->topology == TOPOLOGY_LOOP) { in emlxs_fcio_get_port_attrs()
2720 switch (hba->linkspeed) { in emlxs_fcio_get_port_attrs()
2963 emlxs_dfc_create_vport(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_create_vport() argument
2995 if (!(hba->flag & FC_NPIV_ENABLED)) { in emlxs_dfc_create_vport()
3003 if (!(hba->flag & FC_NPIV_SUPPORTED)) { in emlxs_dfc_create_vport()
3017 for (vpi = 1; vpi <= hba->vpi_max; vpi++) { in emlxs_dfc_create_vport()
3044 for (vpi = 1; vpi <= hba->vpi_max; vpi++) { in emlxs_dfc_create_vport()
3052 if (vpi > hba->vpi_max) { in emlxs_dfc_create_vport()
3067 bcopy((caddr_t)&hba->wwpn, (caddr_t)dfc_vport->wwpn, 8); in emlxs_dfc_create_vport()
3073 if (tport = emlxs_vport_find_wwpn(hba, dfc_vport->wwpn)) { in emlxs_dfc_create_vport()
3088 bcopy((caddr_t)&hba->wwnn, (caddr_t)dfc_vport->wwnn, 8); in emlxs_dfc_create_vport()
3099 "%s %s", hba->snn, name); in emlxs_dfc_create_vport()
3101 (void) strncpy(dfc_vport->snn, hba->snn, in emlxs_dfc_create_vport()
3110 "%s VPort-%d VName-%s", hba->spn, in emlxs_dfc_create_vport()
3114 "%s VPort-%d", hba->spn, vpi); in emlxs_dfc_create_vport()
3122 if (dfc_vport->vpi >= hba->vpi_high) { in emlxs_dfc_create_vport()
3123 hba->vpi_high = dfc_vport->vpi; in emlxs_dfc_create_vport()
3164 emlxs_dfc_destroy_vport(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_destroy_vport() argument
3195 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_destroy_vport()
3276 emlxs_dfc_get_vportinfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_vportinfo() argument
3306 for (i = 0; i <= hba->vpi_max; i++) { in emlxs_dfc_get_vportinfo()
3367 emlxs_vport_find_wwpn(emlxs_hba_t *hba, uint8_t *wwpn) in emlxs_vport_find_wwpn() argument
3373 for (i = 0; i <= hba->vpi_max; i++) { in emlxs_vport_find_wwpn()
3405 emlxs_dfc_npiv_resource(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_npiv_resource() argument
3431 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_npiv_resource()
3436 vres->vpi_max = min(hba->sli.sli4.VPICount, MAX_VPORTS) - 1; in emlxs_dfc_npiv_resource()
3446 vres->rpi_max = hba->sli.sli4.RPICount; in emlxs_dfc_npiv_resource()
3455 emlxs_mb_read_config(hba, mbq); in emlxs_dfc_npiv_resource()
3457 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_npiv_resource()
3503 emlxs_dfc_npiv_test(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_npiv_test() argument
3506 emlxs_port_t *vport = &VPORT(hba->vpi_max); in emlxs_dfc_npiv_test()
3538 if (hba->sli_mode >= 3) { in emlxs_dfc_npiv_test()
3543 if ((vpd->feaLevelHigh >= 0x09) || (hba->sli_mode >= 4)) { in emlxs_dfc_npiv_test()
3548 if (hba->num_of_ports <= hba->vpi_max) { in emlxs_dfc_npiv_test()
3552 if (hba->state < FC_LINK_UP) { in emlxs_dfc_npiv_test()
3558 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_dfc_npiv_test()
3562 if (!(hba->flag & FC_FABRIC_ATTACHED)) { in emlxs_dfc_npiv_test()
3568 if (!(hba->flag & FC_NPIV_SUPPORTED)) { in emlxs_dfc_npiv_test()
3589 for (i = 1; i <= hba->vpi_max; i++) { in emlxs_dfc_npiv_test()
3597 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_npiv_test()
3603 vport->vpi = hba->vpi_max; in emlxs_dfc_npiv_test()
3604 vport->hba = hba; in emlxs_dfc_npiv_test()
3636 bcopy((caddr_t)&hba->wwnn, (caddr_t)wwn, 8); in emlxs_dfc_npiv_test()
3638 wwn[1] = hba->vpi_max; in emlxs_dfc_npiv_test()
3642 bcopy((caddr_t)&hba->wwpn, (caddr_t)wwn, 8); in emlxs_dfc_npiv_test()
3644 wwn[1] = hba->vpi_max; in emlxs_dfc_npiv_test()
3667 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_npiv_test()
3708 bcopy((caddr_t)&hba->wwpn, (caddr_t)wwn, 8); in emlxs_dfc_npiv_test()
3710 wwn[1] = hba->vpi_max; in emlxs_dfc_npiv_test()
3773 emlxs_dfc_get_rev(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_rev() argument
3803 emlxs_dfc_get_hbainfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_hbainfo() argument
3848 hbainfo->device_id = hba->model_info.device_id; in emlxs_dfc_get_hbainfo()
3849 hbainfo->vendor_id = hba->model_info.vendor_id; in emlxs_dfc_get_hbainfo()
3851 hbainfo->ports = hba->num_of_ports; in emlxs_dfc_get_hbainfo()
3854 bcopy(&hba->wwnn, hbainfo->wwnn, sizeof (hbainfo->wwnn)); in emlxs_dfc_get_hbainfo()
3857 bcopy(&hba->wwpn, hbainfo->wwpn, sizeof (hbainfo->wwpn)); in emlxs_dfc_get_hbainfo()
3894 hbainfo->sli_mode = hba->sli_mode; in emlxs_dfc_get_hbainfo()
3895 hbainfo->vpi_max = hba->vpi_max; in emlxs_dfc_get_hbainfo()
3896 hbainfo->vpi_high = hba->vpi_high; in emlxs_dfc_get_hbainfo()
3924 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_get_hbainfo()
3951 (void) ddi_pathname(hba->dip, pathname); in emlxs_dfc_get_hbainfo()
3955 if (hba->flag & (FC_OFFLINE_MODE | FC_OFFLINING_MODE)) { in emlxs_dfc_get_hbainfo()
3959 hbainfo->drv_instance = hba->ddiinst; in emlxs_dfc_get_hbainfo()
3964 if (hba->flag & FC_MENLO_MODE) { in emlxs_dfc_get_hbainfo()
3969 if (hba->state >= FC_LINK_UP) { in emlxs_dfc_get_hbainfo()
3970 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_dfc_get_hbainfo()
3971 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_dfc_get_hbainfo()
3983 if (hba->flag & FC_PT_TO_PT) { in emlxs_dfc_get_hbainfo()
3992 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_dfc_get_hbainfo()
4001 if (hba->linkspeed == LA_2GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4003 } else if (hba->linkspeed == LA_4GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4005 } else if (hba->linkspeed == LA_8GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4007 } else if (hba->linkspeed == LA_10GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4009 } else if (hba->linkspeed == LA_16GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4011 } else if (hba->linkspeed == LA_32GHZ_LINK) { in emlxs_dfc_get_hbainfo()
4057 if (hba->bus_type == SBUS_FC) { in emlxs_dfc_get_hbainfo()
4061 if (hba->flag & (FC_ONLINING_MODE | FC_OFFLINING_MODE)) { in emlxs_dfc_get_hbainfo()
4064 } else if (hba->flag & FC_ONLINE_MODE) { in emlxs_dfc_get_hbainfo()
4065 if (hba->flag & FC_LOOPBACK_MODE) { in emlxs_dfc_get_hbainfo()
4067 } else if (hba->state <= FC_LINK_DOWN) { in emlxs_dfc_get_hbainfo()
4071 else if (hba->flag & FC_MENLO_MODE) { in emlxs_dfc_get_hbainfo()
4081 if (hba->state == FC_ERROR) { in emlxs_dfc_get_hbainfo()
4088 hbainfo->pci_function_number = hba->pci_function_number; in emlxs_dfc_get_hbainfo()
4089 hbainfo->pci_device_number = hba->pci_device_number; in emlxs_dfc_get_hbainfo()
4090 hbainfo->pci_bus_number = hba->pci_bus_number; in emlxs_dfc_get_hbainfo()
4094 if (emlxs_fm_check_acc_handle(hba, hba->pci_acc_handle) in emlxs_dfc_get_hbainfo()
4110 emlxs_dfc_get_hbastats(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_hbastats() argument
4138 emlxs_mb_read_status(hba, mbq); in emlxs_dfc_get_hbastats()
4140 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_get_hbastats()
4174 emlxs_mb_read_lnk_stat(hba, mbq); in emlxs_dfc_get_hbastats()
4176 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_get_hbastats()
4213 stats->link_event_tag = hba->link_event_tag; in emlxs_dfc_get_hbastats()
4214 stats->last_reset_time = hba->timer_tics - hba->stats.ResetTime; in emlxs_dfc_get_hbastats()
4218 if (hba->flag & FC_MENLO_MODE) { in emlxs_dfc_get_hbastats()
4223 if (hba->state >= FC_LINK_UP) { in emlxs_dfc_get_hbastats()
4224 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_dfc_get_hbastats()
4225 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_dfc_get_hbastats()
4233 if (hba->flag & FC_PT_TO_PT) { in emlxs_dfc_get_hbastats()
4242 if (hba->linkspeed == LA_2GHZ_LINK) { in emlxs_dfc_get_hbastats()
4244 } else if (hba->linkspeed == LA_4GHZ_LINK) { in emlxs_dfc_get_hbastats()
4246 } else if (hba->linkspeed == LA_8GHZ_LINK) { in emlxs_dfc_get_hbastats()
4248 } else if (hba->linkspeed == LA_10GHZ_LINK) { in emlxs_dfc_get_hbastats()
4250 } else if (hba->linkspeed == LA_16GHZ_LINK) { in emlxs_dfc_get_hbastats()
4252 } else if (hba->linkspeed == LA_32GHZ_LINK) { in emlxs_dfc_get_hbastats()
4274 emlxs_dfc_get_drvstats(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_drvstats() argument
4290 stats->LinkUp = hba->stats.LinkUp; in emlxs_dfc_get_drvstats()
4291 stats->LinkDown = hba->stats.LinkDown; in emlxs_dfc_get_drvstats()
4292 stats->LinkEvent = hba->stats.LinkEvent; in emlxs_dfc_get_drvstats()
4293 stats->LinkMultiEvent = hba->stats.LinkMultiEvent; in emlxs_dfc_get_drvstats()
4295 stats->MboxIssued = hba->stats.MboxIssued; in emlxs_dfc_get_drvstats()
4296 stats->MboxCompleted = hba->stats.MboxCompleted; in emlxs_dfc_get_drvstats()
4297 stats->MboxGood = hba->stats.MboxGood; in emlxs_dfc_get_drvstats()
4298 stats->MboxError = hba->stats.MboxError; in emlxs_dfc_get_drvstats()
4299 stats->MboxBusy = hba->stats.MboxBusy; in emlxs_dfc_get_drvstats()
4300 stats->MboxInvalid = hba->stats.MboxInvalid; in emlxs_dfc_get_drvstats()
4302 stats->IocbIssued[0] = hba->stats.IocbIssued[0]; in emlxs_dfc_get_drvstats()
4303 stats->IocbIssued[1] = hba->stats.IocbIssued[1]; in emlxs_dfc_get_drvstats()
4304 stats->IocbIssued[2] = hba->stats.IocbIssued[2]; in emlxs_dfc_get_drvstats()
4305 stats->IocbIssued[3] = hba->stats.IocbIssued[3]; in emlxs_dfc_get_drvstats()
4306 stats->IocbReceived[0] = hba->stats.IocbReceived[0]; in emlxs_dfc_get_drvstats()
4307 stats->IocbReceived[1] = hba->stats.IocbReceived[1]; in emlxs_dfc_get_drvstats()
4308 stats->IocbReceived[2] = hba->stats.IocbReceived[2]; in emlxs_dfc_get_drvstats()
4309 stats->IocbReceived[3] = hba->stats.IocbReceived[3]; in emlxs_dfc_get_drvstats()
4310 stats->IocbTxPut[0] = hba->stats.IocbTxPut[0]; in emlxs_dfc_get_drvstats()
4311 stats->IocbTxPut[1] = hba->stats.IocbTxPut[1]; in emlxs_dfc_get_drvstats()
4312 stats->IocbTxPut[2] = hba->stats.IocbTxPut[2]; in emlxs_dfc_get_drvstats()
4313 stats->IocbTxPut[3] = hba->stats.IocbTxPut[3]; in emlxs_dfc_get_drvstats()
4314 stats->IocbTxGet[0] = hba->stats.IocbTxGet[0]; in emlxs_dfc_get_drvstats()
4315 stats->IocbTxGet[1] = hba->stats.IocbTxGet[1]; in emlxs_dfc_get_drvstats()
4316 stats->IocbTxGet[2] = hba->stats.IocbTxGet[2]; in emlxs_dfc_get_drvstats()
4317 stats->IocbTxGet[3] = hba->stats.IocbTxGet[3]; in emlxs_dfc_get_drvstats()
4318 stats->IocbRingFull[0] = hba->stats.IocbRingFull[0]; in emlxs_dfc_get_drvstats()
4319 stats->IocbRingFull[1] = hba->stats.IocbRingFull[1]; in emlxs_dfc_get_drvstats()
4320 stats->IocbRingFull[2] = hba->stats.IocbRingFull[2]; in emlxs_dfc_get_drvstats()
4321 stats->IocbRingFull[3] = hba->stats.IocbRingFull[3]; in emlxs_dfc_get_drvstats()
4323 stats->IntrEvent[0] = hba->stats.IntrEvent[0]; in emlxs_dfc_get_drvstats()
4324 stats->IntrEvent[1] = hba->stats.IntrEvent[1]; in emlxs_dfc_get_drvstats()
4325 stats->IntrEvent[2] = hba->stats.IntrEvent[2]; in emlxs_dfc_get_drvstats()
4326 stats->IntrEvent[3] = hba->stats.IntrEvent[3]; in emlxs_dfc_get_drvstats()
4327 stats->IntrEvent[4] = hba->stats.IntrEvent[4]; in emlxs_dfc_get_drvstats()
4328 stats->IntrEvent[5] = hba->stats.IntrEvent[5]; in emlxs_dfc_get_drvstats()
4329 stats->IntrEvent[6] = hba->stats.IntrEvent[6]; in emlxs_dfc_get_drvstats()
4330 stats->IntrEvent[7] = hba->stats.IntrEvent[7]; in emlxs_dfc_get_drvstats()
4332 stats->FcpIssued = hba->stats.FcpIssued; in emlxs_dfc_get_drvstats()
4333 stats->FcpCompleted = hba->stats.FcpCompleted; in emlxs_dfc_get_drvstats()
4334 stats->FcpGood = hba->stats.FcpGood; in emlxs_dfc_get_drvstats()
4335 stats->FcpError = hba->stats.FcpError; in emlxs_dfc_get_drvstats()
4337 stats->FcpEvent = hba->stats.FcpEvent; in emlxs_dfc_get_drvstats()
4338 stats->FcpStray = hba->stats.FcpStray; in emlxs_dfc_get_drvstats()
4340 stats->ElsEvent = hba->stats.ElsEvent; in emlxs_dfc_get_drvstats()
4341 stats->ElsStray = hba->stats.ElsStray; in emlxs_dfc_get_drvstats()
4343 stats->ElsCmdIssued = hba->stats.ElsCmdIssued; in emlxs_dfc_get_drvstats()
4344 stats->ElsCmdCompleted = hba->stats.ElsCmdCompleted; in emlxs_dfc_get_drvstats()
4345 stats->ElsCmdGood = hba->stats.ElsCmdGood; in emlxs_dfc_get_drvstats()
4346 stats->ElsCmdError = hba->stats.ElsCmdError; in emlxs_dfc_get_drvstats()
4348 stats->ElsRspIssued = hba->stats.ElsRspIssued; in emlxs_dfc_get_drvstats()
4349 stats->ElsRspCompleted = hba->stats.ElsRspCompleted; in emlxs_dfc_get_drvstats()
4351 stats->ElsRcvEvent = hba->stats.ElsRcvEvent; in emlxs_dfc_get_drvstats()
4352 stats->ElsRcvError = hba->stats.ElsRcvError; in emlxs_dfc_get_drvstats()
4353 stats->ElsRcvDropped = hba->stats.ElsRcvDropped; in emlxs_dfc_get_drvstats()
4354 stats->ElsCmdReceived = hba->stats.ElsCmdReceived; in emlxs_dfc_get_drvstats()
4355 stats->ElsRscnReceived = hba->stats.ElsRscnReceived; in emlxs_dfc_get_drvstats()
4356 stats->ElsPlogiReceived = hba->stats.ElsPlogiReceived; in emlxs_dfc_get_drvstats()
4357 stats->ElsPrliReceived = hba->stats.ElsPrliReceived; in emlxs_dfc_get_drvstats()
4358 stats->ElsPrloReceived = hba->stats.ElsPrloReceived; in emlxs_dfc_get_drvstats()
4359 stats->ElsLogoReceived = hba->stats.ElsLogoReceived; in emlxs_dfc_get_drvstats()
4360 stats->ElsAdiscReceived = hba->stats.ElsAdiscReceived; in emlxs_dfc_get_drvstats()
4361 stats->ElsGenReceived = hba->stats.ElsGenReceived; in emlxs_dfc_get_drvstats()
4363 stats->CtEvent = hba->stats.CtEvent; in emlxs_dfc_get_drvstats()
4364 stats->CtStray = hba->stats.CtStray; in emlxs_dfc_get_drvstats()
4366 stats->CtCmdIssued = hba->stats.CtCmdIssued; in emlxs_dfc_get_drvstats()
4367 stats->CtCmdCompleted = hba->stats.CtCmdCompleted; in emlxs_dfc_get_drvstats()
4368 stats->CtCmdGood = hba->stats.CtCmdGood; in emlxs_dfc_get_drvstats()
4369 stats->CtCmdError = hba->stats.CtCmdError; in emlxs_dfc_get_drvstats()
4371 stats->CtRspIssued = hba->stats.CtRspIssued; in emlxs_dfc_get_drvstats()
4372 stats->CtRspCompleted = hba->stats.CtRspCompleted; in emlxs_dfc_get_drvstats()
4374 stats->CtRcvEvent = hba->stats.CtRcvEvent; in emlxs_dfc_get_drvstats()
4375 stats->CtRcvError = hba->stats.CtRcvError; in emlxs_dfc_get_drvstats()
4376 stats->CtRcvDropped = hba->stats.CtRcvDropped; in emlxs_dfc_get_drvstats()
4377 stats->CtCmdReceived = hba->stats.CtCmdReceived; in emlxs_dfc_get_drvstats()
4379 stats->IpEvent = hba->stats.IpEvent; in emlxs_dfc_get_drvstats()
4380 stats->IpStray = hba->stats.IpStray; in emlxs_dfc_get_drvstats()
4382 stats->IpSeqIssued = hba->stats.IpSeqIssued; in emlxs_dfc_get_drvstats()
4383 stats->IpSeqCompleted = hba->stats.IpSeqCompleted; in emlxs_dfc_get_drvstats()
4384 stats->IpSeqGood = hba->stats.IpSeqGood; in emlxs_dfc_get_drvstats()
4385 stats->IpSeqError = hba->stats.IpSeqError; in emlxs_dfc_get_drvstats()
4387 stats->IpBcastIssued = hba->stats.IpBcastIssued; in emlxs_dfc_get_drvstats()
4388 stats->IpBcastCompleted = hba->stats.IpBcastCompleted; in emlxs_dfc_get_drvstats()
4389 stats->IpBcastGood = hba->stats.IpBcastGood; in emlxs_dfc_get_drvstats()
4390 stats->IpBcastError = hba->stats.IpBcastError; in emlxs_dfc_get_drvstats()
4392 stats->IpRcvEvent = hba->stats.IpRcvEvent; in emlxs_dfc_get_drvstats()
4393 stats->IpDropped = hba->stats.IpDropped; in emlxs_dfc_get_drvstats()
4394 stats->IpSeqReceived = hba->stats.IpSeqReceived; in emlxs_dfc_get_drvstats()
4395 stats->IpBcastReceived = hba->stats.IpBcastReceived; in emlxs_dfc_get_drvstats()
4397 stats->IpUbPosted = hba->stats.IpUbPosted; in emlxs_dfc_get_drvstats()
4398 stats->ElsUbPosted = hba->stats.ElsUbPosted; in emlxs_dfc_get_drvstats()
4399 stats->CtUbPosted = hba->stats.CtUbPosted; in emlxs_dfc_get_drvstats()
4402 stats->IocbThrottled = hba->stats.IocbThrottled; in emlxs_dfc_get_drvstats()
4403 stats->ElsAuthReceived = hba->stats.ElsAuthReceived; in emlxs_dfc_get_drvstats()
4412 emlxs_set_hba_mode(emlxs_hba_t *hba, uint32_t mode) in emlxs_set_hba_mode() argument
4421 while ((hba->flag & (FC_ONLINING_MODE | FC_OFFLINING_MODE))) { in emlxs_set_hba_mode()
4431 if (hba->sli_mode <= EMLXS_HBA_SLI3_MODE) { in emlxs_set_hba_mode()
4437 if (hba->flag & FC_OFFLINE_MODE) { in emlxs_set_hba_mode()
4439 (void) emlxs_online(hba); in emlxs_set_hba_mode()
4447 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4450 (void) emlxs_offline(hba, 0); in emlxs_set_hba_mode()
4453 EMLXS_SLI_HBA_RESET(hba, 1, 1, 0); in emlxs_set_hba_mode()
4456 } else if (hba->state < FC_INIT_START) { in emlxs_set_hba_mode()
4460 EMLXS_SLI_HBA_RESET(hba, 1, 1, 0); in emlxs_set_hba_mode()
4469 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4472 (void) emlxs_offline(hba, 0); in emlxs_set_hba_mode()
4475 EMLXS_SLI_HBA_RESET(hba, 0, 0, 0); in emlxs_set_hba_mode()
4478 } else if (hba->state != FC_WARM_START) { in emlxs_set_hba_mode()
4482 EMLXS_SLI_HBA_RESET(hba, 0, 0, 0); in emlxs_set_hba_mode()
4491 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4494 (void) emlxs_offline(hba, 0); in emlxs_set_hba_mode()
4497 } else if (hba->state != FC_KILLED) { in emlxs_set_hba_mode()
4500 EMLXS_SLI_HBA_KILL(hba); in emlxs_set_hba_mode()
4516 while ((hba->flag & (FC_ONLINING_MODE | FC_OFFLINING_MODE))) { in emlxs_set_hba_mode()
4527 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4529 } else if (hba->state == FC_KILLED) { in emlxs_set_hba_mode()
4531 } else if (hba->state == FC_WARM_START) { in emlxs_set_hba_mode()
4547 if (hba->flag & FC_OFFLINE_MODE) { in emlxs_set_hba_mode()
4549 (void) emlxs_online(hba); in emlxs_set_hba_mode()
4555 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4558 (void) emlxs_offline(hba, 0); in emlxs_set_hba_mode()
4561 EMLXS_SLI_HBA_RESET(hba, 1, 1, 0); in emlxs_set_hba_mode()
4564 } else if (hba->state < FC_INIT_START) { in emlxs_set_hba_mode()
4568 EMLXS_SLI_HBA_RESET(hba, 1, 1, 0); in emlxs_set_hba_mode()
4575 if (!(hba->model_info.chip & EMLXS_LANCER_CHIPS)) { in emlxs_set_hba_mode()
4599 while ((hba->flag & (FC_ONLINING_MODE | FC_OFFLINING_MODE))) { in emlxs_set_hba_mode()
4610 if (hba->flag & FC_ONLINE_MODE) { in emlxs_set_hba_mode()
4626 emlxs_dfc_set_diag(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_diag() argument
4647 flag = emlxs_set_hba_mode(hba, dfc->flag); in emlxs_dfc_set_diag()
4658 emlxs_dfc_send_mbox(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_mbox() argument
4674 if (hba->sli_mode > EMLXS_HBA_SLI3_MODE) { in emlxs_dfc_send_mbox()
4677 hba->sli_mode); in emlxs_dfc_send_mbox()
4781 if (!(hba->flag & FC_OFFLINE_MODE)) { in emlxs_dfc_send_mbox()
4898 if ((rx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
4930 if ((rx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
4962 if ((rx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
4994 if ((tx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
5038 if ((rx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
5071 if (port->node_count >= hba->max_nodes) { in emlxs_dfc_send_mbox()
5095 if ((tx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
5140 if ((rx_mp = emlxs_mem_buf_alloc(hba, MEM_BUF_SIZE)) == 0) { in emlxs_dfc_send_mbox()
5200 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_send_mbox()
5251 if (emlxs_fm_check_dma_handle(hba, rx_mp->dma_handle) in emlxs_dfc_send_mbox()
5261 emlxs_mem_buf_free(hba, rx_mp); in emlxs_dfc_send_mbox()
5267 if (emlxs_fm_check_dma_handle(hba, tx_mp->dma_handle) in emlxs_dfc_send_mbox()
5277 emlxs_mem_buf_free(hba, tx_mp); in emlxs_dfc_send_mbox()
5287 emlxs_dfc_read_pci(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_read_pci() argument
5337 if (hba->model_info.chip <= EMLXS_HELIOS_CHIP) { in emlxs_dfc_read_pci()
5362 ddi_get32(hba->pci_acc_handle, in emlxs_dfc_read_pci()
5363 (uint32_t *)(hba->pci_addr + i)); in emlxs_dfc_read_pci()
5369 if (emlxs_fm_check_acc_handle(hba, hba->pci_acc_handle) in emlxs_dfc_read_pci()
5384 emlxs_dfc_write_pci(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_write_pci() argument
5434 if (hba->model_info.chip <= EMLXS_HELIOS_CHIP) { in emlxs_dfc_write_pci()
5463 ddi_put16(hba->pci_acc_handle, in emlxs_dfc_write_pci()
5464 (uint16_t *)(hba->pci_addr + i), (uint16_t)word0); in emlxs_dfc_write_pci()
5467 ddi_put16(hba->pci_acc_handle, in emlxs_dfc_write_pci()
5468 (uint16_t *)(hba->pci_addr + i + 2), (uint16_t)word1); in emlxs_dfc_write_pci()
5473 if (emlxs_fm_check_acc_handle(hba, hba->pci_acc_handle) in emlxs_dfc_write_pci()
5488 emlxs_dfc_get_cfg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_cfg() argument
5533 if (! ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && in emlxs_dfc_get_cfg()
5540 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && in emlxs_dfc_get_cfg()
5580 emlxs_dfc_set_cfg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_cfg() argument
5590 rc = emlxs_set_parm(hba, index, new_value); in emlxs_dfc_set_cfg()
5613 emlxs_dfc_send_ct(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_ct() argument
5634 if (timeout < (2 * hba->fc_ratov)) { in emlxs_dfc_send_ct()
5635 timeout = 2 * hba->fc_ratov; in emlxs_dfc_send_ct()
5817 emlxs_dfc_send_ct_rsp(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_ct_rsp() argument
5830 timeout = 2 * hba->fc_ratov; in emlxs_dfc_send_ct_rsp()
5915 emlxs_dfc_send_menlo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_menlo() argument
5928 if (hba->model_info.vendor_id != PCI_VENDOR_ID_EMULEX || in emlxs_dfc_send_menlo()
5929 hba->model_info.device_id != PCI_DEVICE_ID_HORNET) { in emlxs_dfc_send_menlo()
5932 emlxs_dfc_xlate(dfc->cmd), hba->model_info.vendor_id, in emlxs_dfc_send_menlo()
5933 hba->model_info.device_id, hba->model_info.ssdid); in emlxs_dfc_send_menlo()
5980 rval = emlxs_send_menlo_cmd(hba, cmd_buf, cmd_size, in emlxs_dfc_send_menlo()
5997 emlxs_send_menlo_cmd(emlxs_hba_t *hba, uint8_t *cmd_buf, uint32_t cmd_size, in emlxs_send_menlo_cmd() argument
6102 if (hba->flag & FC_MENLO_MODE) { in emlxs_send_menlo_cmd()
6104 hba->flag &= ~FC_MENLO_MODE; in emlxs_send_menlo_cmd()
6135 emlxs_mb_set_var(hba, mbq, addr, value); in emlxs_send_menlo_cmd()
6140 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_send_menlo_cmd()
6158 if (mm_mode && !(hba->flag & FC_MENLO_MODE)) { in emlxs_send_menlo_cmd()
6162 timeout = emlxs_timeout(hba, 30); in emlxs_send_menlo_cmd()
6165 while ((rval != -1) && !(hba->flag & FC_MENLO_MODE)) { in emlxs_send_menlo_cmd()
6185 if (hba->state <= FC_LINK_DOWN) { in emlxs_send_menlo_cmd()
6404 emlxs_fcoe_attention_thread(emlxs_hba_t *hba, in emlxs_fcoe_attention_thread() argument
6508 hba->model_info.manufacturer); in emlxs_fcoe_attention_thread()
6540 emlxs_dfc_write_flash(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_write_flash() argument
6548 if (hba->bus_type != SBUS_FC) { in emlxs_dfc_write_flash()
6551 emlxs_dfc_xlate(dfc->cmd), hba->bus_type); in emlxs_dfc_write_flash()
6556 if (!(hba->flag & FC_OFFLINE_MODE)) { in emlxs_dfc_write_flash()
6603 SBUS_WRITE_FLASH_COPY(hba, offset, *bptr); in emlxs_dfc_write_flash()
6610 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.sbus_flash_acc_handle) in emlxs_dfc_write_flash()
6625 emlxs_dfc_read_flash(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_read_flash() argument
6634 if (hba->bus_type != SBUS_FC) { in emlxs_dfc_read_flash()
6637 emlxs_dfc_xlate(dfc->cmd), hba->bus_type); in emlxs_dfc_read_flash()
6642 if (!(hba->flag & FC_OFFLINE_MODE)) { in emlxs_dfc_read_flash()
6682 *bptr++ = SBUS_READ_FLASH_COPY(hba, offset++); in emlxs_dfc_read_flash()
6687 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.sbus_flash_acc_handle) in emlxs_dfc_read_flash()
6702 emlxs_dfc_send_els(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_els() argument
6722 timeout = 2 * hba->fc_ratov; in emlxs_dfc_send_els()
6897 emlxs_dfc_get_ioinfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_ioinfo() argument
6925 for (i = 0; i < hba->chan_count; i++) { in emlxs_dfc_get_ioinfo()
6967 emlxs_dfc_get_linkinfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_linkinfo() argument
6990 linkinfo->a_linkEventTag = hba->link_event_tag; in emlxs_dfc_get_linkinfo()
6997 if (hba->state <= FC_LINK_DOWN) { in emlxs_dfc_get_linkinfo()
7001 else if (hba->flag & FC_MENLO_MODE) { in emlxs_dfc_get_linkinfo()
7007 else if (hba->state == FC_LINK_DOWN_PERSIST) { in emlxs_dfc_get_linkinfo()
7009 } else if (hba->state < FC_READY) { in emlxs_dfc_get_linkinfo()
7016 if (hba->topology == TOPOLOGY_LOOP) { in emlxs_dfc_get_linkinfo()
7017 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_dfc_get_linkinfo()
7033 if (hba->flag & FC_FABRIC_ATTACHED) { in emlxs_dfc_get_linkinfo()
7041 bcopy(&hba->wwpn, linkinfo->a_wwpName, 8); in emlxs_dfc_get_linkinfo()
7042 bcopy(&hba->wwnn, linkinfo->a_wwnName, 8); in emlxs_dfc_get_linkinfo()
7051 emlxs_dfc_get_fctstat(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_fctstat() argument
7117 if (hba->state <= FC_LINK_DOWN) { in emlxs_dfc_get_fctstat()
7121 else if (hba->flag & FC_MENLO_MODE) { in emlxs_dfc_get_fctstat()
7125 else if (hba->state < FC_READY) { in emlxs_dfc_get_fctstat()
7138 emlxs_dfc_get_nodeinfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_nodeinfo() argument
7236 emlxs_dfc_read_mem(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_read_mem() argument
7274 if (hba->flag & FC_SLIM2_MODE) { in emlxs_dfc_read_mem()
7292 if (hba->flag & FC_SLIM2_MODE) { in emlxs_dfc_read_mem()
7293 slim = (uint8_t *)hba->sli.sli3.slim2.virt + offset; in emlxs_dfc_read_mem()
7296 slim = (uint8_t *)hba->sli.sli3.slim_addr + offset; in emlxs_dfc_read_mem()
7297 READ_SLIM_COPY(hba, (uint32_t *)dfc->buf1, (uint32_t *)slim, in emlxs_dfc_read_mem()
7303 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.slim_acc_handle) in emlxs_dfc_read_mem()
7318 emlxs_dfc_write_mem(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_write_mem() argument
7356 if (hba->flag & FC_SLIM2_MODE) { in emlxs_dfc_write_mem()
7374 if (hba->flag & FC_SLIM2_MODE) { in emlxs_dfc_write_mem()
7375 slim = (uint8_t *)hba->sli.sli3.slim2.virt + offset; in emlxs_dfc_write_mem()
7378 slim = (uint8_t *)hba->sli.sli3.slim_addr + offset; in emlxs_dfc_write_mem()
7379 WRITE_SLIM_COPY(hba, (uint32_t *)dfc->buf1, (uint32_t *)slim, in emlxs_dfc_write_mem()
7385 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.slim_acc_handle) in emlxs_dfc_write_mem()
7400 emlxs_dfc_write_ctlreg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_write_ctlreg() argument
7409 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_write_ctlreg()
7416 if (!(hba->flag & FC_OFFLINE_MODE)) { in emlxs_dfc_write_ctlreg()
7439 WRITE_CSR_REG(hba, (hba->sli.sli3.csr_addr + offset), value); in emlxs_dfc_write_ctlreg()
7443 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.csr_acc_handle) in emlxs_dfc_write_ctlreg()
7458 emlxs_dfc_read_ctlreg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_read_ctlreg() argument
7466 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_read_ctlreg()
7504 value = READ_CSR_REG(hba, (hba->sli.sli3.csr_addr + offset)); in emlxs_dfc_read_ctlreg()
7509 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.csr_acc_handle) in emlxs_dfc_read_ctlreg()
7524 emlxs_dfc_set_event(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_event() argument
7572 dfc_event = &hba->dfc_event[i]; in emlxs_dfc_set_event()
7583 dfc_event = &hba->dfc_event[i]; in emlxs_dfc_set_event()
7625 hba->event_mask |= event; in emlxs_dfc_set_event()
7632 dfc_event = &hba->dfc_event[i]; in emlxs_dfc_set_event()
7655 dfc_event = &hba->dfc_event[i]; in emlxs_dfc_set_event()
7665 hba->event_mask &= ~event; in emlxs_dfc_set_event()
7676 emlxs_dfc_get_eventinfo(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_eventinfo() argument
7758 emlxs_dfc_xlate(dfc->cmd), event_count, hba->hba_event.missed, in emlxs_dfc_get_eventinfo()
7759 hba->hba_event.new, hba->hba_event.last_id); in emlxs_dfc_get_eventinfo()
7774 emlxs_dfc_get_event(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_event() argument
7813 dfc_event = &hba->dfc_event[i]; in emlxs_dfc_get_event()
7829 if (!(hba->event_mask & dfc_event->event)) { in emlxs_dfc_get_event()
7868 emlxs_get_dump_region(emlxs_hba_t *hba, uint32_t region, in emlxs_get_dump_region() argument
7886 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_get_dump_region()
7916 wptr[0] = READ_CSR_REG(hba, FC_HA_REG(hba)); in emlxs_get_dump_region()
7917 wptr[1] = READ_CSR_REG(hba, FC_CA_REG(hba)); in emlxs_get_dump_region()
7918 wptr[2] = READ_CSR_REG(hba, FC_HS_REG(hba)); in emlxs_get_dump_region()
7919 wptr[3] = READ_CSR_REG(hba, FC_HC_REG(hba)); in emlxs_get_dump_region()
7923 if (emlxs_fm_check_acc_handle(hba, hba->sli.sli3.csr_acc_handle) in emlxs_get_dump_region()
7935 if (hba->flag & FC_SLIM2_MODE) { in emlxs_get_dump_region()
7945 if (hba->flag & FC_SLIM2_MODE) { in emlxs_get_dump_region()
7946 memptr = (uint8_t *)hba->sli.sli3.slim2.virt; in emlxs_get_dump_region()
7950 memptr = (uint8_t *)hba->sli.sli3.slim_addr; in emlxs_get_dump_region()
7951 READ_SLIM_COPY(hba, (uint32_t *)buffer, in emlxs_get_dump_region()
7955 if (emlxs_fm_check_acc_handle(hba, in emlxs_get_dump_region()
7956 hba->sli.sli3.slim_acc_handle) != DDI_FM_OK) { in emlxs_get_dump_region()
7983 memptr = (uint8_t *)&(((SLIM2 *)hba->sli.sli3.slim2.virt)->pcb); in emlxs_get_dump_region()
8004 if (hba->flag & FC_SLIM2_MODE) { in emlxs_get_dump_region()
8005 memptr = (uint8_t *)hba->sli.sli3.slim2.virt; in emlxs_get_dump_region()
8009 memptr = (uint8_t *)hba->sli.sli3.slim_addr; in emlxs_get_dump_region()
8010 READ_SLIM_COPY(hba, (uint32_t *)buffer, in emlxs_get_dump_region()
8014 if (emlxs_fm_check_acc_handle(hba, in emlxs_get_dump_region()
8015 hba->sli.sli3.slim_acc_handle) != DDI_FM_OK) { in emlxs_get_dump_region()
8043 memptr = (uint8_t *)hba->sli.sli3.slim_addr + in emlxs_get_dump_region()
8044 hba->sli.sli3.hgp_ring_offset; in emlxs_get_dump_region()
8046 READ_SLIM_COPY(hba, (uint32_t *)buffer, in emlxs_get_dump_region()
8050 if (emlxs_fm_check_acc_handle(hba, in emlxs_get_dump_region()
8051 hba->sli.sli3.slim_acc_handle) != DDI_FM_OK) { in emlxs_get_dump_region()
8079 ((SLIM2 *)hba->sli.sli3.slim2.virt)->mbx.us.s2.port; in emlxs_get_dump_region()
8100 memptr = (uint8_t *)((SLIM2 *)hba->sli.sli3.slim2.virt)->IOCBs; in emlxs_get_dump_region()
8121 memptr = (uint8_t *)hba; in emlxs_get_dump_region()
8145 emlxs_dfc_get_dump_region(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_dump_region() argument
8177 rval = emlxs_get_dump_region(hba, dfc->data1, NULL, &size); in emlxs_dfc_get_dump_region()
8194 rval = emlxs_get_dump_region(hba, dfc->data1, dfc->buf1, &size); in emlxs_dfc_get_dump_region()
8214 emlxs_dfc_menlo_port_offset(emlxs_hba_t *hba) in emlxs_dfc_menlo_port_offset() argument
8219 (void) ddi_pathname(hba->dip, pathname); in emlxs_dfc_menlo_port_offset()
8228 emlxs_dfc_set_menlo_loopback(emlxs_hba_t *hba) in emlxs_dfc_set_menlo_loopback() argument
8247 emlxs_mb_set_var(hba, mbq, 0x103107, 1); in emlxs_dfc_set_menlo_loopback()
8252 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_set_menlo_loopback()
8276 } while (!(hba->flag & FC_MENLO_MODE)); in emlxs_dfc_set_menlo_loopback()
8278 if (!(hba->flag & FC_MENLO_MODE)) { in emlxs_dfc_set_menlo_loopback()
8287 offset = emlxs_dfc_menlo_port_offset(hba); in emlxs_dfc_set_menlo_loopback()
8367 emlxs_mb_set_var(hba, mbq, 0x103107, 0); in emlxs_dfc_set_menlo_loopback()
8372 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_set_menlo_loopback()
8387 while ((hba->state < FC_LINK_UP) && (hba->state != FC_ERROR)) { in emlxs_dfc_set_menlo_loopback()
8415 emlxs_dfc_set_menlo_fte(emlxs_hba_t *hba) in emlxs_dfc_set_menlo_fte() argument
8504 emlxs_dfc_reset_menlo(emlxs_hba_t *hba) in emlxs_dfc_reset_menlo() argument
8519 emlxs_mb_set_var(hba, mbq, 0x103007, 0); in emlxs_dfc_reset_menlo()
8524 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_reset_menlo()
8549 emlxs_dfc_loopback_mode(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_loopback_mode() argument
8564 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_loopback_mode()
8578 if (!(hba->flag & FC_LOOPBACK_MODE)) { in emlxs_dfc_loopback_mode()
8596 if ((hba->flag & FC_ILB_MODE)) { in emlxs_dfc_loopback_mode()
8608 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_loopback_mode()
8619 if ((hba->flag & FC_ELB_MODE)) { in emlxs_dfc_loopback_mode()
8638 if (emlxs_online(hba)) { in emlxs_dfc_loopback_mode()
8647 if (hba->model_info.vendor_id == PCI_VENDOR_ID_EMULEX && in emlxs_dfc_loopback_mode()
8648 hba->model_info.device_id == PCI_DEVICE_ID_HORNET) { in emlxs_dfc_loopback_mode()
8654 rval = emlxs_dfc_set_menlo_loopback(hba); in emlxs_dfc_loopback_mode()
8667 emlxs_mb_down_link(hba, mbq); in emlxs_dfc_loopback_mode()
8669 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_loopback_mode()
8700 while ((hba->state >= FC_LINK_UP) && (hba->state != FC_ERROR)) { in emlxs_dfc_loopback_mode()
8715 emlxs_mb_init_link(hba, mbq, topology, speed); in emlxs_dfc_loopback_mode()
8719 hba->flag |= new_mode; in emlxs_dfc_loopback_mode()
8720 hba->loopback_tics = hba->timer_tics + emlxs_loopback_tmo; in emlxs_dfc_loopback_mode()
8723 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_loopback_mode()
8744 while ((hba->state < FC_LINK_UP) && (hba->state != FC_ERROR)) { in emlxs_dfc_loopback_mode()
8759 if (EMLXS_SLI_REG_DID(port, port->did, (SERV_PARM *)&hba->sparam, in emlxs_dfc_loopback_mode()
8792 if (hba->model_info.vendor_id == PCI_VENDOR_ID_EMULEX && in emlxs_dfc_loopback_mode()
8793 hba->model_info.device_id == PCI_DEVICE_ID_HORNET) { in emlxs_dfc_loopback_mode()
8798 rval = emlxs_dfc_set_menlo_fte(hba); in emlxs_dfc_loopback_mode()
8804 if (hba->sli_mode < EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_loopback_mode()
8806 (void) emlxs_create_xri(port, &hba->chan[hba->channel_ct], in emlxs_dfc_loopback_mode()
8861 if (hba->model_info.vendor_id == PCI_VENDOR_ID_EMULEX && in emlxs_dfc_loopback_mode()
8862 hba->model_info.device_id == PCI_DEVICE_ID_HORNET) { in emlxs_dfc_loopback_mode()
8864 rval = emlxs_dfc_reset_menlo(hba); in emlxs_dfc_loopback_mode()
8873 (void) emlxs_reset_link(hba, 1, 1); in emlxs_dfc_loopback_mode()
8882 emlxs_dfc_loopback_test(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_loopback_test() argument
8892 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_loopback_test()
8900 if (!(hba->flag & FC_LOOPBACK_MODE)) { in emlxs_dfc_loopback_test()
8910 hba->loopback_tics = hba->timer_tics + emlxs_loopback_tmo; in emlxs_dfc_loopback_test()
8913 if (!(hba->flag & FC_ONLINE_MODE)) { in emlxs_dfc_loopback_test()
8921 if (hba->state < FC_LINK_UP) { in emlxs_dfc_loopback_test()
8990 pkt->pkt_timeout = 2 * hba->fc_ratov; in emlxs_dfc_loopback_test()
9007 timeout = emlxs_timeout(hba, (pkt->pkt_timeout + 15)); in emlxs_dfc_loopback_test()
9009 if (hba->loopback_pkt) { in emlxs_dfc_loopback_test()
9011 while ((rval != -1) && hba->loopback_pkt) { in emlxs_dfc_loopback_test()
9026 hba->loopback_pkt = (void *) pkt; in emlxs_dfc_loopback_test()
9080 if (pkt && (hba->loopback_pkt == pkt)) { in emlxs_dfc_loopback_test()
9081 hba->loopback_pkt = NULL; in emlxs_dfc_loopback_test()
9100 emlxs_dfc_reset_port(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_reset_port() argument
9111 if ((hba->sli_mode < EMLXS_HBA_SLI4_MODE) || in emlxs_dfc_reset_port()
9112 ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && in emlxs_dfc_reset_port()
9113 (hba->model_info.chip & EMLXS_BE_CHIPS))) { in emlxs_dfc_reset_port()
9139 emlxs_dfc_handle_event(emlxs_hba_t *hba, CHANNEL *cp, IOCBQ *iocbq) in emlxs_dfc_handle_event() argument
9163 if (cp->channelno != hba->channel_ct) { in emlxs_dfc_handle_event()
9225 emlxs_hba_t *hba = HBA; in emlxs_dfc_handle_unsol_req() local
9237 if (hba->sli_mode == EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_handle_unsol_req()
9241 emlxs_abort_ct_exchange(hba, port, iocb->ULPCONTEXT); in emlxs_dfc_handle_unsol_req()
9252 if (hba->loopback_pkt) { in emlxs_dfc_handle_unsol_req()
9253 pkt = (fc_packet_t *)hba->loopback_pkt; in emlxs_dfc_handle_unsol_req()
9254 hba->loopback_pkt = NULL; in emlxs_dfc_handle_unsol_req()
9273 emlxs_dfc_init_auth(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_init_auth() argument
9314 rval = emlxs_dhc_init_auth(hba, lwwpn, rwwpn); in emlxs_dfc_init_auth()
9323 emlxs_dfc_get_auth_cfg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_auth_cfg() argument
9346 if ((rval = emlxs_dhc_get_auth_cfg(hba, fcsp_config)) != 0) { in emlxs_dfc_get_auth_cfg()
9358 emlxs_dfc_set_auth_cfg(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_auth_cfg() argument
9400 rval = emlxs_dhc_add_auth_cfg(hba, fcsp_config, dfc_pwd); in emlxs_dfc_set_auth_cfg()
9404 rval = emlxs_dhc_delete_auth_cfg(hba, fcsp_config, dfc_pwd); in emlxs_dfc_set_auth_cfg()
9420 emlxs_dfc_get_auth_pwd(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_auth_pwd() argument
9444 if ((rval = emlxs_dhc_get_auth_key(hba, dfc_pwd)) != 0) { in emlxs_dfc_get_auth_pwd()
9455 emlxs_dfc_set_auth_pwd(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_auth_pwd() argument
9478 if ((rval = emlxs_dhc_set_auth_key(hba, dfc_pwd))) { in emlxs_dfc_set_auth_pwd()
9489 emlxs_dfc_get_auth_status(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_auth_status() argument
9513 if ((rval = emlxs_dhc_get_auth_status(hba, fcsp_status)) != 0) { in emlxs_dfc_get_auth_status()
9524 emlxs_dfc_get_auth_cfg_table(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_auth_cfg_table() argument
9532 mutex_enter(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9539 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9548 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9552 bcopy((void *)&hba->auth_cfg_count, (void *)dfc->buf2, in emlxs_dfc_get_auth_cfg_table()
9556 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9562 if (count < hba->auth_cfg_count) { in emlxs_dfc_get_auth_cfg_table()
9565 emlxs_dfc_xlate(dfc->cmd), count, hba->auth_cfg_count); in emlxs_dfc_get_auth_cfg_table()
9567 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9571 rval = emlxs_dhc_get_auth_cfg_table(hba, in emlxs_dfc_get_auth_cfg_table()
9573 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_cfg_table()
9581 emlxs_dfc_get_auth_key_table(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_auth_key_table() argument
9589 mutex_enter(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9596 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9605 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9609 bcopy((void *)&hba->auth_key_count, (void *)dfc->buf2, in emlxs_dfc_get_auth_key_table()
9613 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9619 if (count < hba->auth_key_count) { in emlxs_dfc_get_auth_key_table()
9622 emlxs_dfc_xlate(dfc->cmd), count, hba->auth_key_count); in emlxs_dfc_get_auth_key_table()
9624 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9628 rval = emlxs_dhc_get_auth_key_table(hba, in emlxs_dfc_get_auth_key_table()
9630 mutex_exit(&hba->auth_lock); in emlxs_dfc_get_auth_key_table()
9642 emlxs_dfc_sd_set_bucket(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_set_bucket() argument
9673 emlxs_dfc_sd_destroy_bucket(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_destroy_bucket() argument
9700 emlxs_dfc_sd_get_bucket(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_get_bucket() argument
9726 emlxs_dfc_sd_start_collection(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_start_collection() argument
9748 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_start_collection()
9788 emlxs_dfc_sd_stop_collection(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_stop_collection() argument
9810 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_stop_collection()
9828 temp_hba = emlxs_device.hba[i]; in emlxs_dfc_sd_stop_collection()
9851 emlxs_dfc_sd_reset_collection(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_reset_collection() argument
9873 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_reset_collection()
9901 emlxs_dfc_sd_get_data(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_get_data() argument
9925 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_get_data()
10002 emlxs_dfc_sd_set_event(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_set_event() argument
10026 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_set_event()
10107 emlxs_dfc_sd_get_event(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_sd_get_event() argument
10122 vport = emlxs_vport_find_wwpn(hba, wwpn); in emlxs_dfc_sd_get_event()
10181 emlxs_dfc_send_scsi_fcp(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_scsi_fcp() argument
10234 emlxs_vport_find_wwpn(hba, (uint8_t *)&cmdinfo->src_wwn); in emlxs_dfc_send_scsi_fcp()
10361 emlxs_dfc_get_persist_linkdown(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_persist_linkdown() argument
10368 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_get_persist_linkdown()
10392 emlxs_dfc_set_persist_linkdown(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_persist_linkdown() argument
10398 if ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE) { in emlxs_dfc_set_persist_linkdown()
10418 emlxs_dfc_get_fcflist(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_fcflist() argument
10444 if (! ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE)) { in emlxs_dfc_get_fcflist()
10451 if (hba->state != FC_READY) { in emlxs_dfc_get_fcflist()
10459 hba->sli.sli4.fcftab.table_count * sizeof (DFC_FCoEFCFInfo_t); in emlxs_dfc_get_fcflist()
10466 fcfp = hba->sli.sli4.fcftab.table; in emlxs_dfc_get_fcflist()
10467 for (i = 0; i < hba->sli.sli4.fcftab.table_count; i++, fcfp++) { in emlxs_dfc_get_fcflist()
10493 fcflist->nActiveFCFs = hba->sli.sli4.fcftab.fcfi_count; in emlxs_dfc_get_fcflist()
10514 emlxs_dfc_send_mbox4(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_send_mbox4() argument
10527 if (hba->sli_mode != EMLXS_HBA_SLI4_MODE) { in emlxs_dfc_send_mbox4()
10530 hba->sli_mode); in emlxs_dfc_send_mbox4()
10592 mp = emlxs_mem_buf_alloc(hba, in emlxs_dfc_send_mbox4()
10652 mp = emlxs_mem_buf_alloc(hba, in emlxs_dfc_send_mbox4()
10692 mp = emlxs_mem_buf_alloc(hba, in emlxs_dfc_send_mbox4()
10727 mp = emlxs_mem_buf_alloc(hba, in emlxs_dfc_send_mbox4()
10763 if ((tx_mp = emlxs_mem_buf_alloc(hba, size)) == 0) { in emlxs_dfc_send_mbox4()
10805 if ((rx_mp = emlxs_mem_buf_alloc(hba, size)) == 0) { in emlxs_dfc_send_mbox4()
10834 mbxstatus = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_send_mbox4()
10867 emlxs_mem_buf_free(hba, mp); in emlxs_dfc_send_mbox4()
10871 emlxs_mem_buf_free(hba, tx_mp); in emlxs_dfc_send_mbox4()
10875 emlxs_mem_buf_free(hba, rx_mp); in emlxs_dfc_send_mbox4()
10888 emlxs_dfc_rd_be_fcf(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_rd_be_fcf() argument
10917 if ((mp = (MATCHMAP *)emlxs_mem_get(hba, MEM_BUF)) == 0) { in emlxs_dfc_rd_be_fcf()
10943 rc = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_rd_be_fcf()
10965 emlxs_mem_put(hba, MEM_BUF, (void *)mp); in emlxs_dfc_rd_be_fcf()
10979 emlxs_dfc_set_be_dcbx(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_set_be_dcbx() argument
11014 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_set_be_dcbx()
11035 emlxs_dfc_get_be_dcbx(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_be_dcbx() argument
11069 rval = EMLXS_SLI_ISSUE_MBOX_CMD(hba, mbq, MBX_WAIT, 0); in emlxs_dfc_get_be_dcbx()
11094 emlxs_dfc_get_qos(emlxs_hba_t *hba, dfc_t *dfc, int32_t mode) in emlxs_dfc_get_qos() argument
11099 if (! ((hba->sli_mode == EMLXS_HBA_SLI4_MODE) && SLI4_FCOE_MODE)) { in emlxs_dfc_get_qos()
11107 bcopy((void *)&hba->qos_linkspeed, (void *)dfc->buf1, in emlxs_dfc_get_qos()