search for: out_intr

Displaying 13 results from an estimated 13 matches for "out_intr".

Did you mean: out_int
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -1132,6 +1132,55 @@ static void send_sigio_to_port(struct port *port) > kill_fasync(&port->async_queue, SIGIO, POLL_OUT); > } > > +static void in_intr(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -1132,6 +1132,55 @@ static void send_sigio_to_port(struct port *port) > kill_fasync(&port->async_queue, SIGIO, POLL_OUT); > } > > +static void in_intr(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (...
2011 Dec 16
0
[PATCH 1/1] virtio: console: Serialise control work
...&len))) { spin_unlock(&portdev->cvq_lock); @@ -1483,6 +1484,10 @@ static void control_work_handler(struct work_struct *work) } } spin_unlock(&portdev->cvq_lock); + if (unlikely(!virtqueue_enable_cb(vq))) { + virtqueue_disable_cb(vq); + goto start; + } } static void out_intr(struct virtqueue *vq) @@ -1533,6 +1538,7 @@ static void control_intr(struct virtqueue *vq) { struct ports_device *portdev; + virtqueue_disable_cb(vq); portdev = vq->vdev->priv; schedule_work(&portdev->control_work); } -- 1.7.7.4 Amit
2011 Dec 16
0
[PATCH 1/1] virtio: console: Serialise control work
...&len))) { spin_unlock(&portdev->cvq_lock); @@ -1483,6 +1484,10 @@ static void control_work_handler(struct work_struct *work) } } spin_unlock(&portdev->cvq_lock); + if (unlikely(!virtqueue_enable_cb(vq))) { + virtqueue_disable_cb(vq); + goto start; + } } static void out_intr(struct virtqueue *vq) @@ -1533,6 +1538,7 @@ static void control_intr(struct virtqueue *vq) { struct ports_device *portdev; + virtqueue_disable_cb(vq); portdev = vq->vdev->priv; schedule_work(&portdev->control_work); } -- 1.7.7.4 Amit
2018 Apr 20
0
[PATCH 3/6] virtio_console: free buffers after reset
..._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); - if (!port) + if (!port) { + flush_bufs(vq, false); return; + } wake_up_interruptible(&port->waitqueue); } @@ -1808,8 +1796,10 @@ static void in_intr(struct virtqueue *vq) unsigned...
2012 Jan 06
3
[PATCH 0/2] virtio: console: control queue race fixes
Hello, The first patch here fixes the race seen by Miche. He hasn't yet reported back if this fixes the races he saw, but Joy Pu from Red Hat tested this patch with hot-plugging/unplugging ports in a loop. Before this patch, he saw some freezes as well as sysfs warnings. After applying the patch, all was well. The second patch can be folded into the series fixing S4 for virtio-console. It
2012 Jan 06
3
[PATCH 0/2] virtio: console: control queue race fixes
Hello, The first patch here fixes the race seen by Miche. He hasn't yet reported back if this fixes the races he saw, but Joy Pu from Red Hat tested this patch with hot-plugging/unplugging ports in a loop. Before this patch, he saw some freezes as well as sysfs warnings. After applying the patch, all was well. The second patch can be folded into the series fixing S4 for virtio-console. It
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
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:
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock