qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH] imx_serial: Generate interrupt on tx empty if


From: Michael Tokarev
Subject: Re: [Qemu-trivial] [PATCH] imx_serial: Generate interrupt on tx empty if enabled
Date: Fri, 11 Sep 2015 10:37:12 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

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 <address@hidden>
> ---
>  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;
>      }
>  
> 




reply via email to

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