From: Amit Shah <amit.shah@redhat.com>
To: "Sjur Brændeland" <sjurbr@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Erwan Yvin <erwan.yvin@stericsson.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] Revert "virtio_console: Initialize guest_connected=true for rproc_serial"
Date: Wed, 13 Mar 2013 15:33:49 +0530 [thread overview]
Message-ID: <20130313100322.GB16740@amit.redhat.com> (raw)
In-Reply-To: <CANHm3PgQuT=98dM2gU8mkN=RxzD9ruQ+cqa_NGKv2kZwS46c=Q@mail.gmail.com>
On (Tue) 12 Mar 2013 [12:05:03], Sjur Brændeland wrote:
> On Tue, Mar 12, 2013 at 8:34 AM, Amit Shah <amit.shah@redhat.com> wrote:
> > On (Mon) 11 Mar 2013 [16:15:00], sjur.brandeland@stericsson.com wrote:
> >> From: Sjur Brćndeland <sjur.brandeland@stericsson.com>
> >>
> >> This reverts commit 8078db789a92b10ff6e2d713231b5367e014c53b.
> >>
> >> The reverted patch caused opening of ports to fail for rproc_serial.
> >> In probe guest_connected was set to true, but port_fops_open()
> >> fails with -EMFILE if guest_connected already is true.
> >
> > OK, I missed that. Can you add a comment near the 2nd hunk mentioning
> > this?
>
> Ok, I ended up rewriting the whole comment here in my attempt
> to "mention this". Perhaps it's a bit over the top to write a short essay to
> explain two code lines, but anyway here it is. Let me know what you think:
>
> /*
> * Normally the port should not accept data when the port is
> * closed. For generic serial ports, the host won't (shouldn't)
> * send data till the guest is connected. But this condition
> * can be reached when a console port is not yet connected (no
> * tty is spawned) and the other side sends out data over the
> * vring, or when a remote devices start sending data before
> * the ports are opened.
> *
> * A generic serial port will discard data if not connected,
> * while console ports and rproc-serial ports accepts data at
> * any time. rproc-serial is initiated with guest_connect = false
'guest_connected'
> * because port_fops_open expects this. Console ports are
> * hooked up with an HVC console and is initialized with
> * guest_connected = true.
> */
Yes, it is a bit verbose, but looks fine to me.
Thanks,
Amit
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2013-03-13 10:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 15:15 [PATCH] Revert "virtio_console: Initialize guest_connected=true for rproc_serial" sjur.brandeland
2013-03-12 4:54 ` Rusty Russell
2013-03-12 7:34 ` Amit Shah
2013-03-12 11:05 ` Sjur Brændeland
2013-03-13 0:17 ` Rusty Russell
2013-03-13 10:03 ` Amit Shah [this message]
2013-03-13 11:10 ` [PATCHv2] " sjur.brandeland
2013-03-17 23:51 ` Rusty Russell
2013-03-18 5:27 ` Amit Shah
2013-03-18 8:51 ` 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=20130313100322.GB16740@amit.redhat.com \
--to=amit.shah@redhat.com \
--cc=erwan.yvin@stericsson.com \
--cc=linus.walleij@linaro.org \
--cc=sjurbr@gmail.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).