Lines Matching refs:hmc_index

324 static struct ibmvmc_buffer *ibmvmc_get_valid_hmc_buffer(u8 hmc_index)  in ibmvmc_get_valid_hmc_buffer()  argument
330 if (hmc_index > ibmvmc.max_hmc_index) in ibmvmc_get_valid_hmc_buffer()
333 buffer = hmcs[hmc_index].buffer; in ibmvmc_get_valid_hmc_buffer()
357 u8 hmc_index) in ibmvmc_get_free_hmc_buffer() argument
363 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_get_free_hmc_buffer()
365 hmc_index); in ibmvmc_get_free_hmc_buffer()
369 buffer = hmcs[hmc_index].buffer; in ibmvmc_get_free_hmc_buffer()
408 static void ibmvmc_count_hmc_buffers(u8 hmc_index, unsigned int *valid, in ibmvmc_count_hmc_buffers() argument
415 if (hmc_index > ibmvmc.max_hmc_index) in ibmvmc_count_hmc_buffers()
423 buffer = hmcs[hmc_index].buffer; in ibmvmc_count_hmc_buffers()
424 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_count_hmc_buffers()
434 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_count_hmc_buffers()
580 crq_msg.hmc_index = hmc->index; in ibmvmc_send_open()
624 crq_msg.hmc_index = hmc->index; in ibmvmc_send_close()
694 u8 hmc_index, u16 buffer_id) in ibmvmc_send_add_buffer_resp() argument
705 crq_msg.hmc_index = hmc_index; in ibmvmc_send_add_buffer_resp()
735 u8 hmc_index, u16 buffer_id) in ibmvmc_send_rem_buffer_resp() argument
746 crq_msg.hmc_index = hmc_index; in ibmvmc_send_rem_buffer_resp()
802 crq_msg.hmc_index = hmc->index; in ibmvmc_send_msg()
1431 u8 hmc_index; in ibmvmc_add_buffer() local
1441 hmc_index = crq->hmc_index; in ibmvmc_add_buffer()
1444 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_add_buffer()
1446 hmc_index); in ibmvmc_add_buffer()
1448 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1456 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1460 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1461 buffer = &hmcs[hmc_index].buffer[buffer_id]; in ibmvmc_add_buffer()
1466 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1468 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1478 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1480 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1495 hmc_index, hmc_session, buffer_id, buffer->owner); in ibmvmc_add_buffer()
1499 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1502 hmc_index, buffer_id); in ibmvmc_add_buffer()
1548 u8 hmc_index; in ibmvmc_rem_buffer() local
1558 hmc_index = crq->hmc_index; in ibmvmc_rem_buffer()
1560 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_rem_buffer()
1562 hmc_index); in ibmvmc_rem_buffer()
1564 hmc_session, hmc_index, buffer_id); in ibmvmc_rem_buffer()
1568 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1569 buffer = ibmvmc_get_free_hmc_buffer(adapter, hmc_index); in ibmvmc_rem_buffer()
1572 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1574 hmc_session, hmc_index, in ibmvmc_rem_buffer()
1588 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1592 hmc_index, buffer_id); in ibmvmc_rem_buffer()
1603 u8 hmc_index; in ibmvmc_recv_msg() local
1618 hmc_index = crq->hmc_index; in ibmvmc_recv_msg()
1622 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_recv_msg()
1624 hmc_index); in ibmvmc_recv_msg()
1626 hmc_session, hmc_index, buffer_id); in ibmvmc_recv_msg()
1634 hmc_session, hmc_index, buffer_id); in ibmvmc_recv_msg()
1638 hmc = &hmcs[hmc_index]; in ibmvmc_recv_msg()
1667 (unsigned int)hmc->queue_head, (unsigned int)hmc_index); in ibmvmc_recv_msg()
1740 unsigned char hmc_index; in ibmvmc_validate_hmc_session() local
1742 hmc_index = crq->hmc_index; in ibmvmc_validate_hmc_session()
1747 if (hmc_index > ibmvmc.max_hmc_index) 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()
1861 unsigned char hmc_index; in ibmvmc_process_open_resp() local
1864 hmc_index = crq->hmc_index; in ibmvmc_process_open_resp()
1865 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_process_open_resp()
1874 ibmvmc_return_hmc(&hmcs[hmc_index], false); in ibmvmc_process_open_resp()
1878 if (hmcs[hmc_index].state == ibmhmc_state_opening) { in ibmvmc_process_open_resp()
1883 hmcs[hmc_index].state = ibmhmc_state_failed; in ibmvmc_process_open_resp()
1885 ibmvmc_free_hmc_buffer(&hmcs[hmc_index], in ibmvmc_process_open_resp()
1886 &hmcs[hmc_index].buffer[buffer_id]); in ibmvmc_process_open_resp()
1887 hmcs[hmc_index].state = ibmhmc_state_ready; in ibmvmc_process_open_resp()
1892 hmcs[hmc_index].state); in ibmvmc_process_open_resp()
1911 unsigned char hmc_index; in ibmvmc_process_close_resp() local
1913 hmc_index = crq->hmc_index; in ibmvmc_process_close_resp()
1914 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_process_close_resp()
1926 ibmvmc_return_hmc(&hmcs[hmc_index], false); in ibmvmc_process_close_resp()