Lines Matching refs:mbuf
88 struct iucv_tty_msg *mbuf; /* buffer to store input/output data */ member
163 bufp->mbuf = kmalloc(bufp->msg.length, flags | GFP_DMA); in alloc_tty_buffer()
164 if (!bufp->mbuf) { in alloc_tty_buffer()
168 bufp->mbuf->version = MSG_VERSION; in alloc_tty_buffer()
169 bufp->mbuf->type = MSG_TYPE_DATA; in alloc_tty_buffer()
170 bufp->mbuf->datalen = (u16) size; in alloc_tty_buffer()
181 kfree(bufp->mbuf); in destroy_tty_buffer()
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()
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()
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()
409 memcpy(sb->mbuf->data, priv->sndbuf, priv->sndbuf_len); in hvc_iucv_send()
410 sb->mbuf->datalen = (u16) priv->sndbuf_len; in hvc_iucv_send()
411 sb->msg.length = MSG_SIZE(sb->mbuf->datalen); in hvc_iucv_send()
416 (void *) sb->mbuf, sb->msg.length); in hvc_iucv_send()