Lines Matching refs:tbuf
276 struct n_hdlc_buf *tbuf; in n_hdlc_send_frames() local
290 tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); in n_hdlc_send_frames()
291 while (tbuf) { in n_hdlc_send_frames()
292 pr_debug("sending frame %p, count=%d\n", tbuf, tbuf->count); in n_hdlc_send_frames()
296 actual = tty->ops->write(tty, tbuf->buf, tbuf->count); in n_hdlc_send_frames()
300 n_hdlc_buf_return(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_send_frames()
306 actual = tbuf->count; in n_hdlc_send_frames()
308 if (actual == tbuf->count) { in n_hdlc_send_frames()
309 pr_debug("frame %p completed\n", tbuf); in n_hdlc_send_frames()
312 n_hdlc_buf_put(&n_hdlc->tx_free_buf_list, tbuf); in n_hdlc_send_frames()
318 tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); in n_hdlc_send_frames()
320 pr_debug("frame %p pending\n", tbuf); in n_hdlc_send_frames()
326 n_hdlc_buf_return(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_send_frames()
331 if (!tbuf) in n_hdlc_send_frames()
538 struct n_hdlc_buf *tbuf; in n_hdlc_tty_write() local
557 tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list); in n_hdlc_tty_write()
558 if (tbuf) in n_hdlc_tty_write()
578 memcpy(tbuf->buf, data, count); in n_hdlc_tty_write()
581 tbuf->count = error = count; in n_hdlc_tty_write()
582 n_hdlc_buf_put(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_tty_write()