Displaying 20 results from an estimated 111 matches for "port_buff".
Did you mean:
port_buf
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
...oducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to virtio-next.
Regards,
Sjur
Sjur Br?ndeland (2):
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
drivers/char/virtio_console.c | 317 +++++++++++++++++++++++++++------------
include/uapi/linux/virtio_ids.h | 1 +
2 files changed, 221 insertions(+), 97 deletions(-)
--
1.7.5.4
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
...oducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to virtio-next.
Regards,
Sjur
Sjur Br?ndeland (2):
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
drivers/char/virtio_console.c | 317 +++++++++++++++++++++++++++------------
include/uapi/linux/virtio_ids.h | 1 +
2 files changed, 221 insertions(+), 97 deletions(-)
--
1.7.5.4
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
...m.au>
cc: Michael S. Tsirkin <mst at redhat.com>
cc: Amit Shah <amit.shah at redhat.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Masami Hiramatsu <masami.hiramatsu.pt at hitachi.com>
Sjur Br?ndeland (3):
virtio_console:Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
virtio_console: Don't initialize buffers to zero
drivers/char/virtio_console.c | 318 +++++++++++++++++++++++++++++------------
include/linux/virtio_ids.h | 1 +
2 files changed, 228 insertions(+), 91 deletions(-)
--
1.7.5.4
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
...m.au>
cc: Michael S. Tsirkin <mst at redhat.com>
cc: Amit Shah <amit.shah at redhat.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Masami Hiramatsu <masami.hiramatsu.pt at hitachi.com>
Sjur Br?ndeland (3):
virtio_console:Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
virtio_console: Don't initialize buffers to zero
drivers/char/virtio_console.c | 318 +++++++++++++++++++++++++++++------------
include/linux/virtio_ids.h | 1 +
2 files changed, 228 insertions(+), 91 deletions(-)
--
1.7.5.4
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...;
cc: Amit Shah <amit.shah at redhat.com>
cc: Ohad Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Arnd Bergmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if irqs are disabled we queue t...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...;
cc: Amit Shah <amit.shah at redhat.com>
cc: Ohad Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Arnd Bergmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if irqs are disabled we queue t...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
...gt; diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index 468f061..3e56f32 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -422,7 +422,7 @@ static void reclaim_dma_bufs(void)
> }
> }
>
> -static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
> +static struct port_buffer *alloc_buf(struct virtio_device *vdev, size_t buf_size,
> int pages)
> {
> struct port_buffer *buf;
> @@ -445,16 +445,16 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
...gt; diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index 468f061..3e56f32 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -422,7 +422,7 @@ static void reclaim_dma_bufs(void)
> }
> }
>
> -static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
> +static struct port_buffer *alloc_buf(struct virtio_device *vdev, size_t buf_size,
> int pages)
> {
> struct port_buffer *buf;
> @@ -445,16 +445,16 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t...
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
...- Removed extra added lines.
- Removed superfluous checks before calling reclaim_dma_bufs().
- Rusty raised some question regarding garbage collection of the
out-vq, so I moved this into a separate patch.
Thanks,
Sjur
Sjur Br?ndeland (3):
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
virtio_console: Remove buffers from out_vq at port removal
drivers/char/virtio_console.c | 325 +++++++++++++++++++++++++++------------
include/uapi/linux/virtio_ids.h | 1 +
2 files changed, 230 insertions(+), 96 deletions(-)
--
1.7...
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
...- Removed extra added lines.
- Removed superfluous checks before calling reclaim_dma_bufs().
- Rusty raised some question regarding garbage collection of the
out-vq, so I moved this into a separate patch.
Thanks,
Sjur
Sjur Br?ndeland (3):
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
virtio_console: Remove buffers from out_vq at port removal
drivers/char/virtio_console.c | 325 +++++++++++++++++++++++++++------------
include/uapi/linux/virtio_ids.h | 1 +
2 files changed, 230 insertions(+), 96 deletions(-)
--
1.7...
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
..., hopefully all
review comments has been addressed.
The fist patch is a bugfix and migth be applicable for 3.7.
Thanks,
Sjur
Sjur Br?ndeland (4):
virtio_console: Free buffer if splice fails
virtio_console: Use kmalloc instead of kzalloc
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
drivers/char/virtio_console.c | 328 +++++++++++++++++++++++++++++------------
include/linux/virtio_ids.h | 1 +
2 files changed, 234 insertions(+), 95 deletions(-)
--
1.7.5.4
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
..., hopefully all
review comments has been addressed.
The fist patch is a bugfix and migth be applicable for 3.7.
Thanks,
Sjur
Sjur Br?ndeland (4):
virtio_console: Free buffer if splice fails
virtio_console: Use kmalloc instead of kzalloc
virtio_console: Merge struct buffer_token into struct port_buffer
virtio_console: Add support for remoteproc serial
drivers/char/virtio_console.c | 328 +++++++++++++++++++++++++++++------------
include/linux/virtio_ids.h | 1 +
2 files changed, 234 insertions(+), 95 deletions(-)
--
1.7.5.4
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
....c b/drivers/char/virtio_console.c
index fbeb71953526..5fbf2ac73111 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1506,15 +1506,25 @@ static void remove_port(struct kref *kref)
kfree(port);
}
+static void remove_unused_bufs(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_port_data(struct port *port)
{
spin_lock_irq(&port->inbuf_lock);
/* Remove unused data this port might have received. */
discard_port_data(port);
+ remove_unused_bufs(port->...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
....c b/drivers/char/virtio_console.c
index fbeb71953526..5fbf2ac73111 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1506,15 +1506,25 @@ static void remove_port(struct kref *kref)
kfree(port);
}
+static void remove_unused_bufs(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_port_data(struct port *port)
{
spin_lock_irq(&port->inbuf_lock);
/* Remove unused data this port might have received. */
discard_port_data(port);
+ remove_unused_bufs(port->...
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq.
Works by sheer luck, and is explicitly forbidden by spec. And while
going over it I saw that error handling is also broken -
failure is easy to trigger if I force allocations to fail.
Lightly tested.
Michael S. Tsirkin (6):
virtio_console: don't tie bufs to a vq
virtio: add ability to iterate over vqs
virtio_console:
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq.
Works by sheer luck, and is explicitly forbidden by spec. And while
going over it I saw that error handling is also broken -
failure is easy to trigger if I force allocations to fail.
Lightly tested.
Michael S. Tsirkin (6):
virtio_console: don't tie bufs to a vq
virtio: add ability to iterate over vqs
virtio_console:
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...+#include <linux/dma-mapping.h>
#include "../tty/hvc/hvc_console.h"
/*
@@ -334,20 +335,60 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+/* Allcoate data buffer from DMA memory if requested */
+static inline void *
+alloc_databuf(struct virtio_device *vdev, size_t size, dma_addr_t *dma_handle,
+ gfp_t flag)
{
- kfree(buf->buf);
+#ifdef CONFIG_HAS_DMA
+ if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) {
+ str...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...+#include <linux/dma-mapping.h>
#include "../tty/hvc/hvc_console.h"
/*
@@ -334,20 +335,60 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+/* Allcoate data buffer from DMA memory if requested */
+static inline void *
+alloc_databuf(struct virtio_device *vdev, size_t size, dma_addr_t *dma_handle,
+ gfp_t flag)
{
- kfree(buf->buf);
+#ifdef CONFIG_HAS_DMA
+ if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) {
+ str...
2018 Apr 20
0
[PATCH 1/6] virtio_console: don't tie bufs to a vq
...e changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 468f061..3e56f32 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -422,7 +422,7 @@ static void reclaim_dma_bufs(void)
}
}
-static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
+static struct port_buffer *alloc_buf(struct virtio_device *vdev, size_t buf_size,
int pages)
{
struct port_buffer *buf;
@@ -445,16 +445,16 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
return buf;...
2018 Apr 20
0
[PATCH 3/6] virtio_console: free buffers after reset
...ivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 3e56f32..26a66ff 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1402,7 +1402,6 @@ static int add_port(struct ports_device *portdev, u32 id)
{
char debugfs_name[16];
struct port *port;
- struct port_buffer *buf;
dev_t devt;
unsigned int nr_added_bufs;
int err;
@@ -1513,8 +1512,6 @@ static int add_port(struct ports_device *portdev, u32 id)
return 0;
free_inbufs:
- while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf, true);
free_device:
device_destroy(pdrvdata.cl...