Lines Matching refs:crq
109 static void ibmvscsi_handle_crq(struct viosrp_crq *crq,
169 struct viosrp_crq *crq; in crq_queue_next_crq() local
173 crq = &queue->msgs[queue->cur]; in crq_queue_next_crq()
174 if (crq->valid != VIOSRP_CRQ_FREE) { in crq_queue_next_crq()
183 crq = NULL; in crq_queue_next_crq()
186 return crq; in crq_queue_next_crq()
216 struct viosrp_crq *crq; in ibmvscsi_task() local
221 while ((crq = crq_queue_next_crq(&hostdata->queue)) != NULL) { in ibmvscsi_task()
222 ibmvscsi_handle_crq(crq, hostdata); in ibmvscsi_task()
223 crq->valid = VIOSRP_CRQ_FREE; in ibmvscsi_task()
228 crq = crq_queue_next_crq(&hostdata->queue); in ibmvscsi_task()
229 if (crq != NULL) { in ibmvscsi_task()
231 ibmvscsi_handle_crq(crq, hostdata); in ibmvscsi_task()
232 crq->valid = VIOSRP_CRQ_FREE; in ibmvscsi_task()
465 memset(&evt->crq, 0x00, sizeof(evt->crq)); in initialize_event_pool()
467 evt->crq.valid = VIOSRP_CRQ_CMD_RSP; in initialize_event_pool()
468 evt->crq.IU_length = cpu_to_be16(sizeof(*evt->xfer_iu)); in initialize_event_pool()
469 evt->crq.IU_data_ptr = cpu_to_be64(pool->iu_token + in initialize_event_pool()
590 evt_struct->crq.format = format; in init_event_struct()
591 evt_struct->crq.timeout = cpu_to_be16(timeout); in init_event_struct()
801 } else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT && in purge_requests()
874 __be64 *crq_as_u64 = (__be64 *)&evt_struct->crq; in ibmvscsi_send_srp_event()
885 if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) { in ibmvscsi_send_srp_event()
1089 cpu_to_be64(be64_to_cpu(evt_struct->crq.IU_data_ptr) + in ibmvscsi_queuecommand_lck()
1766 static void ibmvscsi_handle_crq(struct viosrp_crq *crq, in ibmvscsi_handle_crq() argument
1773 (__force struct srp_event_struct *)crq->IU_data_ptr; in ibmvscsi_handle_crq()
1774 switch (crq->valid) { in ibmvscsi_handle_crq()
1776 switch (crq->format) { in ibmvscsi_handle_crq()
1796 dev_err(hostdata->dev, "unknown crq message type: %d\n", crq->format); in ibmvscsi_handle_crq()
1802 if (crq->format == 0x06) { in ibmvscsi_handle_crq()
1811 crq->format); in ibmvscsi_handle_crq()
1819 crq->valid); in ibmvscsi_handle_crq()
1839 if (crq->format == VIOSRP_SRP_FORMAT) in ibmvscsi_handle_crq()
1845 if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd) in ibmvscsi_handle_crq()