Lines Matching refs:crq
207 struct ibmvmc_crq_msg *crq; in crq_queue_next_crq() local
211 crq = &queue->msgs[queue->cur]; in crq_queue_next_crq()
212 if (crq->valid & 0x80) { in crq_queue_next_crq()
221 crq = NULL; in crq_queue_next_crq()
226 return crq; in crq_queue_next_crq()
1428 struct ibmvmc_crq_msg *crq) in ibmvmc_add_buffer() argument
1437 if (!crq) in ibmvmc_add_buffer()
1440 hmc_session = crq->hmc_session; in ibmvmc_add_buffer()
1441 hmc_index = crq->hmc_index; in ibmvmc_add_buffer()
1442 buffer_id = be16_to_cpu(crq->var2.buffer_id); in ibmvmc_add_buffer()
1484 buffer->dma_addr_remote = be32_to_cpu(crq->var3.lioba); in ibmvmc_add_buffer()
1486 buffer->owner = crq->var1.owner; in ibmvmc_add_buffer()
1545 struct ibmvmc_crq_msg *crq) in ibmvmc_rem_buffer() argument
1554 if (!crq) in ibmvmc_rem_buffer()
1557 hmc_session = crq->hmc_session; in ibmvmc_rem_buffer()
1558 hmc_index = crq->hmc_index; in ibmvmc_rem_buffer()
1598 struct ibmvmc_crq_msg *crq) in ibmvmc_recv_msg() argument
1609 if (!crq) in ibmvmc_recv_msg()
1614 be64_to_cpu(*((unsigned long *)crq)), in ibmvmc_recv_msg()
1615 be64_to_cpu(*(((unsigned long *)crq) + 1))); in ibmvmc_recv_msg()
1617 hmc_session = crq->hmc_session; in ibmvmc_recv_msg()
1618 hmc_index = crq->hmc_index; in ibmvmc_recv_msg()
1619 buffer_id = be16_to_cpu(crq->var2.buffer_id); in ibmvmc_recv_msg()
1620 msg_len = be32_to_cpu(crq->var3.msg_len); in ibmvmc_recv_msg()
1705 struct ibmvmc_admin_crq_msg *crq = (struct ibmvmc_admin_crq_msg *)crqp; in ibmvmc_process_capabilities() local
1707 if ((be16_to_cpu(crq->version) >> 8) != in ibmvmc_process_capabilities()
1710 be16_to_cpu(crq->version), in ibmvmc_process_capabilities()
1716 ibmvmc.max_mtu = min_t(u32, ibmvmc_max_mtu, be32_to_cpu(crq->max_mtu)); in ibmvmc_process_capabilities()
1718 be16_to_cpu(crq->pool_size)); in ibmvmc_process_capabilities()
1719 ibmvmc.max_hmc_index = min_t(u8, ibmvmc_max_hmcs, crq->max_hmc) - 1; in ibmvmc_process_capabilities()
1738 struct ibmvmc_crq_msg *crq) in ibmvmc_validate_hmc_session() argument
1742 hmc_index = crq->hmc_index; in ibmvmc_validate_hmc_session()
1744 if (crq->hmc_session == 0) in ibmvmc_validate_hmc_session()
1750 if (hmcs[hmc_index].session != crq->hmc_session) { in ibmvmc_validate_hmc_session()
1752 hmcs[hmc_index].session, crq->hmc_session); in ibmvmc_validate_hmc_session()
1858 static void ibmvmc_process_open_resp(struct ibmvmc_crq_msg *crq, in ibmvmc_process_open_resp() argument
1864 hmc_index = crq->hmc_index; in ibmvmc_process_open_resp()
1871 if (crq->status) { in ibmvmc_process_open_resp()
1873 crq->status); in ibmvmc_process_open_resp()
1879 buffer_id = be16_to_cpu(crq->var2.buffer_id); in ibmvmc_process_open_resp()
1908 static void ibmvmc_process_close_resp(struct ibmvmc_crq_msg *crq, in ibmvmc_process_close_resp() argument
1913 hmc_index = crq->hmc_index; in ibmvmc_process_close_resp()
1919 if (crq->status) { in ibmvmc_process_close_resp()
1921 crq->status); in ibmvmc_process_close_resp()
1939 struct ibmvmc_crq_msg *crq) in ibmvmc_crq_process() argument
1941 switch (crq->type) { in ibmvmc_crq_process()
1944 crq->type); in ibmvmc_crq_process()
1946 ibmvmc_process_capabilities(adapter, crq); in ibmvmc_crq_process()
1953 crq->type); in ibmvmc_crq_process()
1954 if (ibmvmc_validate_hmc_session(adapter, crq) == 0) in ibmvmc_crq_process()
1955 ibmvmc_process_open_resp(crq, adapter); in ibmvmc_crq_process()
1959 crq->type); in ibmvmc_crq_process()
1960 if (ibmvmc_validate_hmc_session(adapter, crq) == 0) in ibmvmc_crq_process()
1961 ibmvmc_add_buffer(adapter, crq); in ibmvmc_crq_process()
1965 crq->type); in ibmvmc_crq_process()
1966 if (ibmvmc_validate_hmc_session(adapter, crq) == 0) in ibmvmc_crq_process()
1967 ibmvmc_rem_buffer(adapter, crq); in ibmvmc_crq_process()
1971 crq->type); in ibmvmc_crq_process()
1972 if (ibmvmc_validate_hmc_session(adapter, crq) == 0) in ibmvmc_crq_process()
1973 ibmvmc_recv_msg(adapter, crq); in ibmvmc_crq_process()
1977 crq->type); in ibmvmc_crq_process()
1978 if (ibmvmc_validate_hmc_session(adapter, crq) == 0) in ibmvmc_crq_process()
1979 ibmvmc_process_close_resp(crq, adapter); in ibmvmc_crq_process()
1987 crq->type); in ibmvmc_crq_process()
1991 crq->type); in ibmvmc_crq_process()
2006 static void ibmvmc_handle_crq_init(struct ibmvmc_crq_msg *crq, in ibmvmc_handle_crq_init() argument
2009 switch (crq->type) { in ibmvmc_handle_crq_init()
2034 (unsigned long)crq->type); in ibmvmc_handle_crq_init()
2048 static void ibmvmc_handle_crq(struct ibmvmc_crq_msg *crq, in ibmvmc_handle_crq() argument
2051 switch (crq->valid) { in ibmvmc_handle_crq()
2053 ibmvmc_handle_crq_init(crq, adapter); in ibmvmc_handle_crq()
2060 ibmvmc_crq_process(adapter, crq); in ibmvmc_handle_crq()
2064 crq->valid); in ibmvmc_handle_crq()
2074 struct ibmvmc_crq_msg *crq; in ibmvmc_task() local
2079 while ((crq = crq_queue_next_crq(&adapter->queue)) != NULL) { in ibmvmc_task()
2080 ibmvmc_handle_crq(crq, adapter); in ibmvmc_task()
2081 crq->valid = 0x00; in ibmvmc_task()
2090 crq = crq_queue_next_crq(&adapter->queue); in ibmvmc_task()
2091 if (crq) { in ibmvmc_task()
2093 ibmvmc_handle_crq(crq, adapter); in ibmvmc_task()
2094 crq->valid = 0x00; in ibmvmc_task()