All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1913344] [NEW]  Exynos4210 UART peripheral data loss
@ 2021-01-26 20:25 Iris Johnson
  2021-01-29 14:27 ` [Bug 1913344] " Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Iris Johnson @ 2021-01-26 20:25 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Currently the Exynos4210 UART (hw/char/exynos4210_uart.c) incorrectly
reports however many empty bytes are available in the FIFO when queried
for receive capacity. However this peripheral supports a polled mode
where only a single byte can be submitted at a time and the FIFO is
unused, meaning that in polled mode data is lost since it's written into
the FIFO and the polling code in FIFO disabled mode only returns the
value in the RX data register.

Even worse, potentially enabling the FIFO without a FIFO reset will
create a weird situation where data is already in the FIFO whenever data
came in faster than the polling could pick it up (which is basically
always).

This change obscured the issue in
https://bugs.launchpad.net/qemu/+bug/1913341, which instead presented as
strange data loss until I locally resolved this issue.

I have a patch ready for the bug and will submit it later today, I'm
just filing for clarity.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1913344

Title:
   Exynos4210 UART peripheral data loss

Status in QEMU:
  New

Bug description:
  Currently the Exynos4210 UART (hw/char/exynos4210_uart.c) incorrectly
  reports however many empty bytes are available in the FIFO when
  queried for receive capacity. However this peripheral supports a
  polled mode where only a single byte can be submitted at a time and
  the FIFO is unused, meaning that in polled mode data is lost since
  it's written into the FIFO and the polling code in FIFO disabled mode
  only returns the value in the RX data register.

  Even worse, potentially enabling the FIFO without a FIFO reset will
  create a weird situation where data is already in the FIFO whenever
  data came in faster than the polling could pick it up (which is
  basically always).

  This change obscured the issue in
  https://bugs.launchpad.net/qemu/+bug/1913341, which instead presented
  as strange data loss until I locally resolved this issue.

  I have a patch ready for the bug and will submit it later today, I'm
  just filing for clarity.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1913344/+subscriptions


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-30  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 20:25 [Bug 1913344] [NEW] Exynos4210 UART peripheral data loss Iris Johnson
2021-01-29 14:27 ` [Bug 1913344] " Philippe Mathieu-Daudé
2021-03-01 19:07 ` Iris Johnson
2021-04-30  9:03 ` Thomas Huth

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.