Lines Matching refs:mbuf

87 	struct iucv_tty_msg	*mbuf;	/* buffer to store input/output data */  member
162 bufp->mbuf = kmalloc(bufp->msg.length, flags | GFP_DMA); in alloc_tty_buffer()
163 if (!bufp->mbuf) { in alloc_tty_buffer()
167 bufp->mbuf->version = MSG_VERSION; in alloc_tty_buffer()
168 bufp->mbuf->type = MSG_TYPE_DATA; in alloc_tty_buffer()
169 bufp->mbuf->datalen = (u16) size; in alloc_tty_buffer()
180 kfree(bufp->mbuf); in destroy_tty_buffer()
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()
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()
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()
408 memcpy(sb->mbuf->data, priv->sndbuf, priv->sndbuf_len); in hvc_iucv_send()
409 sb->mbuf->datalen = (u16) priv->sndbuf_len; in hvc_iucv_send()
410 sb->msg.length = MSG_SIZE(sb->mbuf->datalen); in hvc_iucv_send()
415 (void *) sb->mbuf, sb->msg.length); in hvc_iucv_send()