Displaying 20 results from an estimated 32 matches for "outvq_full".
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...> + kfree(io_callbacks);
> + kfree(vqs);
> +
> + return err;
> +}
> +
> static int add_port(struct ports_device *portdev, u32 id)
> {
> char debugfs_name[16];
> @@ -1163,6 +1212,14 @@ static int add_port(struct ports_device *portdev, u32 id)
>
> port->outvq_full = false;
>
> + if (!portdev->in_vqs[port->id] && !portdev->out_vqs[port->id]) {
> + spin_lock(&portdev->ports_lock);
> + err = setup_port_vq(portdev, port->id);
> + spin_unlock(&portdev->ports_lock);
> + if (err)
> + goto free_port;...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...> + kfree(io_callbacks);
> + kfree(vqs);
> +
> + return err;
> +}
> +
> static int add_port(struct ports_device *portdev, u32 id)
> {
> char debugfs_name[16];
> @@ -1163,6 +1212,14 @@ static int add_port(struct ports_device *portdev, u32 id)
>
> port->outvq_full = false;
>
> + if (!portdev->in_vqs[port->id] && !portdev->out_vqs[port->id]) {
> + spin_lock(&portdev->ports_lock);
> + err = setup_port_vq(portdev, port->id);
> + spin_unlock(&portdev->ports_lock);
> + if (err)
> + goto free_port;...
2011 Mar 04
0
[PATCH] virtio: console: Don't access vqs if device was unplugged
...70,6 +474,10 @@ static void reclaim_consumed_buffers(struct port *port)
void *buf;
unsigned int len;
+ if (!port->portdev) {
+ /* Device has been unplugged. vqs are already gone. */
+ return;
+ }
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
kfree(buf);
port->outvq_full = false;
2011 Mar 04
0
[PATCH] virtio: console: Don't access vqs if device was unplugged
...70,6 +474,10 @@ static void reclaim_consumed_buffers(struct port *port)
void *buf;
unsigned int len;
+ if (!port->portdev) {
+ /* Device has been unplugged. vqs are already gone. */
+ return;
+ }
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
kfree(buf);
port->outvq_full = false;
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...IZE);
}
port->inbuf = NULL;
buf = get_inbuf(port);
@@ -485,7 +526,7 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ free_databuf(port->portdev->vdev, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +713,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ dma_addr_t dma;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +737,10 @@ static ssize_t p...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...IZE);
}
port->inbuf = NULL;
buf = get_inbuf(port);
@@ -485,7 +526,7 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ free_databuf(port->portdev->vdev, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +713,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ dma_addr_t dma;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +737,10 @@ static ssize_t p...
2011 Mar 02
4
[PATCH 0/2] Fix hot-unplug: device removal while port in use
A crash was observed when a device gets removed while a port is in
use. When the port gets removed, we tried to free vq buffers. The vq
no longer exists at this stage, just ensure we don't access it.
The second patch fixes a warning where the pci region is already
freed. I'm not sure what or how the region gets freed, any clues
there will be helpful.
Thanks,
Amit
Amit Shah (2):
2011 Mar 02
4
[PATCH 0/2] Fix hot-unplug: device removal while port in use
A crash was observed when a device gets removed while a port is in
use. When the port gets removed, we tried to free vq buffers. The vq
no longer exists at this stage, just ensure we don't access it.
The second patch fixes a warning where the pci region is already
freed. I'm not sure what or how the region gets freed, any clues
there will be helpful.
Thanks,
Amit
Amit Shah (2):
2012 Dec 07
2
[PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change
Hi Rusty,
The linux-next kernel was failing my virtio-console test suite for a
while. I looked into it today, and it's due to the
virtqueue_add_buf() change that doesn't return > 0 values anymore. I
found your commit that adjusts virtio_console.c, but you missed one
instance where the return value mattered, and as a result not enough
buffers were queued for the host to send in data.
2012 Dec 07
2
[PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change
Hi Rusty,
The linux-next kernel was failing my virtio-console test suite for a
while. I looked into it today, and it's due to the
virtqueue_add_buf() change that doesn't return > 0 values anymore. I
found your commit that adjusts virtio_console.c, but you missed one
instance where the return value mattered, and as a result not enough
buffers were queued for the host to send in data.
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
Changes since v7:
- Rebased to
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
Changes since v7:
- Rebased to
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...IZE);
}
port->inbuf = NULL;
buf = get_inbuf(port);
@@ -485,7 +528,7 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ free_databuf(port->portdev->vdev, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +715,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +738,10 @@ static ssize_t port_fops_write(str...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...IZE);
}
port->inbuf = NULL;
buf = get_inbuf(port);
@@ -485,7 +528,7 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ free_databuf(port->portdev->vdev, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +715,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +738,10 @@ static ssize_t port_fops_write(str...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...;buf)
goto free_buf;
buf->len = 0;
@@ -485,7 +582,10 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ if (is_console_port(port))
+ kfree(buf);
+ else
+ free_buf(buf);
port->outvq_full = false;
}
}
@@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
ssize_t ret;
unsigned long flags;
unsigned int len;
+ struct port_buffer *buf = in_buf;
out_vq = port->out_vq;
@@ -505,8 +606,11 @@ static ssize_t send_buf(struct port *port,...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...;buf)
goto free_buf;
buf->len = 0;
@@ -485,7 +582,10 @@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ if (is_console_port(port))
+ kfree(buf);
+ else
+ free_buf(buf);
port->outvq_full = false;
}
}
@@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
ssize_t ret;
unsigned long flags;
unsigned int len;
+ struct port_buffer *buf = in_buf;
out_vq = port->out_vq;
@@ -505,8 +606,11 @@ static ssize_t send_buf(struct port *port,...
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
This patch-set is a rework of the
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
This patch-set is a rework of the