From: Amit Shah <amit.shah@redhat.com>
To: sjur.brandeland@stericsson.com
Cc: virtualization@lists.linux-foundation.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] virtio_console: Let unconnected rproc device receive data.
Date: Fri, 25 Jan 2013 14:40:24 +0530 [thread overview]
Message-ID: <20130125091024.GB30483@amit.redhat.com> (raw)
In-Reply-To: <1358425362-4517-1-git-send-email-sjur.brandeland@stericsson.com>
On (Thu) 17 Jan 2013 [13:22:42], sjur.brandeland@stericsson.com wrote:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Allow rproc serial ports to receive data before the port
> is connected.
>
> Rproc serial ports usually talk to very simple remote devices
> with no control queue managing open/close events. So we must
> let remote devices write to the virtio ring even if the device
> is not yet fully initialized.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> ---
>
> This patch is intended for v3.9.
>
> Thanks,
> Sjur
>
> drivers/char/virtio_console.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index ee4dbea..c17b053 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -1763,8 +1763,11 @@ static void in_intr(struct virtqueue *vq)
> * tty is spawned) and the host sends out data to console
> * ports. For generic serial ports, the host won't
> * (shouldn't) send data till the guest is connected.
> + * However a remote device might send data before the port is
> + * connected. So don't remove data from a rproc_serial device.
> */
> - if (!port->guest_connected)
> +
> + if (!port->guest_connected && !is_rproc_serial(port->portdev->vdev))
> discard_port_data(port);
How about setting port->guest_connected = true in the init routines
instead? Keeps this code path cleaner.
That's what console ports do as well, in init_port_console().
Amit
next prev parent reply other threads:[~2013-01-25 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 12:22 [PATCH] virtio_console: Let unconnected rproc device receive data sjur.brandeland
2013-01-21 23:21 ` Rusty Russell
2013-01-25 9:10 ` Amit Shah [this message]
2013-01-25 11:24 ` Sjur BRENDELAND
2013-02-12 9:14 ` Sjur Brændeland
2013-02-12 9:26 ` Amit Shah
2013-02-12 9:42 ` Michael S. Tsirkin
2013-02-12 10:01 ` Sjur Brændeland
2013-02-12 10:09 ` Michael S. Tsirkin
2013-02-18 22:57 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130125091024.GB30483@amit.redhat.com \
--to=amit.shah@redhat.com \
--cc=mst@redhat.com \
--cc=sjur.brandeland@stericsson.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).