Lines Matching refs:rb
222 struct iucv_tty_buffer *rb; in hvc_iucv_write() local
240 rb = list_first_entry(&priv->tty_inqueue, struct iucv_tty_buffer, list); in hvc_iucv_write()
243 if (!rb->mbuf) { /* message not yet received ... */ in hvc_iucv_write()
246 rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC | GFP_DMA); in hvc_iucv_write()
247 if (!rb->mbuf) in hvc_iucv_write()
250 rc = __iucv_message_receive(priv->path, &rb->msg, 0, in hvc_iucv_write()
251 rb->mbuf, rb->msg.length, NULL); in hvc_iucv_write()
263 if (rc || (rb->mbuf->version != MSG_VERSION) || in hvc_iucv_write()
264 (rb->msg.length != MSG_SIZE(rb->mbuf->datalen))) in hvc_iucv_write()
268 switch (rb->mbuf->type) { in hvc_iucv_write()
270 written = min_t(int, rb->mbuf->datalen - rb->offset, count); in hvc_iucv_write()
271 memcpy(buf, rb->mbuf->data + rb->offset, written); in hvc_iucv_write()
272 if (written < (rb->mbuf->datalen - rb->offset)) { in hvc_iucv_write()
273 rb->offset += written; in hvc_iucv_write()
280 if (rb->mbuf->datalen != sizeof(struct winsize)) in hvc_iucv_write()
284 __hvc_resize(priv->hvc, *((struct winsize *) rb->mbuf->data)); in hvc_iucv_write()
294 list_del(&rb->list); in hvc_iucv_write()
295 destroy_tty_buffer(rb); in hvc_iucv_write()
907 struct iucv_tty_buffer *rb; in hvc_iucv_msg_pending() local
924 rb = alloc_tty_buffer(0, GFP_ATOMIC); in hvc_iucv_msg_pending()
925 if (!rb) { in hvc_iucv_msg_pending()
929 rb->msg = *msg; in hvc_iucv_msg_pending()
931 list_add_tail(&rb->list, &priv->tty_inqueue); in hvc_iucv_msg_pending()