Lines Matching refs:tail
729 if (!CIRC_SPACE(ring->head, ring->tail, ATMEL_SERIAL_RINGSIZE))
833 atmel_uart_write_char(port, xmit->buf[xmit->tail]);
834 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
871 xmit->tail += atmel_port->tx_len;
872 xmit->tail &= UART_XMIT_SIZE - 1;
887 * xmit->tail to the end of xmit->buf, now we have to transmit the
950 xmit->tail,
965 phys_addr = sg_dma_address(sg_tx) + xmit->tail;
982 * xmit->tail correctly
1139 * ring->tail points to the beginning of data to be read by the
1151 * However ring->tail must always points inside the dma buffer:
1152 * 0 <= ring->tail <= sg_dma_len(&atmel_port->sg_rx) - 1
1155 * where head is lower than tail. In such a case, we first read from
1156 * tail to the end of the buffer then reset tail.
1158 if (ring->head < ring->tail) {
1159 count = sg_dma_len(&atmel_port->sg_rx) - ring->tail;
1161 tty_insert_flip_string(tport, ring->buf + ring->tail, count);
1162 ring->tail = 0;
1166 /* Finally we read data from tail to head */
1167 if (ring->tail < ring->head) {
1168 count = ring->head - ring->tail;
1170 tty_insert_flip_string(tport, ring->buf + ring->tail, count);
1174 ring->tail = ring->head;
1474 xmit->tail += pdc->ofs;
1475 xmit->tail &= UART_XMIT_SIZE - 1;
1491 count = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
1495 pdc->dma_addr + xmit->tail);
1537 while (ring->head != ring->tail) {
1543 c = ((struct atmel_uart_char *)ring->buf)[ring->tail];
1545 ring->tail = (ring->tail + 1) & (ATMEL_SERIAL_RINGSIZE - 1);
1621 unsigned int tail;
1630 tail = pdc->ofs;
1644 if (likely(head != tail)) {
1651 * explicitly set tail to 0. So head will
1652 * always be greater than tail.
1654 count = head - tail;
2096 atmel_port->rx_ring.tail = 0;