Lines Matching refs:cb
107 struct cmdbuf_t *cb, *tcb; in send_cb() local
113 cb = cs->cmdbuf; in send_cb()
114 if (!cb) in send_cb()
117 if (cb->len) { in send_cb()
119 sent = tty->ops->write(tty, cb->buf + cb->offset, cb->len); in send_cb()
126 cb->offset += sent; in send_cb()
127 cb->len -= sent; in send_cb()
129 sent, cb->len, cs->cmdbytes); in send_cb()
132 while (cb && !cb->len) { in send_cb()
135 tcb = cb; in send_cb()
136 cs->cmdbuf = cb = cb->next; in send_cb()
137 if (cb) { in send_cb()
138 cb->prev = NULL; in send_cb()
139 cs->curlen = cb->len; in send_cb()
206 struct cmdbuf_t *cb; in flush_send_queue() local
211 while ((cb = cs->cmdbuf) != NULL) { in flush_send_queue()
212 cs->cmdbuf = cb->next; in flush_send_queue()
213 if (cb->wake_tasklet) in flush_send_queue()
214 tasklet_schedule(cb->wake_tasklet); in flush_send_queue()
215 kfree(cb); in flush_send_queue()
242 static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) in gigaset_write_cmd() argument
248 "CMD Transmit", cb->len, cb->buf); in gigaset_write_cmd()
251 cb->prev = cs->lastcmdbuf; in gigaset_write_cmd()
253 cs->lastcmdbuf->next = cb; in gigaset_write_cmd()
255 cs->cmdbuf = cb; in gigaset_write_cmd()
256 cs->curlen = cb->len; in gigaset_write_cmd()
258 cs->cmdbytes += cb->len; in gigaset_write_cmd()
259 cs->lastcmdbuf = cb; in gigaset_write_cmd()
266 return cb->len; in gigaset_write_cmd()