All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Peter Maydell <peter.maydell@linaro.org>,
	uli@fpond.eu, Rob Landley <rob@landley.net>,
	Rich Felker <dalias@libc.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input
Date: Sun, 30 Sep 2018 07:32:41 +0000	[thread overview]
Message-ID: <0b6ca250-056a-baab-bc1d-3dfc603487ff@redhat.com> (raw)
In-Reply-To: <CAMuHMdU+tV0K1iFTKVZmFbV6aY2jqX96XUJqJGEEup-R5SUqeQ@mail.gmail.com>

On 28/09/2018 14:36, Geert Uytterhoeven wrote:
> Hi Paolo,
> 
> On Tue, Sep 11, 2018 at 3:11 PM Paolo Bonzini <pbonzini@redhat.com> 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 <rob@landley.net>
>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>> Tested-by: Ulrich Hecht <uli@fpond.eu>
>>> Tested-by: Rob Landley <rob@landley.net>
>>> Tested-by: Rich Felker <dalias@libc.org>
> 
>> 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!)

Paolo

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Peter Maydell <peter.maydell@linaro.org>,
	uli@fpond.eu, Rob Landley <rob@landley.net>,
	Rich Felker <dalias@libc.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input
Date: Sun, 30 Sep 2018 09:32:41 +0200	[thread overview]
Message-ID: <0b6ca250-056a-baab-bc1d-3dfc603487ff@redhat.com> (raw)
In-Reply-To: <CAMuHMdU+tV0K1iFTKVZmFbV6aY2jqX96XUJqJGEEup-R5SUqeQ@mail.gmail.com>

On 28/09/2018 14:36, Geert Uytterhoeven wrote:
> Hi Paolo,
> 
> On Tue, Sep 11, 2018 at 3:11 PM Paolo Bonzini <pbonzini@redhat.com> 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 <rob@landley.net>
>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>> Tested-by: Ulrich Hecht <uli@fpond.eu>
>>> Tested-by: Rob Landley <rob@landley.net>
>>> Tested-by: Rich Felker <dalias@libc.org>
> 
>> 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!)

Paolo

  reply	other threads:[~2018-09-30  7:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 13:11 [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input Geert Uytterhoeven
2018-09-05 13:11 ` [Qemu-devel] " Geert Uytterhoeven
2018-09-05 13:11 ` Geert Uytterhoeven
2018-09-11 13:11 ` Paolo Bonzini
2018-09-11 13:11   ` [Qemu-devel] " Paolo Bonzini
2018-09-11 13:11   ` Paolo Bonzini
2018-09-28 12:36   ` Geert Uytterhoeven
2018-09-28 12:36     ` Geert Uytterhoeven
2018-09-30  7:32     ` Paolo Bonzini [this message]
2018-09-30  7:32       ` Paolo Bonzini

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=0b6ca250-056a-baab-bc1d-3dfc603487ff@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dalias@libc.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob@landley.net \
    --cc=uli@fpond.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.