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