Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Daniel Mack acc97466c0 serial: sc16is7xx: address RX timeout interrupt errata
commit 08ce9a1b72e38cf44c300a44ac5858533eb3c860 upstream.

This device has a silicon bug that makes it report a timeout interrupt
but no data in the FIFO.

The datasheet states the following in the errata section 18.1.4:

  "If the host reads the receive FIFO at the same time as a
  time-out interrupt condition happens, the host might read 0xCC
  (time-out) in the Interrupt Indication Register (IIR), but bit 0
  of the Line Status Register (LSR) is not set (means there is no
  data in the receive FIFO)."

The errata description seems to indicate it concerns only polled mode of
operation when reading bit 0 of the LSR register. However, tests have
shown and NXP has confirmed that the RXLVL register also yields 0 when
the bug is triggered, and hence the IRQ driven implementation in this
driver is equally affected.

This bug has hit us on production units and when it does, sc16is7xx_irq()
would spin forever because sc16is7xx_port_irq() keeps seeing an
interrupt in the IIR register that is not cleared because the driver
does not call into sc16is7xx_handle_rx() unless the RXLVL register
reports at least one byte in the FIFO.

Fix this by always reading one byte from the FIFO when this condition
is detected in order to clear the interrupt. This approach was
confirmed to be correct by NXP through their support channels.

Tested by: Hugo Villeneuve <hvilleneuve@dimonoff.com>

Signed-off-by: Daniel Mack <daniel@zonque.org>
Co-Developed-by: Maxim Popov <maxim.snafu@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231123072818.1394539-1-daniel@zonque.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 17:42:19 +01:00
arch ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt 2023-12-13 17:42:18 +01:00
block block: fix signed int overflow in Amiga partition support 2023-08-30 16:31:46 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-25 11:49:16 +02:00
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2023-11-28 16:46:31 +00:00
Documentation Documentation: security-bugs.rst: clarify CVE handling 2023-08-11 11:45:34 +02:00
drivers serial: sc16is7xx: address RX timeout interrupt errata 2023-12-13 17:42:19 +01:00
firmware
fs nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage() 2023-12-13 17:42:18 +01:00
include perf/core: Add a new read format to get a number of lost samples 2023-12-13 17:42:19 +01:00
init init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init() 2023-08-08 19:49:18 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:18:35 +01:00
kernel perf: Fix perf_event_validate_size() 2023-12-13 17:42:19 +01:00
lib kobject: Fix slab-out-of-bounds in fill_kobj_path() 2023-11-08 11:22:17 +01:00
LICENSES
mm vfs: fix readahead(2) on block devices 2023-11-20 10:29:16 +01:00
net packet: Move reference count in packet_sock to atomic_long_t 2023-12-13 17:42:18 +01:00
samples samples/bpf: Fix buffer overflow in tcp_basertt 2023-08-11 11:45:03 +02:00
scripts kconfig: fix memory leak from range properties 2023-12-13 17:42:15 +01:00
security ima: detect changes to the backing overlay file 2023-12-08 08:43:26 +01:00
sound ALSA: pcm: fix out-of-bounds in snd_pcm_state_names 2023-12-13 17:42:18 +01:00
tools selftests/efivarfs: create-read: fix a resource leak 2023-11-28 16:46:31 +00:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-11-03 23:52:24 +09:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: r8169: Update path to the driver 2023-11-08 11:22:19 +01:00
Makefile Linux 4.19.301 2023-12-08 08:43:26 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.