Lines Matching refs:cb_arg

5128 	ocs_hw_fw_write_cb_arg_t *cb_arg;  in ocs_hw_firmware_write_lancer()  local
5142 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_fw_write_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_firmware_write_lancer()
5143 if (cb_arg == NULL) { in ocs_hw_firmware_write_lancer()
5149 cb_arg->cb = cb; in ocs_hw_firmware_write_lancer()
5150 cb_arg->arg = arg; in ocs_hw_firmware_write_lancer()
5154 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_cb_fw_write, cb_arg); in ocs_hw_firmware_write_lancer()
5160 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_fw_write_cb_arg_t)); in ocs_hw_firmware_write_lancer()
5189 ocs_hw_fw_write_cb_arg_t *cb_arg = arg; in ocs_hw_cb_fw_write() local
5200 if (cb_arg) { in ocs_hw_cb_fw_write()
5201 if (cb_arg->cb) { in ocs_hw_cb_fw_write()
5205 cb_arg->cb(status, bytes_written, change_status, cb_arg->arg); in ocs_hw_cb_fw_write()
5208 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_fw_write_cb_arg_t)); in ocs_hw_cb_fw_write()
5235 ocs_hw_sfp_cb_arg_t *cb_arg = arg; in ocs_hw_cb_sfp() local
5240 if (cb_arg) { in ocs_hw_cb_sfp()
5241 payload = &(cb_arg->payload); in ocs_hw_cb_sfp()
5242 if (cb_arg->cb) { in ocs_hw_cb_sfp()
5248 cb_arg->cb(hw->os, status, bytes_written, mbox_rsp->page_data, cb_arg->arg); in ocs_hw_cb_sfp()
5251 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_cb_sfp()
5252 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_sfp_cb_arg_t)); in ocs_hw_cb_sfp()
5274 ocs_hw_sfp_cb_arg_t *cb_arg; in ocs_hw_get_sfp() local
5285 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_sfp_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_sfp()
5286 if (cb_arg == NULL) { in ocs_hw_get_sfp()
5292 cb_arg->cb = cb; in ocs_hw_get_sfp()
5293 cb_arg->arg = arg; in ocs_hw_get_sfp()
5296 if (ocs_dma_alloc(hw->os, &cb_arg->payload, sizeof(sli4_res_common_read_transceiver_data_t), in ocs_hw_get_sfp()
5299 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_sfp_cb_arg_t)); in ocs_hw_get_sfp()
5306 &cb_arg->payload)) { in ocs_hw_get_sfp()
5307 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_cb_sfp, cb_arg); in ocs_hw_get_sfp()
5313 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_get_sfp()
5314 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_sfp_cb_arg_t)); in ocs_hw_get_sfp()
5334 ocs_hw_temp_cb_arg_t *cb_arg; in ocs_hw_get_temperature() local
5343 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_temp_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_temperature()
5344 if (cb_arg == NULL) { in ocs_hw_get_temperature()
5350 cb_arg->cb = cb; in ocs_hw_get_temperature()
5351 cb_arg->arg = arg; in ocs_hw_get_temperature()
5355 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_cb_temp, cb_arg); in ocs_hw_get_temperature()
5361 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_temp_cb_arg_t)); in ocs_hw_get_temperature()
5387 ocs_hw_temp_cb_arg_t *cb_arg = arg; in ocs_hw_cb_temp() local
5395 if (cb_arg) { in ocs_hw_cb_temp()
5396 if (cb_arg->cb) { in ocs_hw_cb_temp()
5400 cb_arg->cb(status, in ocs_hw_cb_temp()
5407 cb_arg->arg); in ocs_hw_cb_temp()
5410 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_temp_cb_arg_t)); in ocs_hw_cb_temp()
5438 ocs_hw_link_stat_cb_arg_t *cb_arg; in ocs_hw_get_link_stats() local
5447 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_link_stat_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_link_stats()
5448 if (cb_arg == NULL) { in ocs_hw_get_link_stats()
5454 cb_arg->cb = cb; in ocs_hw_get_link_stats()
5455 cb_arg->arg = arg; in ocs_hw_get_link_stats()
5461 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_cb_link_stat, cb_arg); in ocs_hw_get_link_stats()
5467 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_link_stat_cb_arg_t)); in ocs_hw_get_link_stats()
5493 ocs_hw_link_stat_cb_arg_t *cb_arg = arg; in ocs_hw_cb_link_stat() local
5542 if (cb_arg) { in ocs_hw_cb_link_stat()
5543 if (cb_arg->cb) { in ocs_hw_cb_link_stat()
5547 cb_arg->cb(status, in ocs_hw_cb_link_stat()
5550 cb_arg->arg); in ocs_hw_cb_link_stat()
5553 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_link_stat_cb_arg_t)); in ocs_hw_cb_link_stat()
5574 ocs_hw_host_stat_cb_arg_t *cb_arg; in ocs_hw_get_host_stats() local
5583 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_host_stat_cb_arg_t), 0); in ocs_hw_get_host_stats()
5584 if (cb_arg == NULL) { in ocs_hw_get_host_stats()
5590 cb_arg->cb = cb; in ocs_hw_get_host_stats()
5591 cb_arg->arg = arg; in ocs_hw_get_host_stats()
5595 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_cb_host_stat, cb_arg); in ocs_hw_get_host_stats()
5601 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_host_stat_cb_arg_t)); in ocs_hw_get_host_stats()
5629 ocs_hw_host_stat_cb_arg_t *cb_arg = arg; in ocs_hw_cb_host_stat() local
5651 if (cb_arg) { in ocs_hw_cb_host_stat()
5652 if (cb_arg->cb) { in ocs_hw_cb_host_stat()
5656 cb_arg->cb(status, in ocs_hw_cb_host_stat()
5659 cb_arg->arg); in ocs_hw_cb_host_stat()
5662 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_host_stat_cb_arg_t)); in ocs_hw_cb_host_stat()
5857 ocs_hw_linkcfg_cb_arg_t *cb_arg; in ocs_hw_set_linkcfg_lancer() local
5865 cb_arg = ocs_malloc(hw->os, sizeof(*cb_arg), OCS_M_NOWAIT); in ocs_hw_set_linkcfg_lancer()
5866 if (cb_arg == NULL) { in ocs_hw_set_linkcfg_lancer()
5873 if (ocs_dma_alloc(hw->os, &cb_arg->dma_cmd, ocs_strlen(cmd)+1, 4096)) { in ocs_hw_set_linkcfg_lancer()
5875 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_set_linkcfg_lancer()
5878 ocs_memset(cb_arg->dma_cmd.virt, 0, ocs_strlen(cmd)+1); in ocs_hw_set_linkcfg_lancer()
5879 ocs_memcpy(cb_arg->dma_cmd.virt, cmd, ocs_strlen(cmd)); in ocs_hw_set_linkcfg_lancer()
5882 if (ocs_dma_alloc(hw->os, &cb_arg->dma_resp, OCS_HW_DMTF_CLP_RSP_MAX, 4096)) { in ocs_hw_set_linkcfg_lancer()
5884 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_set_linkcfg_lancer()
5885 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_set_linkcfg_lancer()
5888 cb_arg->cb = cb; in ocs_hw_set_linkcfg_lancer()
5889 cb_arg->arg = arg; in ocs_hw_set_linkcfg_lancer()
5890 cb_arg->opts = opts; in ocs_hw_set_linkcfg_lancer()
5892 rc = ocs_hw_exec_dmtf_clp_cmd(hw, &cb_arg->dma_cmd, &cb_arg->dma_resp, in ocs_hw_set_linkcfg_lancer()
5893 opts, ocs_hw_linkcfg_dmtf_clp_cb, cb_arg); in ocs_hw_set_linkcfg_lancer()
5901 (char *)cb_arg->dma_cmd.virt); in ocs_hw_set_linkcfg_lancer()
5903 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_set_linkcfg_lancer()
5904 ocs_dma_free(hw->os, &cb_arg->dma_resp); in ocs_hw_set_linkcfg_lancer()
5905 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_set_linkcfg_lancer()
5923 ocs_hw_linkcfg_cb_arg_t *cb_arg = (ocs_hw_linkcfg_cb_arg_t *)arg; in ocs_hw_set_active_link_config_cb() local
5930 if (cb_arg->cb) { in ocs_hw_set_active_link_config_cb()
5931 cb_arg->cb(status, 0, cb_arg->arg); in ocs_hw_set_active_link_config_cb()
5935 if (cb_arg->opts != OCS_CMD_POLL) { in ocs_hw_set_active_link_config_cb()
5936 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_set_active_link_config_cb()
5956 ocs_hw_linkcfg_cb_arg_t *cb_arg; in ocs_hw_set_linkcfg_skyhawk() local
5975 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_linkcfg_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_set_linkcfg_skyhawk()
5976 if (cb_arg == NULL) { in ocs_hw_set_linkcfg_skyhawk()
5982 cb_arg->cb = cb; in ocs_hw_set_linkcfg_skyhawk()
5983 cb_arg->arg = arg; in ocs_hw_set_linkcfg_skyhawk()
5986 rc = ocs_hw_command(hw, mbxdata, opts, ocs_hw_set_active_link_config_cb, cb_arg); in ocs_hw_set_linkcfg_skyhawk()
5992 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_linkcfg_cb_arg_t)); in ocs_hw_set_linkcfg_skyhawk()
5995 ocs_hw_set_active_link_config_cb(hw, 0, mbxdata, cb_arg); in ocs_hw_set_linkcfg_skyhawk()
5997 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_linkcfg_cb_arg_t)); in ocs_hw_set_linkcfg_skyhawk()
6050 ocs_hw_linkcfg_cb_arg_t *cb_arg; in ocs_hw_get_linkcfg_lancer() local
6054 cb_arg = ocs_malloc(hw->os, sizeof(*cb_arg), OCS_M_NOWAIT); in ocs_hw_get_linkcfg_lancer()
6055 if (cb_arg == NULL) { in ocs_hw_get_linkcfg_lancer()
6063 if (ocs_dma_alloc(hw->os, &cb_arg->dma_cmd, ocs_strlen(cmd)+1, 4096)) { in ocs_hw_get_linkcfg_lancer()
6065 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_get_linkcfg_lancer()
6070 ocs_memset(cb_arg->dma_cmd.virt, 0, ocs_strlen(cmd)+1); in ocs_hw_get_linkcfg_lancer()
6071 ocs_memcpy(cb_arg->dma_cmd.virt, cmd, ocs_strlen(cmd)); in ocs_hw_get_linkcfg_lancer()
6074 if (ocs_dma_alloc(hw->os, &cb_arg->dma_resp, OCS_HW_DMTF_CLP_RSP_MAX, 4096)) { in ocs_hw_get_linkcfg_lancer()
6076 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_get_linkcfg_lancer()
6077 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_get_linkcfg_lancer()
6080 cb_arg->cb = cb; in ocs_hw_get_linkcfg_lancer()
6081 cb_arg->arg = arg; in ocs_hw_get_linkcfg_lancer()
6082 cb_arg->opts = opts; in ocs_hw_get_linkcfg_lancer()
6084 rc = ocs_hw_exec_dmtf_clp_cmd(hw, &cb_arg->dma_cmd, &cb_arg->dma_resp, in ocs_hw_get_linkcfg_lancer()
6085 opts, ocs_hw_linkcfg_dmtf_clp_cb, cb_arg); in ocs_hw_get_linkcfg_lancer()
6093 (char *)cb_arg->dma_cmd.virt); in ocs_hw_get_linkcfg_lancer()
6095 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_get_linkcfg_lancer()
6096 ocs_dma_free(hw->os, &cb_arg->dma_resp); in ocs_hw_get_linkcfg_lancer()
6097 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_get_linkcfg_lancer()
6115 ocs_hw_linkcfg_cb_arg_t *cb_arg = (ocs_hw_linkcfg_cb_arg_t *)arg; in ocs_hw_get_active_link_config_cb() local
6116 sli4_res_common_get_reconfig_link_info_t *rsp = cb_arg->dma_cmd.virt; in ocs_hw_get_active_link_config_cb()
6127 if (cb_arg->cb) { in ocs_hw_get_active_link_config_cb()
6128 cb_arg->cb(status, value, cb_arg->arg); in ocs_hw_get_active_link_config_cb()
6132 if (cb_arg->opts != OCS_CMD_POLL) { in ocs_hw_get_active_link_config_cb()
6133 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_get_active_link_config_cb()
6134 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_get_active_link_config_cb()
6152 ocs_hw_linkcfg_cb_arg_t *cb_arg; in ocs_hw_get_linkcfg_skyhawk() local
6163 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_linkcfg_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_linkcfg_skyhawk()
6164 if (cb_arg == NULL) { in ocs_hw_get_linkcfg_skyhawk()
6170 cb_arg->cb = cb; in ocs_hw_get_linkcfg_skyhawk()
6171 cb_arg->arg = arg; in ocs_hw_get_linkcfg_skyhawk()
6172 cb_arg->opts = opts; in ocs_hw_get_linkcfg_skyhawk()
6175 if (ocs_dma_alloc(hw->os, &cb_arg->dma_cmd, sizeof(sli4_res_common_get_reconfig_link_info_t), 4)) { in ocs_hw_get_linkcfg_skyhawk()
6178 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_linkcfg_cb_arg_t)); in ocs_hw_get_linkcfg_skyhawk()
6182 if (sli_cmd_common_get_reconfig_link_info(&hw->sli, mbxdata, SLI4_BMBX_SIZE, &cb_arg->dma_cmd)) { in ocs_hw_get_linkcfg_skyhawk()
6183 rc = ocs_hw_command(hw, mbxdata, opts, ocs_hw_get_active_link_config_cb, cb_arg); in ocs_hw_get_linkcfg_skyhawk()
6189 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_get_linkcfg_skyhawk()
6190 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_linkcfg_cb_arg_t)); in ocs_hw_get_linkcfg_skyhawk()
6193 ocs_hw_get_active_link_config_cb(hw, 0, mbxdata, cb_arg); in ocs_hw_get_linkcfg_skyhawk()
6195 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_get_linkcfg_skyhawk()
6196 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_linkcfg_cb_arg_t)); in ocs_hw_get_linkcfg_skyhawk()
6472 ocs_hw_linkcfg_cb_arg_t *cb_arg = (ocs_hw_linkcfg_cb_arg_t *)arg; in ocs_hw_linkcfg_dmtf_clp_cb() local
6481 cb_arg->dma_resp.virt, in ocs_hw_linkcfg_dmtf_clp_cb()
6493 if (cb_arg->cb) { in ocs_hw_linkcfg_dmtf_clp_cb()
6494 cb_arg->cb(status, linkcfg, cb_arg->arg); in ocs_hw_linkcfg_dmtf_clp_cb()
6498 if (cb_arg->opts != OCS_CMD_POLL) { in ocs_hw_linkcfg_dmtf_clp_cb()
6499 ocs_dma_free(hw->os, &cb_arg->dma_cmd); in ocs_hw_linkcfg_dmtf_clp_cb()
6500 ocs_dma_free(hw->os, &cb_arg->dma_resp); in ocs_hw_linkcfg_dmtf_clp_cb()
6501 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_linkcfg_dmtf_clp_cb()
6676 ocs_hw_clp_cb_arg_t *cb_arg; in ocs_hw_exec_dmtf_clp_cmd() local
6687 cb_arg = ocs_malloc(hw->os, sizeof(*cb_arg), OCS_M_NOWAIT); in ocs_hw_exec_dmtf_clp_cmd()
6688 if (cb_arg == NULL) { in ocs_hw_exec_dmtf_clp_cmd()
6694 cb_arg->cb = cb; in ocs_hw_exec_dmtf_clp_cmd()
6695 cb_arg->arg = arg; in ocs_hw_exec_dmtf_clp_cmd()
6696 cb_arg->dma_resp = dma_resp; in ocs_hw_exec_dmtf_clp_cmd()
6697 cb_arg->opts = opts; in ocs_hw_exec_dmtf_clp_cmd()
6702 rc = ocs_hw_command(hw, mbxdata, opts, ocs_hw_dmtf_clp_cb, cb_arg); in ocs_hw_exec_dmtf_clp_cmd()
6708 ocs_hw_dmtf_clp_cb(hw, 0, mbxdata, cb_arg); in ocs_hw_exec_dmtf_clp_cmd()
6711 rc = cb_arg->status; in ocs_hw_exec_dmtf_clp_cmd()
6720 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_exec_dmtf_clp_cmd()
6726 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_exec_dmtf_clp_cmd()
6749 ocs_hw_clp_cb_arg_t *cb_arg = arg; in ocs_hw_dmtf_clp_cb() local
6780 if ((result_len == 0) || (cb_arg->dma_resp->size < result_len)) { in ocs_hw_dmtf_clp_cb()
6782 cb_arg->dma_resp->size, result_len); in ocs_hw_dmtf_clp_cb()
6790 cb_arg->dma_resp->virt, in ocs_hw_dmtf_clp_cb()
6808 cb_arg->status = cb_status; in ocs_hw_dmtf_clp_cb()
6809 if (cb_arg->cb) { in ocs_hw_dmtf_clp_cb()
6810 cb_arg->cb(hw, cb_status, result_len, cb_arg->arg); in ocs_hw_dmtf_clp_cb()
6813 if (cb_arg->opts != OCS_CMD_POLL) { in ocs_hw_dmtf_clp_cb()
6814 ocs_free(hw->os, cb_arg, sizeof(*cb_arg)); in ocs_hw_dmtf_clp_cb()
6928 ocs_hw_dump_get_cb_arg_t *cb_arg = arg; in ocs_hw_cb_dump_get() local
6935 if (cb_arg) { in ocs_hw_cb_dump_get()
6936 if (cb_arg->cb) { in ocs_hw_cb_dump_get()
6940 cb_arg->cb(status, bytes_read, eof, cb_arg->arg); in ocs_hw_cb_dump_get()
6943 ocs_free(hw->os, cb_arg->mbox_cmd, SLI4_BMBX_SIZE); in ocs_hw_cb_dump_get()
6944 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_dump_get_cb_arg_t)); in ocs_hw_cb_dump_get()
6975 ocs_hw_dump_get_cb_arg_t *cb_arg; in ocs_hw_dump_get() local
6999 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_dump_get_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_dump_get()
7000 if (cb_arg == NULL) { in ocs_hw_dump_get()
7006 cb_arg->cb = cb; in ocs_hw_dump_get()
7007 cb_arg->arg = arg; in ocs_hw_dump_get()
7008 cb_arg->mbox_cmd = mbxdata; in ocs_hw_dump_get()
7012 rc = ocs_hw_command(hw, mbxdata, opts, ocs_hw_cb_dump_get, cb_arg); in ocs_hw_dump_get()
7015 rc = ocs_hw_cb_dump_get(hw, 0, mbxdata, cb_arg); in ocs_hw_dump_get()
7022 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_dump_get_cb_arg_t)); in ocs_hw_dump_get()
7046 ocs_hw_dump_clear_cb_arg_t *cb_arg = arg; in ocs_hw_cb_dump_clear() local
7049 if (cb_arg) { in ocs_hw_cb_dump_clear()
7050 if (cb_arg->cb) { in ocs_hw_cb_dump_clear()
7054 cb_arg->cb(status, cb_arg->arg); in ocs_hw_cb_dump_clear()
7057 ocs_free(hw->os, cb_arg->mbox_cmd, SLI4_BMBX_SIZE); in ocs_hw_cb_dump_clear()
7058 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_dump_clear_cb_arg_t)); in ocs_hw_cb_dump_clear()
7086 ocs_hw_dump_clear_cb_arg_t *cb_arg; in ocs_hw_dump_clear() local
7100 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_dump_clear_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_dump_clear()
7101 if (cb_arg == NULL) { in ocs_hw_dump_clear()
7107 cb_arg->cb = cb; in ocs_hw_dump_clear()
7108 cb_arg->arg = arg; in ocs_hw_dump_clear()
7109 cb_arg->mbox_cmd = mbxdata; in ocs_hw_dump_clear()
7113 rc = ocs_hw_command(hw, mbxdata, opts, ocs_hw_cb_dump_clear, cb_arg); in ocs_hw_dump_clear()
7116 rc = ocs_hw_cb_dump_clear(hw, 0, mbxdata, cb_arg); in ocs_hw_dump_clear()
7123 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_dump_clear_cb_arg_t)); in ocs_hw_dump_clear()
7151 ocs_hw_get_port_protocol_cb_arg_t *cb_arg = arg; in ocs_hw_get_port_protocol_cb() local
7152 ocs_dma_t *payload = &(cb_arg->payload); in ocs_hw_get_port_protocol_cb()
7167 if (pcie_desc_p->pf_number == cb_arg->pci_func) { in ocs_hw_get_port_protocol_cb()
7188 if (cb_arg->cb) { in ocs_hw_get_port_protocol_cb()
7189 cb_arg->cb(status, port_protocol, cb_arg->arg); in ocs_hw_get_port_protocol_cb()
7192 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_get_port_protocol_cb()
7193 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_port_protocol_cb_arg_t)); in ocs_hw_get_port_protocol_cb()
7224 ocs_hw_get_port_protocol_cb_arg_t *cb_arg; in ocs_hw_get_port_protocol() local
7240 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_port_protocol_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_port_protocol()
7241 if (cb_arg == NULL) { in ocs_hw_get_port_protocol()
7247 cb_arg->cb = cb; in ocs_hw_get_port_protocol()
7248 cb_arg->arg = ul_arg; in ocs_hw_get_port_protocol()
7249 cb_arg->pci_func = pci_func; in ocs_hw_get_port_protocol()
7252 if (ocs_dma_alloc(hw->os, &cb_arg->payload, 4096, 4)) { in ocs_hw_get_port_protocol()
7255 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_port_protocol_cb_arg_t)); in ocs_hw_get_port_protocol()
7259 if (sli_cmd_common_get_profile_config(&hw->sli, mbxdata, SLI4_BMBX_SIZE, &cb_arg->payload)) { in ocs_hw_get_port_protocol()
7260 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_get_port_protocol_cb, cb_arg); in ocs_hw_get_port_protocol()
7266 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_fw_write_cb_arg_t)); in ocs_hw_get_port_protocol()
7267 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_get_port_protocol()
7302 ocs_hw_set_port_protocol_cb_arg_t *cb_arg = arg; in ocs_hw_set_port_protocol_cb2() local
7304 if (cb_arg->cb) { in ocs_hw_set_port_protocol_cb2()
7305 cb_arg->cb( status, cb_arg->arg); in ocs_hw_set_port_protocol_cb2()
7308 ocs_dma_free(hw->os, &(cb_arg->payload)); in ocs_hw_set_port_protocol_cb2()
7341 ocs_hw_set_port_protocol_cb_arg_t *cb_arg = arg; in ocs_hw_set_port_protocol_cb1() local
7342 ocs_dma_t *payload = &(cb_arg->payload); in ocs_hw_set_port_protocol_cb1()
7358 new_protocol = (ocs_hw_port_protocol_e)cb_arg->new_protocol; in ocs_hw_set_port_protocol_cb1()
7387 new_cb_arg->cb = cb_arg->cb; in ocs_hw_set_port_protocol_cb1()
7388 new_cb_arg->arg = cb_arg->arg; in ocs_hw_set_port_protocol_cb1()
7416 if (pcie_desc_p->pf_number == cb_arg->pci_func) { in ocs_hw_set_port_protocol_cb1()
7464 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_set_port_protocol_cb1()
7466 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_set_port_protocol_cb_arg_t)); in ocs_hw_set_port_protocol_cb1()
7517 ocs_hw_set_port_protocol_cb_arg_t *cb_arg; in ocs_hw_set_port_protocol() local
7533 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_port_protocol_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_set_port_protocol()
7534 if (cb_arg == NULL) { in ocs_hw_set_port_protocol()
7540 cb_arg->cb = cb; in ocs_hw_set_port_protocol()
7541 cb_arg->arg = ul_arg; in ocs_hw_set_port_protocol()
7542 cb_arg->new_protocol = new_protocol; in ocs_hw_set_port_protocol()
7543 cb_arg->pci_func = pci_func; in ocs_hw_set_port_protocol()
7546 if (ocs_dma_alloc(hw->os, &cb_arg->payload, 4096, 4)) { in ocs_hw_set_port_protocol()
7549 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_port_protocol_cb_arg_t)); in ocs_hw_set_port_protocol()
7553 if (sli_cmd_common_get_profile_config(&hw->sli, mbxdata, SLI4_BMBX_SIZE, &cb_arg->payload)) { in ocs_hw_set_port_protocol()
7554 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_set_port_protocol_cb1, cb_arg); in ocs_hw_set_port_protocol()
7560 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_fw_write_cb_arg_t)); in ocs_hw_set_port_protocol()
7561 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_set_port_protocol()
7594 ocs_hw_get_profile_list_cb_arg_t *cb_arg = arg; in ocs_hw_get_profile_list_cb() local
7595 ocs_dma_t *payload = &(cb_arg->payload); in ocs_hw_get_profile_list_cb()
7619 if (cb_arg->cb) { in ocs_hw_get_profile_list_cb()
7620 cb_arg->cb(status, list, cb_arg->arg); in ocs_hw_get_profile_list_cb()
7626 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_get_profile_list_cb()
7627 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_profile_list_cb_arg_t)); in ocs_hw_get_profile_list_cb()
7657 ocs_hw_get_profile_list_cb_arg_t *cb_arg; in ocs_hw_get_profile_list() local
7673 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_profile_list_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_profile_list()
7674 if (cb_arg == NULL) { in ocs_hw_get_profile_list()
7680 cb_arg->cb = cb; in ocs_hw_get_profile_list()
7681 cb_arg->arg = ul_arg; in ocs_hw_get_profile_list()
7684 if (ocs_dma_alloc(hw->os, &cb_arg->payload, sizeof(sli4_res_common_get_profile_list_t), 4)) { in ocs_hw_get_profile_list()
7687 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_profile_list_cb_arg_t)); in ocs_hw_get_profile_list()
7691 if (sli_cmd_common_get_profile_list(&hw->sli, mbxdata, SLI4_BMBX_SIZE, 0, &cb_arg->payload)) { in ocs_hw_get_profile_list()
7692 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_get_profile_list_cb, cb_arg); in ocs_hw_get_profile_list()
7698 ocs_dma_free(hw->os, &cb_arg->payload); in ocs_hw_get_profile_list()
7699 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_profile_list_cb_arg_t)); in ocs_hw_get_profile_list()
7724 ocs_hw_get_active_profile_cb_arg_t *cb_arg = arg; in ocs_hw_get_active_profile_cb() local
7731 if (cb_arg->cb) { in ocs_hw_get_active_profile_cb()
7732 cb_arg->cb(status, active_profile, cb_arg->arg); in ocs_hw_get_active_profile_cb()
7736 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_active_profile_cb_arg_t)); in ocs_hw_get_active_profile_cb()
7766 ocs_hw_get_active_profile_cb_arg_t *cb_arg; in ocs_hw_get_active_profile() local
7782 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_active_profile_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_active_profile()
7783 if (cb_arg == NULL) { in ocs_hw_get_active_profile()
7789 cb_arg->cb = cb; in ocs_hw_get_active_profile()
7790 cb_arg->arg = ul_arg; in ocs_hw_get_active_profile()
7793 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_get_active_profile_cb, cb_arg); in ocs_hw_get_active_profile()
7799 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_active_profile_cb_arg_t)); in ocs_hw_get_active_profile()
7824 ocs_hw_get_nvparms_cb_arg_t *cb_arg = arg; in ocs_hw_get_nvparms_cb() local
7827 if (cb_arg->cb) { in ocs_hw_get_nvparms_cb()
7828 cb_arg->cb(status, mbox_rsp->wwpn, mbox_rsp->wwnn, mbox_rsp->hard_alpa, in ocs_hw_get_nvparms_cb()
7829 mbox_rsp->preferred_d_id, cb_arg->arg); in ocs_hw_get_nvparms_cb()
7833 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_nvparms_cb_arg_t)); in ocs_hw_get_nvparms_cb()
7863 ocs_hw_get_nvparms_cb_arg_t *cb_arg; in ocs_hw_get_nvparms() local
7874 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_get_nvparms_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_get_nvparms()
7875 if (cb_arg == NULL) { in ocs_hw_get_nvparms()
7881 cb_arg->cb = cb; in ocs_hw_get_nvparms()
7882 cb_arg->arg = ul_arg; in ocs_hw_get_nvparms()
7885 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_get_nvparms_cb, cb_arg); in ocs_hw_get_nvparms()
7891 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_nvparms_cb_arg_t)); in ocs_hw_get_nvparms()
7916 ocs_hw_set_nvparms_cb_arg_t *cb_arg = arg; in ocs_hw_set_nvparms_cb() local
7918 if (cb_arg->cb) { in ocs_hw_set_nvparms_cb()
7919 cb_arg->cb(status, cb_arg->arg); in ocs_hw_set_nvparms_cb()
7923 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_set_nvparms_cb_arg_t)); in ocs_hw_set_nvparms_cb()
7961 ocs_hw_set_nvparms_cb_arg_t *cb_arg; in ocs_hw_set_nvparms() local
7972 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_nvparms_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_set_nvparms()
7973 if (cb_arg == NULL) { in ocs_hw_set_nvparms()
7979 cb_arg->cb = cb; in ocs_hw_set_nvparms()
7980 cb_arg->arg = ul_arg; in ocs_hw_set_nvparms()
7983 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_set_nvparms_cb, cb_arg); in ocs_hw_set_nvparms()
7989 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_set_nvparms_cb_arg_t)); in ocs_hw_set_nvparms()
8089 ocs_hw_set_active_profile_cb_arg_t *cb_arg = arg; in ocs_hw_set_active_profile_cb() local
8091 if (cb_arg->cb) { in ocs_hw_set_active_profile_cb()
8092 cb_arg->cb(status, cb_arg->arg); in ocs_hw_set_active_profile_cb()
8096 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_get_active_profile_cb_arg_t)); in ocs_hw_set_active_profile_cb()
8125 ocs_hw_set_active_profile_cb_arg_t *cb_arg; in ocs_hw_set_active_profile() local
8141 cb_arg = ocs_malloc(hw->os, sizeof(ocs_hw_set_active_profile_cb_arg_t), OCS_M_NOWAIT); in ocs_hw_set_active_profile()
8142 if (cb_arg == NULL) { in ocs_hw_set_active_profile()
8148 cb_arg->cb = cb; in ocs_hw_set_active_profile()
8149 cb_arg->arg = ul_arg; in ocs_hw_set_active_profile()
8152 rc = ocs_hw_command(hw, mbxdata, OCS_CMD_NOWAIT, ocs_hw_set_active_profile_cb, cb_arg); in ocs_hw_set_active_profile()
8158 ocs_free(hw->os, cb_arg, sizeof(ocs_hw_set_active_profile_cb_arg_t)); in ocs_hw_set_active_profile()