Lines Matching refs:hmc_index

319  * @hmc_index:	HMC Index Field
324 static struct ibmvmc_buffer *ibmvmc_get_valid_hmc_buffer(u8 hmc_index)
330 if (hmc_index > ibmvmc.max_hmc_index)
333 buffer = hmcs[hmc_index].buffer;
351 * @hmc_index: Hmc Index field
357 u8 hmc_index)
363 if (hmc_index > ibmvmc.max_hmc_index) {
364 dev_info(adapter->dev, "get_free_hmc_buffer: invalid hmc_index=0x%x\n",
365 hmc_index);
369 buffer = hmcs[hmc_index].buffer;
403 * @hmc_index: HMC Index field
408 static void ibmvmc_count_hmc_buffers(u8 hmc_index, unsigned int *valid,
415 if (hmc_index > ibmvmc.max_hmc_index)
423 buffer = hmcs[hmc_index].buffer;
424 spin_lock_irqsave(&hmcs[hmc_index].lock, flags);
434 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
580 crq_msg.hmc_index = hmc->index;
624 crq_msg.hmc_index = hmc->index;
682 * @hmc_index: HMC Index field
694 u8 hmc_index, u16 buffer_id)
705 crq_msg.hmc_index = hmc_index;
722 * @hmc_index: HMC Index field
735 u8 hmc_index, u16 buffer_id)
746 crq_msg.hmc_index = hmc_index;
802 crq_msg.hmc_index = hmc->index;
1431 u8 hmc_index;
1441 hmc_index = crq->hmc_index;
1444 if (hmc_index > ibmvmc.max_hmc_index) {
1445 dev_err(adapter->dev, "add_buffer: invalid hmc_index = 0x%x\n",
1446 hmc_index);
1448 hmc_session, hmc_index, buffer_id);
1456 hmc_session, hmc_index, buffer_id);
1460 spin_lock_irqsave(&hmcs[hmc_index].lock, flags);
1461 buffer = &hmcs[hmc_index].buffer[buffer_id];
1466 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
1468 hmc_session, hmc_index, buffer_id);
1478 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
1480 hmc_session, hmc_index, buffer_id);
1495 hmc_index, hmc_session, buffer_id, buffer->owner);
1499 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
1502 hmc_index, buffer_id);
1548 u8 hmc_index;
1558 hmc_index = crq->hmc_index;
1560 if (hmc_index > ibmvmc.max_hmc_index) {
1561 dev_warn(adapter->dev, "rem_buffer: invalid hmc_index = 0x%x\n",
1562 hmc_index);
1564 hmc_session, hmc_index, buffer_id);
1568 spin_lock_irqsave(&hmcs[hmc_index].lock, flags);
1569 buffer = ibmvmc_get_free_hmc_buffer(adapter, hmc_index);
1572 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
1574 hmc_session, hmc_index,
1588 spin_unlock_irqrestore(&hmcs[hmc_index].lock, flags);
1592 hmc_index, buffer_id);
1603 u8 hmc_index;
1618 hmc_index = crq->hmc_index;
1622 if (hmc_index > ibmvmc.max_hmc_index) {
1623 dev_err(adapter->dev, "Recv_msg: invalid hmc_index = 0x%x\n",
1624 hmc_index);
1626 hmc_session, hmc_index, buffer_id);
1634 hmc_session, hmc_index, buffer_id);
1638 hmc = &hmcs[hmc_index];
1667 (unsigned int)hmc->queue_head, (unsigned int)hmc_index);
1740 unsigned char hmc_index;
1742 hmc_index = crq->hmc_index;
1747 if (hmc_index > ibmvmc.max_hmc_index)
1750 if (hmcs[hmc_index].session != crq->hmc_session) {
1752 hmcs[hmc_index].session, crq->hmc_session);
1861 unsigned char hmc_index;
1864 hmc_index = crq->hmc_index;
1865 if (hmc_index > ibmvmc.max_hmc_index) {
1874 ibmvmc_return_hmc(&hmcs[hmc_index], false);
1878 if (hmcs[hmc_index].state == ibmhmc_state_opening) {
1883 hmcs[hmc_index].state = ibmhmc_state_failed;
1885 ibmvmc_free_hmc_buffer(&hmcs[hmc_index],
1886 &hmcs[hmc_index].buffer[buffer_id]);
1887 hmcs[hmc_index].state = ibmhmc_state_ready;
1892 hmcs[hmc_index].state);
1911 unsigned char hmc_index;
1913 hmc_index = crq->hmc_index;
1914 if (hmc_index > ibmvmc.max_hmc_index) {
1926 ibmvmc_return_hmc(&hmcs[hmc_index], false);