Lines Matching refs:msg_rx_ring

184 	struct rio_msg_rx_ring msg_rx_ring;  member
272 port->inb_msg[0].mcback(port, rmu->msg_rx_ring.dev_id, in fsl_rio_rx_handler()
865 rmu->msg_rx_ring.dev_id = dev_id; in fsl_open_inb_mbox()
866 rmu->msg_rx_ring.size = entries; in fsl_open_inb_mbox()
867 rmu->msg_rx_ring.rx_slot = 0; in fsl_open_inb_mbox()
868 for (i = 0; i < rmu->msg_rx_ring.size; i++) in fsl_open_inb_mbox()
869 rmu->msg_rx_ring.virt_buffer[i] = NULL; in fsl_open_inb_mbox()
872 rmu->msg_rx_ring.virt = dma_alloc_coherent(priv->dev, in fsl_open_inb_mbox()
873 rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, in fsl_open_inb_mbox()
874 &rmu->msg_rx_ring.phys, GFP_KERNEL); in fsl_open_inb_mbox()
875 if (!rmu->msg_rx_ring.virt) { in fsl_open_inb_mbox()
881 out_be32(&rmu->msg_regs->ifqdpar, (u32) rmu->msg_rx_ring.phys); in fsl_open_inb_mbox()
882 out_be32(&rmu->msg_regs->ifqepar, (u32) rmu->msg_rx_ring.phys); in fsl_open_inb_mbox()
892 rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, in fsl_open_inb_mbox()
893 rmu->msg_rx_ring.virt, rmu->msg_rx_ring.phys); in fsl_open_inb_mbox()
933 dma_free_coherent(priv->dev, rmu->msg_rx_ring.size * RIO_MAX_MSG_SIZE, in fsl_close_inb_mbox()
934 rmu->msg_rx_ring.virt, rmu->msg_rx_ring.phys); in fsl_close_inb_mbox()
955 rmu->msg_rx_ring.rx_slot); in fsl_add_inb_buffer()
957 if (rmu->msg_rx_ring.virt_buffer[rmu->msg_rx_ring.rx_slot]) { in fsl_add_inb_buffer()
960 rmu->msg_rx_ring.rx_slot); in fsl_add_inb_buffer()
965 rmu->msg_rx_ring.virt_buffer[rmu->msg_rx_ring.rx_slot] = buf; in fsl_add_inb_buffer()
966 if (++rmu->msg_rx_ring.rx_slot == rmu->msg_rx_ring.size) in fsl_add_inb_buffer()
967 rmu->msg_rx_ring.rx_slot = 0; in fsl_add_inb_buffer()
995 virt_buf = rmu->msg_rx_ring.virt + (phys_buf in fsl_get_inb_message()
996 - rmu->msg_rx_ring.phys); in fsl_get_inb_message()
997 buf_idx = (phys_buf - rmu->msg_rx_ring.phys) / RIO_MAX_MSG_SIZE; in fsl_get_inb_message()
998 buf = rmu->msg_rx_ring.virt_buffer[buf_idx]; in fsl_get_inb_message()
1010 rmu->msg_rx_ring.virt_buffer[buf_idx] = NULL; in fsl_get_inb_message()