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()
1429 u8 hmc_index; in ibmvmc_add_buffer() local
1439 hmc_index = crq->hmc_index; in ibmvmc_add_buffer()
1442 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_add_buffer()
1444 hmc_index); in ibmvmc_add_buffer()
1446 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1454 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1458 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1459 buffer = &hmcs[hmc_index].buffer[buffer_id]; in ibmvmc_add_buffer()
1464 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1466 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1476 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1478 hmc_session, hmc_index, buffer_id); in ibmvmc_add_buffer()
1493 hmc_index, hmc_session, buffer_id, buffer->owner); in ibmvmc_add_buffer()
1497 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1500 hmc_index, buffer_id); in ibmvmc_add_buffer()
1546 u8 hmc_index; in ibmvmc_rem_buffer() local
1556 hmc_index = crq->hmc_index; in ibmvmc_rem_buffer()
1558 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_rem_buffer()
1560 hmc_index); in ibmvmc_rem_buffer()
1562 hmc_session, hmc_index, buffer_id); in ibmvmc_rem_buffer()
1566 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1567 buffer = ibmvmc_get_free_hmc_buffer(adapter, hmc_index); in ibmvmc_rem_buffer()
1570 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1572 hmc_session, hmc_index, in ibmvmc_rem_buffer()
1586 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1590 hmc_index, buffer_id); in ibmvmc_rem_buffer()
1601 u8 hmc_index; in ibmvmc_recv_msg() local
1616 hmc_index = crq->hmc_index; in ibmvmc_recv_msg()
1620 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_recv_msg()
1622 hmc_index); in ibmvmc_recv_msg()
1624 hmc_session, hmc_index, buffer_id); in ibmvmc_recv_msg()
1632 hmc_session, hmc_index, buffer_id); in ibmvmc_recv_msg()
1636 hmc = &hmcs[hmc_index]; in ibmvmc_recv_msg()
1665 (unsigned int)hmc->queue_head, (unsigned int)hmc_index); in ibmvmc_recv_msg()
1738 unsigned char hmc_index; in ibmvmc_validate_hmc_session() local
1740 hmc_index = crq->hmc_index; in ibmvmc_validate_hmc_session()
1745 if (hmc_index > ibmvmc.max_hmc_index) in ibmvmc_validate_hmc_session()
1748 if (hmcs[hmc_index].session != crq->hmc_session) { in ibmvmc_validate_hmc_session()
1750 hmcs[hmc_index].session, crq->hmc_session); in ibmvmc_validate_hmc_session()
1859 unsigned char hmc_index; in ibmvmc_process_open_resp() local
1862 hmc_index = crq->hmc_index; in ibmvmc_process_open_resp()
1863 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_process_open_resp()
1872 ibmvmc_return_hmc(&hmcs[hmc_index], false); in ibmvmc_process_open_resp()
1876 if (hmcs[hmc_index].state == ibmhmc_state_opening) { in ibmvmc_process_open_resp()
1881 hmcs[hmc_index].state = ibmhmc_state_failed; in ibmvmc_process_open_resp()
1883 ibmvmc_free_hmc_buffer(&hmcs[hmc_index], in ibmvmc_process_open_resp()
1884 &hmcs[hmc_index].buffer[buffer_id]); in ibmvmc_process_open_resp()
1885 hmcs[hmc_index].state = ibmhmc_state_ready; in ibmvmc_process_open_resp()
1890 hmcs[hmc_index].state); in ibmvmc_process_open_resp()
1909 unsigned char hmc_index; in ibmvmc_process_close_resp() local
1911 hmc_index = crq->hmc_index; in ibmvmc_process_close_resp()
1912 if (hmc_index > ibmvmc.max_hmc_index) { in ibmvmc_process_close_resp()
1924 ibmvmc_return_hmc(&hmcs[hmc_index], false); in ibmvmc_process_close_resp()