Lines Matching refs:hmcs
47 static struct ibmvmc_hmc hmcs[MAX_HMCS]; variable
333 buffer = hmcs[hmc_index].buffer; in ibmvmc_get_valid_hmc_buffer()
369 buffer = hmcs[hmc_index].buffer; in ibmvmc_get_free_hmc_buffer()
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()
453 spin_lock_irqsave(&hmcs[i].lock, flags); in ibmvmc_get_free_hmc()
454 if (hmcs[i].state == ibmhmc_state_free) { in ibmvmc_get_free_hmc()
455 hmcs[i].index = i; in ibmvmc_get_free_hmc()
456 hmcs[i].state = ibmhmc_state_initial; in ibmvmc_get_free_hmc()
457 spin_unlock_irqrestore(&hmcs[i].lock, flags); in ibmvmc_get_free_hmc()
458 return &hmcs[i]; in ibmvmc_get_free_hmc()
460 spin_unlock_irqrestore(&hmcs[i].lock, flags); in ibmvmc_get_free_hmc()
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()
1478 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1499 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_add_buffer()
1568 spin_lock_irqsave(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1572 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1588 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags); in ibmvmc_rem_buffer()
1638 hmc = &hmcs[hmc_index]; in ibmvmc_recv_msg()
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()
1776 ibmvmc_return_hmc(&hmcs[i], xport_event); in ibmvmc_reset()
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()
1926 ibmvmc_return_hmc(&hmcs[hmc_index], false); in ibmvmc_process_close_resp()
2366 memset(hmcs, 0, sizeof(struct ibmvmc_hmc) * MAX_HMCS); in ibmvmc_module_init()
2368 spin_lock_init(&hmcs[i].lock); in ibmvmc_module_init()
2369 hmcs[i].state = ibmhmc_state_free; in ibmvmc_module_init()
2371 hmcs[i].queue_outbound_msgs[j] = VMC_INVALID_BUFFER_ID; in ibmvmc_module_init()