Lines Matching refs:icmd
65 void fct_gid_cb(fct_i_cmd_t *icmd);
801 fct_i_cmd_t *icmd = (fct_i_cmd_t *)cmd->cmd_fct_private;
809 icmd->icmd_start_time = ddi_get_lbolt();
811 icmd->icmd_flags |= ICMD_KNOWN_TO_FCA;
968 if (!(icmd->icmd_flags & ICMD_IMPLICIT)) {
984 atomic_or_32(&icmd->icmd_flags, ICMD_IMPLICIT_CMD_HAS_RESOURCE);
1005 atomic_or_32(&icmd->icmd_flags, ICMD_SESSION_AFFECTING);
1010 fct_post_to_discovery_queue(iport, irp, icmd);
1028 fct_i_cmd_t *icmd;
1042 icmd = iport->iport_cmd_slots[i].slot_cmd;
1043 if (icmd->icmd_flags & ICMD_IN_TRANSITION) {
1048 if (icmd->icmd_flags & ICMD_CMD_COMPLETE) {
1053 cmd = icmd->icmd_cmd;
1063 fct_q_for_termination_lock_held(iport, icmd,
1092 fct_i_cmd_t *icmd;
1095 icmd = irp->irp_els_list;
1096 irp->irp_els_list = icmd->icmd_next;
1097 atomic_and_32(&icmd->icmd_flags, ~ICMD_IN_IRP_QUEUE);
1378 fct_process_plogi(fct_i_cmd_t *icmd)
1380 fct_cmd_t *cmd = icmd->icmd_cmd;
1392 uint32_t icmd_flags = icmd->icmd_flags;
1418 end_time = icmd->icmd_start_time +
1423 "clean up I/O. iport-%p, icmd-%p", (void *)iport,
1424 (void *)icmd);
1471 if ((ret == FCT_SUCCESS) && !(icmd->icmd_flags & ICMD_IMPLICIT)) {
1504 atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
1507 atomic_and_32(&icmd->icmd_flags,
1556 fct_process_prli(fct_i_cmd_t *icmd)
1558 fct_cmd_t *cmd = icmd->icmd_cmd;
1618 end_time = icmd->icmd_start_time +
1623 "up I/O. iport-%p, icmd-%p", (void *)iport,
1624 (void *)icmd);
1711 fct_process_logo(fct_i_cmd_t *icmd)
1713 fct_cmd_t *cmd = icmd->icmd_cmd;
1746 end_time = icmd->icmd_start_time +
1751 "up I/O. iport-%p, icmd-%p", (void *)iport,
1752 (void *)icmd);
1781 if (!(icmd->icmd_flags & ICMD_IMPLICIT)) {
1785 atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
1788 atomic_and_32(&icmd->icmd_flags,
1825 fct_process_prlo(fct_i_cmd_t *icmd)
1827 fct_cmd_t *cmd = icmd->icmd_cmd;
1857 end_time = icmd->icmd_start_time +
1862 "clean up I/O. iport-%p, icmd-%p", (void *)iport,
1863 (void *)icmd);
1898 fct_process_rcvd_adisc(fct_i_cmd_t *icmd)
1900 fct_cmd_t *cmd = icmd->icmd_cmd;
1944 fct_process_unknown_els(fct_i_cmd_t *icmd)
1946 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
1950 ASSERT(icmd->icmd_cmd->cmd_type == FCT_CMD_RCVD_ELS);
1951 fct_dequeue_els(ICMD_TO_IRP(icmd));
1952 atomic_add_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count, -1);
1953 op = ICMD_TO_ELS(icmd)->els_req_payload[0];
1956 ret = fct_send_accrjt(icmd->icmd_cmd, ELS_OP_LSRJT, 1, 0);
1958 fct_queue_cmd_for_termination(icmd->icmd_cmd, ret);
1965 fct_process_rscn(fct_i_cmd_t *icmd)
1967 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
1973 fct_dequeue_els(ICMD_TO_IRP(icmd));
1974 atomic_add_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count, -1);
1975 if (icmd->icmd_cmd->cmd_type == FCT_CMD_RCVD_ELS) {
1976 op = ICMD_TO_ELS(icmd)->els_req_payload[0];
1979 rscn_req_size = ICMD_TO_ELS(icmd)->els_req_size;
1981 bcopy(ICMD_TO_ELS(icmd)->els_req_payload, rscn_req_payload,
1983 ret = fct_send_accrjt(icmd->icmd_cmd, ELS_OP_ACC, 1, 0);
1985 fct_queue_cmd_for_termination(icmd->icmd_cmd, ret);
2005 fct_i_cmd_t **ppcmd, *icmd;
2095 icmd = irp->irp_els_list;
2096 if (icmd == NULL) {
2105 cmd = icmd->icmd_cmd;
2106 els = ICMD_TO_ELS(icmd);
2108 if ((icmd->icmd_flags & ICMD_ELS_PROCESSING_STARTED) == 0) {
2112 atomic_or_32(&icmd->icmd_flags, ICMD_ELS_PROCESSING_STARTED);
2116 ret |= fct_process_plogi(icmd);
2118 ret |= fct_process_prli(icmd);
2120 ret |= fct_process_logo(icmd);
2122 ret |= fct_process_prlo(icmd);
2129 atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
2131 atomic_and_32(&icmd->icmd_flags, ~ICMD_KNOWN_TO_FCA);
2137 ret |= fct_process_rcvd_adisc(icmd);
2139 (void) fct_process_rscn(icmd);
2141 (void) fct_process_unknown_els(icmd);
2164 fct_handle_sol_els_completion(fct_i_local_port_t *iport, fct_i_cmd_t *icmd)
2167 fct_els_t *els = ICMD_TO_ELS(icmd);
2170 if (icmd->icmd_cmd->cmd_rp) {
2171 irp = ICMD_TO_IRP(icmd);
2173 if (icmd->icmd_cmd->cmd_rp &&
2174 (icmd->icmd_cmd->cmd_comp_status == FCT_SUCCESS) &&
2192 atomic_or_32(&icmd->icmd_flags, ICMD_CMD_COMPLETE);
2195 icmd->icmd_cmd->cmd_comp_status, icmd->icmd_cmd->cmd_rportid);
2202 fct_i_cmd_t *icmd;
2220 icmd = iport->iport_cached_cmdlist;
2221 if (icmd == NULL) {
2225 iport->iport_cached_cmdlist = icmd->icmd_next;
2229 fct_free(icmd->icmd_cmd);
2243 fct_i_cmd_t *icmd = NULL;
2248 for (icmd = iport->iport_solcmd_queue; icmd; icmd = next_icmd) {
2249 ASSERT(icmd->icmd_flags | ICMD_IN_SOLCMD_QUEUE);
2250 next_icmd = icmd->icmd_solcmd_next;
2251 if (icmd->icmd_flags & ICMD_SOLCMD_NEW) {
2257 icmd->icmd_flags &= ~ICMD_SOLCMD_NEW;
2260 if (icmd->icmd_cmd->cmd_type == FCT_CMD_SOL_ELS) {
2261 fct_handle_els(icmd->icmd_cmd);
2263 fct_handle_solct(icmd->icmd_cmd);
2267 } else if (icmd->icmd_flags & ICMD_CMD_COMPLETE) {
2272 if (icmd->icmd_cb) {
2276 icmd->icmd_cb(icmd);
2283 if (iport->iport_solcmd_queue == icmd) {
2287 while (prev_icmd->icmd_solcmd_next != icmd) {
2293 icmd->icmd_cb = NULL;
2295 fct_cmd_free(icmd->icmd_cmd);
2302 if (((icmd->icmd_start_time + drv_usectohz(
2304 !(icmd->icmd_flags & ICMD_BEING_ABORTED)) {
2306 icmd, FCT_ABORTED);
2318 fct_i_cmd_t *icmd = CMD_TO_ICMD(cmd);
2319 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2320 fct_i_remote_port_t *irp = ICMD_TO_IRP(icmd);
2364 if (fct_netbuf_to_value(ICMD_TO_CT(icmd)->ct_req_payload + 8, 2) ==
2369 ICMD_TO_CT(icmd)->ct_req_payload + 16);
2378 atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
2379 icmd->icmd_start_time = ddi_get_lbolt();
2382 atomic_and_32(&icmd->icmd_flags, ~ICMD_KNOWN_TO_FCA);
2388 fct_logo_cb(fct_i_cmd_t *icmd)
2390 ASSERT(!(icmd->icmd_flags & ICMD_IMPLICIT));
2391 if (!FCT_IS_ELS_ACC(icmd)) {
2392 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_logo_cb: "
2393 "solicited LOGO is not accepted - icmd/%p", icmd);
2398 fct_gsnn_cb(fct_i_cmd_t *icmd)
2404 if (!FCT_IS_CT_ACC(icmd)) {
2405 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gsnn_cb: "
2406 "GSNN is not accepted by NS - icmd/%p", icmd);
2409 mutex_exit(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2411 rw_enter(&ICMD_TO_IPORT(icmd)->iport_lock, RW_READER);
2412 mutex_enter(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2413 query_irp = fct_lookup_irp_by_nodewwn(ICMD_TO_IPORT(icmd),
2414 ICMD_TO_CT(icmd)->ct_req_payload + 16);
2417 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gsnn_cb: "
2418 "can't get rp icmd-%p", icmd);
2421 snlen = ICMD_TO_CT(icmd)->ct_resp_payload[16];
2436 ICMD_TO_CT(icmd)->ct_resp_payload + 17, snlen);
2438 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias,
2454 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gsnn_cb: "
2459 rw_exit(&ICMD_TO_IPORT(icmd)->iport_lock);
2463 fct_link_init_cb(fct_i_cmd_t *icmd)
2465 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2468 if (icmd->icmd_cmd->cmd_comp_status != FCT_SUCCESS) {
2470 "comp_status- %llx", ICMD_TO_ELS(icmd)->els_req_payload[0],
2471 icmd->icmd_cmd->cmd_comp_status);
2472 iport->iport_li_comp_status = icmd->icmd_cmd->cmd_comp_status;
2473 } else if (icmd->icmd_cmd->cmd_type == FCT_CMD_SOL_ELS) {
2474 if (!FCT_IS_ELS_ACC(icmd)) {
2477 ICMD_TO_ELS(icmd)->els_req_payload[0]);
2479 ICMD_TO_ELS(icmd)->els_resp_payload[1],
2480 ICMD_TO_ELS(icmd)->els_resp_payload[2]);
2485 ASSERT(icmd->icmd_cmd->cmd_type == FCT_CMD_SOL_CT);
2486 if (!FCT_IS_CT_ACC(icmd)) {
2489 ICMD_TO_CT(icmd)->ct_req_payload[8],
2490 ICMD_TO_CT(icmd)->ct_req_payload[9]);
2492 ICMD_TO_CT(icmd)->ct_resp_payload[8],
2493 ICMD_TO_CT(icmd)->ct_resp_payload[9]);
2501 fct_gcs_cb(fct_i_cmd_t *icmd)
2503 fct_sol_ct_t *ct = ICMD_TO_CT(icmd);
2505 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2510 if (!FCT_IS_CT_ACC(icmd)) {
2511 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gcs_cb: "
2512 "GCS_ID is not accepted by NS - icmd/%p", icmd);
2533 fct_gft_cb(fct_i_cmd_t *icmd)
2535 fct_sol_ct_t *ct = ICMD_TO_CT(icmd);
2537 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2542 if (!FCT_IS_CT_ACC(icmd)) {
2543 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gft_cb: "
2544 "GFT_ID is not accepted by NS - icmd/%p", icmd);
2564 fct_gid_cb(fct_i_cmd_t *icmd)
2571 mutex_exit(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2573 rw_enter(&ICMD_TO_IPORT(icmd)->iport_lock, RW_READER);
2574 mutex_enter(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2575 query_irp = fct_lookup_irp_by_portwwn(ICMD_TO_IPORT(icmd),
2576 ICMD_TO_CT(icmd)->ct_req_payload + 16);
2579 (PTR2INT(icmd->icmd_cb_private, uint32_t) !=
2581 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gid_cb: "
2583 PTR2INT(icmd->icmd_cb_private, uint32_t));
2589 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gid_cb: "
2594 if (!FCT_IS_CT_ACC(icmd)) {
2598 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gid_cb: "
2599 "GPN_ID is not accepted by NS - icmd/%p", icmd);
2606 ICMD_TO_CT(icmd)->ct_resp_payload + 17, 3);
2608 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias,
2615 cmd = fct_create_solels(ICMD_TO_PORT(icmd),
2618 mutex_exit(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2620 mutex_enter(&ICMD_TO_IPORT(icmd)->iport_worker_lock);
2625 rw_exit(&ICMD_TO_IPORT(icmd)->iport_lock);
2629 fct_gspn_cb(fct_i_cmd_t *icmd)
2631 fct_sol_ct_t *ct = ICMD_TO_CT(icmd);
2633 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2639 if (!FCT_IS_CT_ACC(icmd)) {
2640 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_gspn_cb: "
2641 "GSPN_ID is not accepted by NS - icmd/%p", icmd);
2669 fct_rls_cb(fct_i_cmd_t *icmd)
2671 fct_els_t *els = ICMD_TO_ELS(icmd);
2675 fct_i_local_port_t *iport = ICMD_TO_IPORT(icmd);
2677 rls_cb_data = icmd->icmd_cb_private;
2679 if (!FCT_IS_ELS_ACC(icmd)) {
2680 stmf_trace(ICMD_TO_IPORT(icmd)->iport_alias, "fct_rls_cb: "
2681 "solicited RLS is not accepted - icmd/%p", icmd);
2696 rls_cb_data = icmd->icmd_cb_private;
2711 icmd->icmd_cb_private = NULL;