Lines Matching refs:rb
221 struct iucv_tty_buffer *rb; in hvc_iucv_write() local
239 rb = list_first_entry(&priv->tty_inqueue, struct iucv_tty_buffer, list); in hvc_iucv_write()
242 if (!rb->mbuf) { /* message not yet received ... */ in hvc_iucv_write()
245 rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC | GFP_DMA); in hvc_iucv_write()
246 if (!rb->mbuf) in hvc_iucv_write()
249 rc = __iucv_message_receive(priv->path, &rb->msg, 0, in hvc_iucv_write()
250 rb->mbuf, rb->msg.length, NULL); in hvc_iucv_write()
262 if (rc || (rb->mbuf->version != MSG_VERSION) || in hvc_iucv_write()
263 (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) in hvc_iucv_write()
267 switch (rb->mbuf->type) { in hvc_iucv_write()
269 written = min_t(int, rb->mbuf->datalen - rb->offset, count); in hvc_iucv_write()
270 memcpy(buf, rb->mbuf->data + rb->offset, written); in hvc_iucv_write()
271 if (written < (rb->mbuf->datalen - rb->offset)) { in hvc_iucv_write()
272 rb->offset += written; in hvc_iucv_write()
279 if (rb->mbuf->datalen != sizeof(struct winsize)) in hvc_iucv_write()
283 __hvc_resize(priv->hvc, *((struct winsize *) rb->mbuf->data)); in hvc_iucv_write()
293 list_del(&rb->list); in hvc_iucv_write()
294 destroy_tty_buffer(rb); in hvc_iucv_write()
906 struct iucv_tty_buffer *rb; in hvc_iucv_msg_pending() local
923 rb = alloc_tty_buffer(0, GFP_ATOMIC); in hvc_iucv_msg_pending()
924 if (!rb) { in hvc_iucv_msg_pending()
928 rb->msg = *msg; in hvc_iucv_msg_pending()
930 list_add_tail(&rb->list, &priv->tty_inqueue); in hvc_iucv_msg_pending()