[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qemu v2] hw/char/sh_serial: Add timeout handling

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input
Date: Sun, 30 Sep 2018 09:32:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 28/09/2018 14:36, Geert Uytterhoeven wrote:
> Hi Paolo,
> On Tue, Sep 11, 2018 at 3:11 PM Paolo Bonzini <address@hidden> wrote:
>> On 05/09/2018 15:11, Geert Uytterhoeven wrote:
>>> As of commit 18e8cf159177100e ("serial: sh-sci: increase RX FIFO trigger
>>> defaults for (H)SCIF") in Linux v4.11-rc1, the serial console on the
>>> QEMU SH4 target is broken: it delays serial input until enough data has
>>> been received.
>>> Since aforementioned commit, the Linux SCIF driver programs the Receive
>>> FIFO Data Count Trigger bits in the FIFO Control Register, to postpone
>>> generating a receive interrupt until:
>>>   1. At least the receive trigger count of bytes of data are available
>>>      in the receive FIFO, OR
>>>   2. No further data has been received for at least 15 etu after the
>>>      last received data.
>>> While QEMU implements the former, it does not implement the latter.
>>> Hence the receive interrupt is not generated until the former condition
>>> is met.
>>> Fix this by adding basic timeout handling.  As the QEMU SCIF emulation
>>> ignores any serial speed programming, the timeout value used conforms to
>>> a default speed of 9600 bps, which is fine for any interactive console.
>>> Reported-by: Rob Landley <address@hidden>
>>> Signed-off-by: Geert Uytterhoeven <address@hidden>
>>> Tested-by: Ulrich Hecht <address@hidden>
>>> Tested-by: Rob Landley <address@hidden>
>>> Tested-by: Rich Felker <address@hidden>
>> Queued, thanks.
> Does that mean it should show up in qemu.git anytime soon?

Yes, I'm testing the pull request now.  (I went to Kernel Recipes and
forgot at home my ssh private key, otherwise I'd have sent it last week!)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]