Received: from eggs.gnu.org ([2001:4830:134:3::10]:41050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaItY-0002AL-B6 for qemu-devel@nongnu.org; Fri, 11 Sep 2015 03:37:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaItV-0007GZ-2l for qemu-devel@nongnu.org; Fri, 11 Sep 2015 03:37:16 -0400 Message-ID: <55F284A8.8060404@msgid.tls.msk.ru> Date: Fri, 11 Sep 2015 10:37:12 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1440085955-27951-1-git-send-email-linux@roeck-us.net> In-Reply-To: <1440085955-27951-1-git-send-email-linux@roeck-us.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] imx_serial: Generate interrupt on tx empty if enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Guenter Roeck , Peter Chubb Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Can we please have some r-b or ACK for this? :) 20.08.2015 18:52, Guenter Roeck wrote: > Generate an interrupt if the tx buffer is empty and the tx empty interrupt > is enabled. This fixes a problem seen when running a Linux image since > Linux commit 55c3cb1358e ("serial: imx: remove unneeded imx_transmit_buffer() > from imx_start_tx()"). Linux now waits for the tx empty interrupt before > starting to send data, causing transmit stalls until there is an interrupt > for another reason. > > Signed-off-by: Guenter Roeck > --- > hw/char/imx_serial.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c > index f3fbc77..8dc791d 100644 > --- a/hw/char/imx_serial.c > +++ b/hw/char/imx_serial.c > @@ -145,7 +145,9 @@ static void imx_update(IMXSerialState *s) > uint32_t flags; > > flags = (s->usr1 & s->ucr1) & (USR1_TRDY|USR1_RRDY); > - if (!(s->ucr1 & UCR1_TXMPTYEN)) { > + if (s->ucr1 & UCR1_TXMPTYEN) { > + flags |= (s->uts1 & UTS1_TXEMPTY); > + } else { > flags &= ~USR1_TRDY; > } > >