Lines Matching refs:crq
54 struct viosrp_crq *crq);
102 struct viosrp_crq *crq; in connection_broken() local
108 crq = (struct viosrp_crq *)&buffer; in connection_broken()
109 crq->valid = VALID_CMD_RESP_EL; in connection_broken()
110 crq->format = MESSAGE_IN_CRQ; in connection_broken()
111 crq->status = PING; in connection_broken()
333 struct viosrp_crq *crq; in ibmvscsis_send_init_message() local
337 crq = (struct viosrp_crq *)&buffer; in ibmvscsis_send_init_message()
338 crq->valid = VALID_INIT_MSG; in ibmvscsis_send_init_message()
339 crq->format = format; in ibmvscsis_send_init_message()
360 struct viosrp_crq *crq; in ibmvscsis_check_init_msg() local
363 crq = ibmvscsis_cmd_q_dequeue(vscsi->cmd_q.mask, &vscsi->cmd_q.index, in ibmvscsis_check_init_msg()
365 if (!crq) { in ibmvscsis_check_init_msg()
367 } else if (crq->valid == VALID_INIT_MSG && crq->format == INIT_MSG) { in ibmvscsis_check_init_msg()
369 crq->valid = INVALIDATE_CMD_RESP_EL; in ibmvscsis_check_init_msg()
377 crq = ibmvscsis_cmd_q_dequeue(vscsi->cmd_q.mask, in ibmvscsis_check_init_msg()
380 if (crq) { in ibmvscsis_check_init_msg()
381 *format = (uint)(crq->format); in ibmvscsis_check_init_msg()
383 crq->valid = INVALIDATE_CMD_RESP_EL; in ibmvscsis_check_init_msg()
387 *format = (uint)(crq->format); in ibmvscsis_check_init_msg()
389 crq->valid = INVALIDATE_CMD_RESP_EL; in ibmvscsis_check_init_msg()
761 static long ibmvscsis_init_msg(struct scsi_info *vscsi, struct viosrp_crq *crq) in ibmvscsis_init_msg() argument
780 if (crq->format == INIT_MSG) { in ibmvscsis_init_msg()
782 } else if (crq->format == INIT_COMPLETE_MSG) { in ibmvscsis_init_msg()
787 (uint)crq->format); in ibmvscsis_init_msg()
979 struct viosrp_crq *crq; in ibmvscsis_ready_for_suspend() local
982 crq = vscsi->cmd_q.base_addr + vscsi->cmd_q.index; in ibmvscsis_ready_for_suspend()
985 vscsi->flags, vscsi->state, (int)crq->valid); in ibmvscsis_ready_for_suspend()
987 if (!(vscsi->flags & PREP_FOR_SUSPEND_ABORTED) && !(crq->valid)) { in ibmvscsis_ready_for_suspend()
997 ((crq->valid) && ((crq->valid != VALID_TRANS_EVENT) || in ibmvscsis_ready_for_suspend()
998 (crq->format != RESUME_FROM_SUSP)))) { in ibmvscsis_ready_for_suspend()
1010 if ((crq->valid) && ((crq->valid != VALID_TRANS_EVENT) || in ibmvscsis_ready_for_suspend()
1011 (crq->format != RESUME_FROM_SUSP))) in ibmvscsis_ready_for_suspend()
1032 struct viosrp_crq *crq) in ibmvscsis_trans_event() argument
1037 (int)crq->format, vscsi->flags, vscsi->state); in ibmvscsis_trans_event()
1039 switch (crq->format) { in ibmvscsis_trans_event()
1044 if (crq->format == MIGRATED) in ibmvscsis_trans_event()
1098 (int)crq->status); in ibmvscsis_trans_event()
1108 if (crq->status == CRQ_ENTRY_OVERWRITTEN) in ibmvscsis_trans_event()
1127 (int)crq->status); in ibmvscsis_trans_event()
1131 if ((crq->status == CRQ_ENTRY_OVERWRITTEN) || in ibmvscsis_trans_event()
1144 (uint)crq->format); in ibmvscsis_trans_event()
1170 struct viosrp_crq *crq; in ibmvscsis_poll_cmd_q() local
1179 crq = vscsi->cmd_q.base_addr + vscsi->cmd_q.index; in ibmvscsis_poll_cmd_q()
1180 valid = crq->valid; in ibmvscsis_poll_cmd_q()
1189 rc = ibmvscsis_parse_command(vscsi, crq); in ibmvscsis_poll_cmd_q()
1191 if ((uint)crq->valid == VALID_TRANS_EVENT) { in ibmvscsis_poll_cmd_q()
1198 rc = ibmvscsis_trans_event(vscsi, crq); in ibmvscsis_poll_cmd_q()
1222 crq->valid = INVALIDATE_CMD_RESP_EL; in ibmvscsis_poll_cmd_q()
1224 crq = vscsi->cmd_q.base_addr + vscsi->cmd_q.index; in ibmvscsis_poll_cmd_q()
1225 valid = crq->valid; in ibmvscsis_poll_cmd_q()
1235 valid = crq->valid; in ibmvscsis_poll_cmd_q()
1443 struct viosrp_crq *crq) in ibmvscsis_copy_crq_packet() argument
1449 len = be16_to_cpu(crq->IU_length); in ibmvscsis_copy_crq_packet()
1457 be64_to_cpu(crq->IU_data_ptr), in ibmvscsis_copy_crq_packet()
1463 iue->remote_token = crq->IU_data_ptr; in ibmvscsis_copy_crq_packet()
1466 be64_to_cpu(crq->IU_data_ptr), cmd->init_time); in ibmvscsis_copy_crq_packet()
1876 struct viosrp_crq *crq = &empty_crq; in ibmvscsis_send_messages() local
1931 crq->valid = VALID_CMD_RESP_EL; in ibmvscsis_send_messages()
1932 crq->format = cmd->rsp.format; in ibmvscsis_send_messages()
1935 crq->status = VIOSRP_ADAPTER_FAIL; in ibmvscsis_send_messages()
1937 crq->IU_length = cpu_to_be16(cmd->rsp.len); in ibmvscsis_send_messages()
1940 be64_to_cpu(crq->high), in ibmvscsis_send_messages()
1981 struct viosrp_crq *crq) in ibmvscsis_send_mad_resp() argument
1992 be64_to_cpu(crq->IU_data_ptr)); in ibmvscsis_send_mad_resp()
2023 static long ibmvscsis_mad(struct scsi_info *vscsi, struct viosrp_crq *crq) in ibmvscsis_mad() argument
2069 rc = ibmvscsis_copy_crq_packet(vscsi, cmd, crq); in ibmvscsis_mad()
2081 ibmvscsis_send_mad_resp(vscsi, cmd, crq); in ibmvscsis_mad()
2274 struct viosrp_crq *crq) in ibmvscsis_srp_login() argument
2348 struct viosrp_crq *crq) in ibmvscsis_srp_i_logout() argument
2371 static void ibmvscsis_srp_cmd(struct scsi_info *vscsi, struct viosrp_crq *crq) in ibmvscsis_srp_cmd() argument
2397 rc = ibmvscsis_copy_crq_packet(vscsi, cmd, crq); in ibmvscsis_srp_cmd()
2406 rc = ibmvscsis_srp_login(vscsi, cmd, crq); in ibmvscsis_srp_cmd()
2435 rc = ibmvscsis_srp_i_logout(vscsi, cmd, crq); in ibmvscsis_srp_cmd()
2449 rc = ibmvscsis_srp_login(vscsi, cmd, crq); in ibmvscsis_srp_cmd()
2473 struct viosrp_crq *crq; in ibmvscsis_ping_response() local
2477 crq = (struct viosrp_crq *)&buffer; in ibmvscsis_ping_response()
2478 crq->valid = VALID_CMD_RESP_EL; in ibmvscsis_ping_response()
2479 crq->format = (u8)MESSAGE_IN_CRQ; in ibmvscsis_ping_response()
2480 crq->status = PING_RESPONSE; in ibmvscsis_ping_response()
2522 struct viosrp_crq *crq) in ibmvscsis_parse_command() argument
2526 switch (crq->valid) { in ibmvscsis_parse_command()
2528 switch (crq->format) { in ibmvscsis_parse_command()
2541 rc = ibmvscsis_mad(vscsi, crq); in ibmvscsis_parse_command()
2546 ibmvscsis_srp_cmd(vscsi, crq); in ibmvscsis_parse_command()
2550 if (crq->status == PING) in ibmvscsis_parse_command()
2556 (uint)crq->format); in ibmvscsis_parse_command()
2564 rc = ibmvscsis_trans_event(vscsi, crq); in ibmvscsis_parse_command()
2568 rc = ibmvscsis_init_msg(vscsi, crq); in ibmvscsis_parse_command()
2573 (uint)crq->valid); in ibmvscsis_parse_command()
3323 struct viosrp_crq *crq; in ibmvscsis_handle_crq() local
3347 crq = vscsi->cmd_q.base_addr + vscsi->cmd_q.index; in ibmvscsis_handle_crq()
3348 valid = crq->valid; in ibmvscsis_handle_crq()
3363 rc = ibmvscsis_parse_command(vscsi, crq); in ibmvscsis_handle_crq()
3365 if ((uint)crq->valid == VALID_TRANS_EVENT) { in ibmvscsis_handle_crq()
3372 rc = ibmvscsis_trans_event(vscsi, crq); in ibmvscsis_handle_crq()
3393 crq->valid = INVALIDATE_CMD_RESP_EL; in ibmvscsis_handle_crq()
3395 crq = vscsi->cmd_q.base_addr + vscsi->cmd_q.index; in ibmvscsis_handle_crq()
3396 valid = crq->valid; in ibmvscsis_handle_crq()
3406 valid = crq->valid; in ibmvscsis_handle_crq()