Displaying 20 results from an estimated 64 matches for "free_device".
2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...nit_waitqueue_head(&port->waitqueue);
- /* Fill the in_vq with buffers so the host can send us data. */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
- dev_err(port->dev, "Error allocating inbufs\n");
- err = -ENOMEM;
- goto free_device;
+ /* if the in_vq has not already been filled (the port has already been
+ * used and unplugged), fill the in_vq with buffers so the host can
+ * send us data.
+ */
+ if (port->in_vq->num_free != 0) {
+ nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (!nr_adde...
2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...nit_waitqueue_head(&port->waitqueue);
- /* Fill the in_vq with buffers so the host can send us data. */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
- dev_err(port->dev, "Error allocating inbufs\n");
- err = -ENOMEM;
- goto free_device;
+ /* if the in_vq has not already been filled (the port has already been
+ * used and unplugged), fill the in_vq with buffers so the host can
+ * send us data.
+ */
+ if (port->in_vq->num_free != 0) {
+ nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (!nr_adde...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...; - /* Fill the in_vq with buffers so the host can send us data. */
>> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
>> - if (!nr_added_bufs) {
>> - dev_err(port->dev, "Error allocating inbufs\n");
>> - err = -ENOMEM;
>> - goto free_device;
>> + /* if the in_vq has not already been filled (the port has already been
>> + * used and unplugged), fill the in_vq with buffers so the host can
>> + * send us data.
>> + */
>> + if (port->in_vq->num_free != 0) {
>> + nr_added_bufs = fill_queue(port...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...; - /* Fill the in_vq with buffers so the host can send us data. */
>> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
>> - if (!nr_added_bufs) {
>> - dev_err(port->dev, "Error allocating inbufs\n");
>> - err = -ENOMEM;
>> - goto free_device;
>> + /* if the in_vq has not already been filled (the port has already been
>> + * used and unplugged), fill the in_vq with buffers so the host can
>> + * send us data.
>> + */
>> + if (port->in_vq->num_free != 0) {
>> + nr_added_bufs = fill_queue(port...
2013 Mar 09
4
[PATCH] use rcu_barrier() to wait for bdev puts at unmount
Doing this would reliably fail with -EBUSY for me:
# mount /dev/sdb2 /mnt/scratch; umount /mnt/scratch; mkfs.btrfs -f /dev/sdb2
...
unable to open /dev/sdb2: Device or resource busy
because mkfs.btrfs tries to open the device O_EXCL, and somebody still has it.
Using systemtap to track bdev gets & puts shows a kworker thread doing a
blkdev put after mkfs attempts a get; this is left over
2005 Jun 06
2
mISDN + chan_misdn.so + winbond issue
Hi all,
Does anybody of you have the winbond w6692 working with the
mISDN/chan_misdn.so?
When loading chan_misdn.so from Asterisk, I get a "No lower Id port:1"
error. The /var/log/messages file says: "MISDN free_device: entitylist
not empty"
I'm using Linux 2.6.11.11 + mISDN-CVS-2005-05-01 + Asterisk 1.0.7 + Zaptel 1.0.7
chan_misdn build from chan_misdn-beta-0.0.3-rc6 and against
mISDNuser-CVS-2004-08-29.
The /dev/mISDN node was also created.
I'm loading the kernel modules this way:
modprobe zapt...
2019 Nov 06
0
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...itqueue);
>
> - /* Fill the in_vq with buffers so the host can send us data. */
> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
> - if (!nr_added_bufs) {
> - dev_err(port->dev, "Error allocating inbufs\n");
> - err = -ENOMEM;
> - goto free_device;
> + /* if the in_vq has not already been filled (the port has already been
> + * used and unplugged), fill the in_vq with buffers so the host can
> + * send us data.
> + */
> + if (port->in_vq->num_free != 0) {
> + nr_added_bufs = fill_queue(port->in_vq, &port-&g...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...goto dec_num_dev;
> + }
> + strncpy(mdev->name, name, sizeof(name));
> + mdev->id = rc;
> +
> + mic_device_init(mdev, pdev);
> +
> + rc = pci_enable_device(pdev);
> + if (rc) {
> + dev_err(&pdev->dev, "failed to enable pci device.\n");
> + goto free_device;
> + }
> +
> + pci_set_master(pdev);
> +
> + rc = pci_request_regions(pdev, mic_driver_name);
> + if (rc) {
> + dev_err(&pdev->dev, "failed to get pci regions.\n");
> + goto disable_device;
> + }
> +
> + rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...goto dec_num_dev;
> + }
> + strncpy(mdev->name, name, sizeof(name));
> + mdev->id = rc;
> +
> + mic_device_init(mdev, pdev);
> +
> + rc = pci_enable_device(pdev);
> + if (rc) {
> + dev_err(&pdev->dev, "failed to enable pci device.\n");
> + goto free_device;
> + }
> +
> + pci_set_master(pdev);
> +
> + rc = pci_request_regions(pdev, mic_driver_name);
> + if (rc) {
> + dev_err(&pdev->dev, "failed to get pci regions.\n");
> + goto disable_device;
> + }
> +
> + rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64...
2019 Nov 06
0
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...h buffers so the host can send us data. */
> >> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
> >> - if (!nr_added_bufs) {
> >> - dev_err(port->dev, "Error allocating inbufs\n");
> >> - err = -ENOMEM;
> >> - goto free_device;
> >> + /* if the in_vq has not already been filled (the port has already been
> >> + * used and unplugged), fill the in_vq with buffers so the host can
> >> + * send us data.
> >> + */
> >> + if (port->in_vq->num_free != 0) {
> >> + n...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
.... */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating 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_...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
.... */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating 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_...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...already has buffers. Buffers are removed
+ * only by virtcons_remove(), not by unplug_port()
+ */
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating 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_...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...already has buffers. Buffers are removed
+ * only by virtcons_remove(), not by unplug_port()
+ */
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating 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_...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...f(buf);
+ free_buf(vq, buf, PAGE_SIZE);
break;
}
nr_added_bufs++;
@@ -1234,7 +1280,7 @@ static int add_port(struct ports_device *portdev, u32 id)
free_inbufs:
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf);
+ free_buf(port->in_vq, buf, PAGE_SIZE);
free_device:
device_destroy(pdrvdata.class, port->dev->devt);
free_cdev:
@@ -1276,7 +1322,7 @@ 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);
+ free_...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...f(buf);
+ free_buf(vq, buf, PAGE_SIZE);
break;
}
nr_added_bufs++;
@@ -1234,7 +1280,7 @@ static int add_port(struct ports_device *portdev, u32 id)
free_inbufs:
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf);
+ free_buf(port->in_vq, buf, PAGE_SIZE);
free_device:
device_destroy(pdrvdata.class, port->dev->devt);
free_cdev:
@@ -1276,7 +1322,7 @@ 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);
+ free_...
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 8b9fb8c..69fc902 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -631,6 +631,7 @@ static int
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...eue(struct virtqueue *vq, spinlock_t *lock)
ret = add_inbuf(vq, buf);
if (ret < 0) {
spin_unlock_irq(lock);
- free_buf(buf);
+ free_buf(vq, buf, PAGE_SIZE);
break;
}
nr_added_bufs++;
@@ -1198,10 +1259,18 @@ static int add_port(struct ports_device *portdev, u32 id)
goto free_device;
}
- /*
- * If we're not using multiport support, this has to be a console port
- */
- if (!use_multiport(port->portdev)) {
+ if (is_rproc_serial(port->portdev->vdev))
+ /*
+ * For rproc_serial assume remote processor is connected.
+ * rproc_serial does not want the console...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...eue(struct virtqueue *vq, spinlock_t *lock)
ret = add_inbuf(vq, buf);
if (ret < 0) {
spin_unlock_irq(lock);
- free_buf(buf);
+ free_buf(vq, buf, PAGE_SIZE);
break;
}
nr_added_bufs++;
@@ -1198,10 +1259,18 @@ static int add_port(struct ports_device *portdev, u32 id)
goto free_device;
}
- /*
- * If we're not using multiport support, this has to be a console port
- */
- if (!use_multiport(port->portdev)) {
+ if (is_rproc_serial(port->portdev->vdev))
+ /*
+ * For rproc_serial assume remote processor is connected.
+ * rproc_serial does not want the console...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...eue(struct virtqueue *vq, spinlock_t *lock)
ret = add_inbuf(vq, buf);
if (ret < 0) {
spin_unlock_irq(lock);
- free_buf(buf);
+ free_buf(vq, buf, PAGE_SIZE);
break;
}
nr_added_bufs++;
@@ -1198,10 +1251,18 @@ static int add_port(struct ports_device *portdev, u32 id)
goto free_device;
}
- /*
- * If we're not using multiport support, this has to be a console port
- */
- if (!use_multiport(port->portdev)) {
+ if (is_rproc_serial(port->portdev->vdev))
+ /*
+ * For rproc_serial assume remote processor is connected.
+ * rproc_serial does not want the console...