qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/4] serial: update LSR on enabling/disabling


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 3/4] serial: update LSR on enabling/disabling FIFOs
Date: Mon, 15 Dec 2014 16:52:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 15/12/2014 16:50, Dr. David Alan Gilbert wrote:
>> >  
>> >          if (val & UART_FCR_XFR) {
>> > +            s->lsr |= UART_LSR_THRE;
>> > +            s->thr_ipending = 1;
>> >              fifo8_reset(&s->xmit_fifo);
>> >          }
> Doesn't that break the assertion you added in patch 2?
> i.e. if I write a character, but it can't be sent, so it's added
> to the tsr_retry, but before the callback I set FCR_XFR, and that
> now sets LSR_THRE, then the callback triggers and it hits the
> assert?

You're right.  The TEMT assertion is okay, but the THRE assertion should
be inside if (s->tsr_retry <= 0).

Paolo



reply via email to

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