Displaying 20 results from an estimated 32 matches for "flush_bufs".
2018 Apr 20
0
[PATCH 3/6] virtio_console: free buffers after reset
...virtqueue_detach_unused_buf(port->out_vq);
- spin_unlock_irq(&port->outvq_lock);
- if (buf)
- free_buf(buf, true);
- } while (buf);
}
/*
@@ -1791,13 +1768,24 @@ static void control_work_handler(struct work_struct *work)
spin_unlock(&portdev->c_ivq_lock);
}
+static void flush_bufs(struct virtqueue *vq, bool can_sleep)
+{
+ struct port_buffer *buf;
+ unsigned int len;
+
+ while ((buf = virtqueue_get_buf(vq, &len)))
+ free_buf(buf, can_sleep);
+}
+
static void out_intr(struct virtqueue *vq)
{
struct port *port;
port = find_port_by_vq(vq->vdev->priv, vq);
- i...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...+ 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,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev,...
2019 Apr 28
2
[PATCH] virtio_console: remove vq buf while unpluging port
...+ 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,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev,...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.20.1
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.20.1
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:
2019 May 05
0
[PATCH] virtio_console: remove vq buf while unpluging port
...+ 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,
};
+static void remove_vq(struct virtqueue *vq)
+{
+ struct port_buffer *buf;
+
+ flush_bufs(vq, true);
+ while ((buf = virtqueue_detach_unused_buf(vq)))
+ free_buf(buf, true);
+}
+
static void remove_vqs(struct ports_device *portdev)
{
struct virtqueue *vq;
- virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
+ virtio_device_for_each_vq(portdev->vdev,...
2019 May 24
0
[PATCH] virtio_console: remove vq buf while unpluging port
.../*
> * We should just assume the device itself has gone off --
> @@ -1945,17 +1949,22 @@ static const struct file_operations portdev_fops = {
> .owner = THIS_MODULE,
> };
>
> +static void remove_vq(struct virtqueue *vq)
> +{
> + struct port_buffer *buf;
> +
> + flush_bufs(vq, true);
> + while ((buf = virtqueue_detach_unused_buf(vq)))
> + free_buf(buf, true);
> +}
> +
> static void remove_vqs(struct ports_device *portdev)
> {
> struct virtqueue *vq;
>
> - virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *b...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...> > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> > struct virtqueue *vq;
> >
> > virtio_device_for_each_vq(portdev->vdev, vq) {
> > - struct port_buffer *buf;
> >
> > flush_bufs(vq, true);
> > - while ((buf = virtqueue_detach_unused_buf(vq)))
> > - free_buf(buf, true);
> > + remove_unused_bufs(vq);
> > }
> > portdev->vdev->config->del_vqs(portdev->vdev);
> &g...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...> > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> > struct virtqueue *vq;
> >
> > virtio_device_for_each_vq(portdev->vdev, vq) {
> > - struct port_buffer *buf;
> >
> > flush_bufs(vq, true);
> > - while ((buf = virtqueue_detach_unused_buf(vq)))
> > - free_buf(buf, true);
> > + remove_unused_bufs(vq);
> > }
> > portdev->vdev->config->del_vqs(portdev->vdev);
> &g...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...>out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree(portdev->in_vqs);
> --
> 2.21.0
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...>out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree(portdev->in_vqs);
> --
> 2.21.0
2007 Jan 23
2
Voltage override in megatec and megatec-over-usb [was: Re: nut-2.0.5 megatec + Online Xanto]
On 1/23/07, Henning Brauer <hb-nut@bsws.de> wrote:
> good new first: the megatec driverin 2.0.5 now works with the Online
> Xanto S3000R here - well, for the very basics.
>
> the UPS has NO way ofidentifying itself. It also does not respond to
> the power ratings query ("F"). I previously used a hacked up fentonups
> driver. This means the driver cannot figure out
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
...>out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree(portdev->in_vqs);
> --
> 2.20.1
2019 Mar 11
0
[PATCH] virtio_console: free unused buffers with virtio port
...>out_vq);
> spin_unlock_irq(&port->outvq_lock);
> }
>
> @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev)
> struct virtqueue *vq;
>
> virtio_device_for_each_vq(portdev->vdev, vq) {
> - struct port_buffer *buf;
>
> flush_bufs(vq, true);
> - while ((buf = virtqueue_detach_unused_buf(vq)))
> - free_buf(buf, true);
> + remove_unused_bufs(vq);
> }
> portdev->vdev->config->del_vqs(portdev->vdev);
> kfree(portdev->in_vqs);
> --
> 2.20.1
>
>
2019 Aug 08
0
[PATCH v2 1/2] virtio_console: free unused buffers with port delete
...consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.21.0
2019 Aug 09
0
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...consumed_buffers(port);
+ remove_unused_bufs(port->out_vq);
spin_unlock_irq(&port->outvq_lock);
}
@@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev)
struct virtqueue *vq;
virtio_device_for_each_vq(portdev->vdev, vq) {
- struct port_buffer *buf;
flush_bufs(vq, true);
- while ((buf = virtqueue_detach_unused_buf(vq)))
- free_buf(buf, true);
+ remove_unused_bufs(vq);
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);
--
2.21.0
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
Hi Jon,
your patches are malformed because (presumably) your email client
wrapped this lines. Could you please send these as a unified diff
("diff -u"), and send them in attachments, rather than as a
copy-and-paste?
Thanks, -- Peter
Jon Gough wrote:
>
> Peter,
> Here are the files I have worked on. I hope I have diff'd them
> correctly. I have not touched the