Lines Matching refs:tail
39 __le32 *tail; member
55 u32 tail; in glink_smem_rx_avail() local
71 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_avail()
73 if (head < tail) in glink_smem_rx_avail()
74 return pipe->native.length - tail + head; in glink_smem_rx_avail()
76 return head - tail; in glink_smem_rx_avail()
84 u32 tail; in glink_smem_rx_peak() local
86 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_peak()
87 tail += offset; in glink_smem_rx_peak()
88 if (tail >= pipe->native.length) in glink_smem_rx_peak()
89 tail -= pipe->native.length; in glink_smem_rx_peak()
91 len = min_t(size_t, count, pipe->native.length - tail); in glink_smem_rx_peak()
93 memcpy_fromio(data, pipe->fifo + tail, len); in glink_smem_rx_peak()
103 u32 tail; in glink_smem_rx_advance() local
105 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_advance()
107 tail += count; in glink_smem_rx_advance()
108 if (tail >= pipe->native.length) in glink_smem_rx_advance()
109 tail -= pipe->native.length; in glink_smem_rx_advance()
111 *pipe->tail = cpu_to_le32(tail); in glink_smem_rx_advance()
118 u32 tail; in glink_smem_tx_avail() local
122 tail = le32_to_cpu(*pipe->tail); in glink_smem_tx_avail()
124 if (tail <= head) in glink_smem_tx_avail()
125 avail = pipe->native.length - head + tail; in glink_smem_tx_avail()
127 avail = tail - head; in glink_smem_tx_avail()
247 tx_pipe->tail = &descs[0]; in qcom_glink_smem_register()
249 rx_pipe->tail = &descs[2]; in qcom_glink_smem_register()
276 *rx_pipe->tail = 0; in qcom_glink_smem_register()