Lines Matching full:crq

26  * (CRQ), which is just a buffer of 16 byte entries in the receiver's 
38 * payload of a CRQ message. The server DMAs the SRP IU and processes it,
41 * and sends a CRQ message back to inform the client that the request has
109 static void ibmvscsi_handle_crq(struct viosrp_crq *crq,
116 * ibmvscsi_handle_event: - Interrupt handler for crq events
133 * ibmvscsi_release_crq_queue() - Deallocates data and unregisters CRQ
139 * the crq with the hypervisor.
165 * entried in the 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()
179 * other bits of the CRQ entry in crq_queue_next_crq()
183 crq = NULL; in crq_queue_next_crq()
186 return crq; in crq_queue_next_crq()
190 * ibmvscsi_send_crq: - Send a CRQ
216 struct viosrp_crq *crq; in ibmvscsi_task() local
220 /* Pull all the valid messages off the CRQ */ in ibmvscsi_task()
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()
280 * ibmvscsi_reset_crq_queue() - resets a crq after a failure
290 /* Close the CRQ */ in ibmvscsi_reset_crq_queue()
311 dev_warn(hostdata->dev, "couldn't register crq--rc 0x%x\n", rc); in ibmvscsi_reset_crq_queue()
317 * ibmvscsi_init_crq_queue() - Initializes and registers CRQ with hypervisor
323 * the crq with the hypervisor.
408 * ibmvscsi_reenable_crq_queue() - reenables a crq after
420 /* Re-enable the CRQ */ in ibmvscsi_reenable_crq_queue()
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()
580 * @timeout: timeout value set in the CRQ
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()
950 * Firmware will send a CRQ with a transport event (0xFF) to in ibmvscsi_send_srp_event()
1089 cpu_to_be64(be64_to_cpu(evt_struct->crq.IU_data_ptr) + in ibmvscsi_queuecommand_lck()
1761 * ibmvscsi_handle_crq: - Handles and frees received events in the CRQ
1762 * @crq: Command/Response queue
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()
2266 dev_err(&vdev->dev, "couldn't initialize crq. rc=%d\n", rc); in ibmvscsi_probe()