]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sc16is7xx: Fix for "Unexpected interrupt: 8"
authorPhil Elwell <phil@raspberrypi.org>
Wed, 12 Sep 2018 14:31:56 +0000 (15:31 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 13 Nov 2019 23:47:34 +0000 (18:47 -0500)
commit7b4e8a3d99a2ede9cecfc7414840a01d7f715f08
treea57917314c7e7c014f893dd70cb51e6f64b050af
parentf830e55d70051b8919d7c3e778b4ead8ecdbab71
sc16is7xx: Fix for "Unexpected interrupt: 8"

BugLink: https://bugs.launchpad.net/bugs/1852492
[ Upstream commit 30ec514d440cf2c472c8e4b0079af2c731f71a3e ]

The SC16IS752 has an Enhanced Feature Register which is aliased at the
same address as the Interrupt Identification Register; accessing it
requires that a magic value is written to the Line Configuration
Register. If an interrupt is raised while the EFR is mapped in then
the ISR won't be able to access the IIR, leading to the "Unexpected
interrupt" error messages.

Avoid the problem by claiming a mutex around accesses to the EFR
register, also claiming the mutex in the interrupt handler work
item (this is equivalent to disabling interrupts to interlock against
a non-threaded interrupt handler).

See: https://github.com/raspberrypi/linux/issues/2529

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/serial/sc16is7xx.c