On Tue, Mar 12, 2013 at 8:34 AM, Amit Shah <[email protected]> wrote:
> On (Mon) 11 Mar 2013 [16:15:00], [email protected] wrote:
>> From: Sjur Brćndeland <[email protected]>
>>
>> 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
* because port_fops_open expects this. Console ports are
* hooked up with an HVC console and is initialized with
* guest_connected = true.
*/
Regards,
Sjur
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization