Lines Matching refs:cb
108 struct cmdbuf_t *cb, *tcb; in send_cb() local
115 cb = cs->cmdbuf; in send_cb()
116 if (!cb) in send_cb()
119 if (cb->len) { in send_cb()
121 sent = tty->ops->write(tty, cb->buf + cb->offset, cb->len); in send_cb()
128 cb->offset += sent; in send_cb()
129 cb->len -= sent; in send_cb()
131 sent, cb->len, cs->cmdbytes); in send_cb()
134 while (cb && !cb->len) { in send_cb()
137 tcb = cb; in send_cb()
138 cs->cmdbuf = cb = cb->next; in send_cb()
139 if (cb) { in send_cb()
140 cb->prev = NULL; in send_cb()
141 cs->curlen = cb->len; in send_cb()
208 struct cmdbuf_t *cb; in flush_send_queue() local
213 while ((cb = cs->cmdbuf) != NULL) { in flush_send_queue()
214 cs->cmdbuf = cb->next; in flush_send_queue()
215 if (cb->wake_tasklet) in flush_send_queue()
216 tasklet_schedule(cb->wake_tasklet); in flush_send_queue()
217 kfree(cb); in flush_send_queue()
244 static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) in gigaset_write_cmd() argument
250 "CMD Transmit", cb->len, cb->buf); in gigaset_write_cmd()
253 cb->prev = cs->lastcmdbuf; in gigaset_write_cmd()
255 cs->lastcmdbuf->next = cb; in gigaset_write_cmd()
257 cs->cmdbuf = cb; in gigaset_write_cmd()
258 cs->curlen = cb->len; in gigaset_write_cmd()
260 cs->cmdbytes += cb->len; in gigaset_write_cmd()
261 cs->lastcmdbuf = cb; in gigaset_write_cmd()
268 return cb->len; in gigaset_write_cmd()