search for: c_ivq

Displaying 20 results from an estimated 69 matches for "c_ivq".

Did you mean: _vq
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 to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/virtio_console.c | 2...
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 to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/virtio_console.c | 2...
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. Pointed out by Wanlong Gao. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: con...
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. Pointed out by Wanlong Gao. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: con...
2017 Mar 29
1
[PATCH] virtio_console: fix uninitialized variable use
We try to disable callbacks on c_ivq even without multiport even though that vq is not initialized in this configuration. Fixes: c743d09dbd01 ("virtio: console: Disable callbacks for virtqueues at start of S4 freeze") Suggested-by: Mike Galbraith <efault at gmx.de> Signed-off-by: Michael S. Tsirkin <mst at redhat.c...
2017 Mar 29
1
[PATCH] virtio_console: fix uninitialized variable use
We try to disable callbacks on c_ivq even without multiport even though that vq is not initialized in this configuration. Fixes: c743d09dbd01 ("virtio: console: Disable callbacks for virtqueues at start of S4 freeze") Suggested-by: Mike Galbraith <efault at gmx.de> Signed-off-by: Michael S. Tsirkin <mst at redhat.c...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1523,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1719,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1523,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1719,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1524,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1720,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1524,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1720,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...if (is_rproc_serial(port->portdev->vdev)) { + while ((buf = virtqueue_detach_unused_buf(port->out_vq))) + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); + } + } /* @@ -1478,7 +1558,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1754,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...if (is_rproc_serial(port->portdev->vdev)) { + while ((buf = virtqueue_detach_unused_buf(port->out_vq))) + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); + } + } /* @@ -1478,7 +1558,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1754,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1539,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1735,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...uffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } /* @@ -1478,7 +1539,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1735,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...+ if (is_rproc_serial(port->portdev->vdev)) { + while ((buf = virtqueue_detach_unused_buf(port->out_vq))) + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); + } } /* @@ -1478,7 +1560,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1756,10 @@ static void remove_controlq_data(struct ports...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...+ if (is_rproc_serial(port->portdev->vdev)) { + while ((buf = virtqueue_detach_unused_buf(port->out_vq))) + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); + } } /* @@ -1478,7 +1560,7 @@ static void control_work_handler(struct work_struct *work) if (add_inbuf(portdev->c_ivq, buf) < 0) { dev_warn(&portdev->vdev->dev, "Error adding buffer to queue\n"); - free_buf(buf); + free_buf(portdev->c_ivq, buf, PAGE_SIZE); } } spin_unlock(&portdev->cvq_lock); @@ -1674,10 +1756,10 @@ static void remove_controlq_data(struct ports...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...inbufs\n"); - err = -ENOMEM; goto free_device; } @@ -2059,14 +2056,11 @@ static int virtcons_probe(struct virtio_device *vdev) INIT_WORK(&portdev->control_work, &control_work_handler); if (multiport) { - unsigned int nr_added_bufs; - spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - nr_added_bufs = fill_queue(portdev->c_ivq, - &portdev->c_ivq_lock); - if (!nr_added_bufs) { + err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); + if (err < 0) { dev_err(&vdev->dev, &qu...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...inbufs\n"); - err = -ENOMEM; goto free_device; } @@ -2059,14 +2056,11 @@ static int virtcons_probe(struct virtio_device *vdev) INIT_WORK(&portdev->control_work, &control_work_handler); if (multiport) { - unsigned int nr_added_bufs; - spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - nr_added_bufs = fill_queue(portdev->c_ivq, - &portdev->c_ivq_lock); - if (!nr_added_bufs) { + err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); + if (err < 0) { dev_err(&vdev->dev, &qu...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...inbufs\n"); - err = -ENOMEM; goto free_device; } @@ -2059,14 +2060,11 @@ static int virtcons_probe(struct virtio_device *vdev) INIT_WORK(&portdev->control_work, &control_work_handler); if (multiport) { - unsigned int nr_added_bufs; - spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - nr_added_bufs = fill_queue(portdev->c_ivq, - &portdev->c_ivq_lock); - if (!nr_added_bufs) { + err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); + if (err < 0) { dev_err(&vdev->dev, &qu...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...inbufs\n"); - err = -ENOMEM; goto free_device; } @@ -2059,14 +2060,11 @@ static int virtcons_probe(struct virtio_device *vdev) INIT_WORK(&portdev->control_work, &control_work_handler); if (multiport) { - unsigned int nr_added_bufs; - spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - nr_added_bufs = fill_queue(portdev->c_ivq, - &portdev->c_ivq_lock); - if (!nr_added_bufs) { + err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); + if (err < 0) { dev_err(&vdev->dev, &qu...