Lines Matching refs:tbuf
269 struct n_hdlc_buf *tbuf; in n_hdlc_send_frames() local
283 tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); in n_hdlc_send_frames()
284 while (tbuf) { in n_hdlc_send_frames()
285 pr_debug("sending frame %p, count=%d\n", tbuf, tbuf->count); in n_hdlc_send_frames()
289 actual = tty->ops->write(tty, tbuf->buf, tbuf->count); in n_hdlc_send_frames()
293 n_hdlc_buf_return(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_send_frames()
299 actual = tbuf->count; in n_hdlc_send_frames()
301 if (actual == tbuf->count) { in n_hdlc_send_frames()
302 pr_debug("frame %p completed\n", tbuf); in n_hdlc_send_frames()
305 n_hdlc_buf_put(&n_hdlc->tx_free_buf_list, tbuf); in n_hdlc_send_frames()
311 tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); in n_hdlc_send_frames()
313 pr_debug("frame %p pending\n", tbuf); in n_hdlc_send_frames()
319 n_hdlc_buf_return(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_send_frames()
324 if (!tbuf) in n_hdlc_send_frames()
495 struct n_hdlc_buf *tbuf; in n_hdlc_tty_write() local
514 tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list); in n_hdlc_tty_write()
515 if (tbuf) in n_hdlc_tty_write()
535 memcpy(tbuf->buf, data, count); in n_hdlc_tty_write()
538 tbuf->count = error = count; in n_hdlc_tty_write()
539 n_hdlc_buf_put(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_tty_write()