Displaying 20 results from an estimated 53 matches for "remove_port".
Did you mean:
remote_port
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
...: console: Check if portdev is valid in send_control_msg()
virtio: console: Unblock reads on chardev close
virtio: console: Unblock poll on port hot-unplug
virtio: console: Make read() return -ENODEV on hot-unplug
virtio: console: Make write() return -ENODEV on hot-unplug
virtio: console: remove_port() should return void
virtio: console: open: Use a common path for error handling
virtio: console: Add a list of portdevs that are active
virtio: console: Add a find_port_by_devt() function
virtio: console: Use cdev_alloc() instead of cdev_init()
virtio: console: Add reference counting for...
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
...: console: Check if portdev is valid in send_control_msg()
virtio: console: Unblock reads on chardev close
virtio: console: Unblock poll on port hot-unplug
virtio: console: Make read() return -ENODEV on hot-unplug
virtio: console: Make write() return -ENODEV on hot-unplug
virtio: console: remove_port() should return void
virtio: console: open: Use a common path for error handling
virtio: console: Add a list of portdevs that are active
virtio: console: Add a find_port_by_devt() function
virtio: console: Use cdev_alloc() instead of cdev_init()
virtio: console: Add reference counting for...
2013 Jul 19
1
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...Amit Shah wrote:
>
>>> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
>>> index b04ec95..6bf0df3 100644
>>> --- a/drivers/char/virtio_console.c
>>> +++ b/drivers/char/virtio_console.c
>>> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref)
>>>
>>> port = container_of(kref, struct port, kref);
>>>
>>> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
>>> - device_destroy(pdrvdata.class, port->dev->devt);
>>> - cdev_del(port-...
2013 Jul 19
1
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...Amit Shah wrote:
>
>>> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
>>> index b04ec95..6bf0df3 100644
>>> --- a/drivers/char/virtio_console.c
>>> +++ b/drivers/char/virtio_console.c
>>> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref)
>>>
>>> port = container_of(kref, struct port, kref);
>>>
>>> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
>>> - device_destroy(pdrvdata.class, port->dev->devt);
>>> - cdev_del(port-...
2013 Jul 19
2
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...---
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index b04ec95..6bf0df3 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref)
>
> port = container_of(kref, struct port, kref);
>
> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
> - device_destroy(pdrvdata.class, port->dev->devt);
> - cdev_del(port->cdev);
> -
> - kfree(port->name);
&...
2013 Jul 19
2
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...---
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index b04ec95..6bf0df3 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref)
>
> port = container_of(kref, struct port, kref);
>
> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
> - device_destroy(pdrvdata.class, port->dev->devt);
> - cdev_del(port->cdev);
> -
> - kfree(port->name);
&...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...ole.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.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);...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...ole.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.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);...
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
Hey Rusty,
Here are a few fixes for virtio and virtio_console.
The first patch ensures the data elements of vqs are properly
initialised at allocation-time so that we don't trigger BUG_ONs. I found
this when hot-unplugging ports and there was just one unused buffer.
detach_unused_buffers() kept returning pointers that were invalid. I
didn't catch this earlier as I had the in_vq filled
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
Hey Rusty,
Here are a few fixes for virtio and virtio_console.
The first patch ensures the data elements of vqs are properly
initialised at allocation-time so that we don't trigger BUG_ONs. I found
this when hot-unplugging ports and there was just one unused buffer.
detach_unused_buffers() kept returning pointers that were invalid. I
didn't catch this earlier as I had the in_vq filled
2013 Jul 19
0
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
.../19/2013 04:16 AM, Amit Shah wrote:
> > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> > index b04ec95..6bf0df3 100644
> > --- a/drivers/char/virtio_console.c
> > +++ b/drivers/char/virtio_console.c
> > @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref)
> >
> > port = container_of(kref, struct port, kref);
> >
> > - sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
> > - device_destroy(pdrvdata.class, port->dev->devt);
> > - cdev_del(port->cdev);
> &g...
2010 May 27
3
[PATCH 1/2] virtio: console: Fix crash when hot-unplugging a port and read is blocked
...ar/virtio_console.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 8c99bf1..e3fb529 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1099,6 +1099,13 @@ static int remove_port(struct port *port)
{
struct port_buffer *buf;
+ if (port->guest_connected) {
+ port->guest_connected = false;
+ port->host_connected = false;
+ wake_up_interruptible(&port->waitqueue);
+ send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);
+ }
+
spin_lock_irq(&port-&g...
2010 May 27
3
[PATCH 1/2] virtio: console: Fix crash when hot-unplugging a port and read is blocked
...ar/virtio_console.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 8c99bf1..e3fb529 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1099,6 +1099,13 @@ static int remove_port(struct port *port)
{
struct port_buffer *buf;
+ if (port->guest_connected) {
+ port->guest_connected = false;
+ port->host_connected = false;
+ wake_up_interruptible(&port->waitqueue);
+ send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);
+ }
+
spin_lock_irq(&port-&g...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...3 deletions(-)
> >
> > diff --git a/drivers/char/virtio_console.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)))
> > +...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...3 deletions(-)
> >
> > diff --git a/drivers/char/virtio_console.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)))
> > +...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...ile changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index 7270e7b69262..e8be82f1bae9 100644
> --- a/drivers/char/virtio_console.c
> +++ 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(struc...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...ile changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index 7270e7b69262..e8be82f1bae9 100644
> --- a/drivers/char/virtio_console.c
> +++ 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(struc...
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
2019 Mar 04
0
[PATCH] virtio_console: free unused buffers with virtio port
...ile changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/virtio_console.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(struc...
2019 Mar 11
0
[PATCH] virtio_console: free unused buffers with virtio port
...ile changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/virtio_console.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(struc...