search for: remove_port_data

Displaying 20 results from an estimated 65 matches for "remove_port_data".

2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...121 at ./include/linux/dma-mapping.h:433 free_buf+0x1a8/0x288 Call Trace: [<8040c538>] show_stack+0x74/0xc0 [<80757240>] dump_stack+0xd0/0x110 [<80430d98>] __warn+0xfc/0x130 [<80430ee0>] warn_slowpath_null+0x2c/0x3c [<807e7c6c>] free_buf+0x1a8/0x288 [<807ea590>] remove_port_data+0x50/0xac [<807ea6a0>] unplug_port+0xb4/0x1bc [<807ea858>] virtcons_remove+0xb0/0xfc [<807b6734>] virtio_dev_remove+0x58/0xc0 [<807f918c>] __device_release_driver+0xac/0x134 [<807f924c>] device_release_driver+0x38/0x50 [<807f7edc>] bus_remove_device+0xfc/0x130 [&...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...121 at ./include/linux/dma-mapping.h:433 free_buf+0x1a8/0x288 Call Trace: [<8040c538>] show_stack+0x74/0xc0 [<80757240>] dump_stack+0xd0/0x110 [<80430d98>] __warn+0xfc/0x130 [<80430ee0>] warn_slowpath_null+0x2c/0x3c [<807e7c6c>] free_buf+0x1a8/0x288 [<807ea590>] remove_port_data+0x50/0xac [<807ea6a0>] unplug_port+0xb4/0x1bc [<807ea858>] virtcons_remove+0xb0/0xfc [<807b6734>] virtio_dev_remove+0x58/0xc0 [<807f918c>] __device_release_driver+0xac/0x134 [<807f924c>] device_release_driver+0x38/0x50 [<807f7edc>] bus_remove_device+0xfc/0x130 [&...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...++ 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->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_bu...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...++ 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->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_bu...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio 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->in_vq); > > spin_unlock_ir...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio 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->in_vq); > > spin_unlock_ir...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...tatic 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->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&por...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...tatic 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->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&por...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
.../* This is the very early arch-specified put chars function. */ static int (*early_put_chars)(u32, const char *, int); +static void remove_vq(struct virtqueue *vq); static struct port *find_port_by_vtermno(u32 vtermno) { @@ -1550,6 +1551,9 @@ static void unplug_port(struct port *port) } remove_port_data(port); + spin_lock_irq(&port->inbuf_lock); + remove_vq(port->in_vq); + spin_unlock_irq(&port->inbuf_lock); /* * We should just assume the device itself has gone off -- @@ -1945,17 +1949,22 @@ static const struct file_operations portdev_fops = { .owner = THIS_MODULE, };...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
.../* This is the very early arch-specified put chars function. */ static int (*early_put_chars)(u32, const char *, int); +static void remove_vq(struct virtqueue *vq); static struct port *find_port_by_vtermno(u32 vtermno) { @@ -1550,6 +1551,9 @@ static void unplug_port(struct port *port) } remove_port_data(port); + spin_lock_irq(&port->inbuf_lock); + remove_vq(port->in_vq); + spin_unlock_irq(&port->inbuf_lock); /* * We should just assume the device itself has gone off -- @@ -1945,17 +1949,22 @@ static const struct file_operations portdev_fops = { .owner = THIS_MODULE, };...
2019 Aug 09
5
[PATCH v3 0/2] virtio_console: fix replug of virtio console port
This patch series fixes the issue with unplug/replug of a port in virtio console driver which fails with an error "Error allocating inbufs\n". Patch 1 makes use of 'virtqueue_detach_unused_buf' function to detach the unused buffers during port hotunplug time. Patch 2 updates the next avail index for packed ring code. Tested the packed ring code with the qemu virtio 1.1 device
2016 Oct 25
0
[PATCH] virtio: console: Unlock vqs while freeing buffers
...3 > free_buf+0x1a8/0x288 > Call Trace: > [<8040c538>] show_stack+0x74/0xc0 > [<80757240>] dump_stack+0xd0/0x110 > [<80430d98>] __warn+0xfc/0x130 > [<80430ee0>] warn_slowpath_null+0x2c/0x3c > [<807e7c6c>] free_buf+0x1a8/0x288 > [<807ea590>] remove_port_data+0x50/0xac > [<807ea6a0>] unplug_port+0xb4/0x1bc > [<807ea858>] virtcons_remove+0xb0/0xfc > [<807b6734>] virtio_dev_remove+0x58/0xc0 > [<807f918c>] __device_release_driver+0xac/0x134 > [<807f924c>] device_release_driver+0x38/0x50 > [<807f7edc>] b...
2019 Mar 04
0
[PATCH] virtio_console: free unused buffers with virtio port
...tatic 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->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&por...
2019 Mar 11
0
[PATCH] virtio_console: free unused buffers with virtio port
...tatic 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->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&por...
2019 May 05
0
[PATCH] virtio_console: remove vq buf while unpluging port
.../* This is the very early arch-specified put chars function. */ static int (*early_put_chars)(u32, const char *, int); +static void remove_vq(struct virtqueue *vq); static struct port *find_port_by_vtermno(u32 vtermno) { @@ -1550,6 +1551,9 @@ static void unplug_port(struct port *port) } remove_port_data(port); + spin_lock_irq(&port->inbuf_lock); + remove_vq(port->in_vq); + spin_unlock_irq(&port->inbuf_lock); /* * We should just assume the device itself has gone off -- @@ -1945,17 +1949,22 @@ static const struct file_operations portdev_fops = { .owner = THIS_MODULE, };...
2019 May 24
0
[PATCH] virtio_console: remove vq buf while unpluging port
...chars function. */ > static int (*early_put_chars)(u32, const char *, int); > +static void remove_vq(struct virtqueue *vq); > > static struct port *find_port_by_vtermno(u32 vtermno) > { > @@ -1550,6 +1551,9 @@ static void unplug_port(struct port *port) > } > > remove_port_data(port); > + spin_lock_irq(&port->inbuf_lock); > + remove_vq(port->in_vq); > + spin_unlock_irq(&port->inbuf_lock); > > /* > * We should just assume the device itself has gone off -- > @@ -1945,17 +1949,22 @@ static const struct file_operations portdev_fops...
2019 Aug 08
0
[PATCH v2 1/2] virtio_console: free unused buffers with port delete
...++ b/drivers/char/virtio_console.c @@ -1494,15 +1494,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->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_bu...
2019 Aug 09
0
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...++ b/drivers/char/virtio_console.c @@ -1494,15 +1494,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->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_bu...
2012 Nov 08
1
[[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
...rs/char/virtio_console.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 9ebadcb..5ff3b3e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1521,6 +1521,10 @@ static void remove_port_data(struct port *port) /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) free_buf(buf, true); + + /* Remove buffers we queued up for the Host to consume */ + while ((buf = virtqueue_detach_unused_buf(port->out_vq)))...
2012 Nov 08
1
[[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
...rs/char/virtio_console.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 9ebadcb..5ff3b3e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1521,6 +1521,10 @@ static void remove_port_data(struct port *port) /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) free_buf(buf, true); + + /* Remove buffers we queued up for the Host to consume */ + while ((buf = virtqueue_detach_unused_buf(port->out_vq)))...