Received: from eggs.gnu.org ([2001:4830:134:3::10]:55706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQFaD-0002i6-MF for qemu-devel@nongnu.org; Wed, 19 Mar 2014 08:26:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQFaC-0004iv-37 for qemu-devel@nongnu.org; Wed, 19 Mar 2014 08:26:57 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQFaB-0004ie-Si for qemu-devel@nongnu.org; Wed, 19 Mar 2014 08:26:56 -0400 From: Peter Maydell Date: Wed, 19 Mar 2014 12:05:44 +0000 Message-Id: <1395230746-22643-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1395230746-22643-1-git-send-email-peter.maydell@linaro.org> References: <1395230746-22643-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 4/6] pl011: fix incorrect logic to set the RXFF flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org, Aurelien Jarno From: Rob Herring The receive fifo full bit should be set when 1 character is received and the fifo is disabled or when 16 characters are in the fifo. Signed-off-by: Rob Herring Reviewed-by: Peter Maydell Message-id: 1395166721-15716-4-git-send-email-robherring2@gmail.com Signed-off-by: Peter Maydell --- hw/char/pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 11c3a75..644aad7 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -221,7 +221,7 @@ static void pl011_put_fifo(void *opaque, uint32_t value) s->read_fifo[slot] = value; s->read_count++; s->flags &= ~PL011_FLAG_RXFE; - if (s->cr & 0x10 || s->read_count == 16) { + if (!(s->lcr & 0x10) || s->read_count == 16) { s->flags |= PL011_FLAG_RXFF; } if (s->read_count == s->read_trigger) { -- 1.9.0