]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/tty: 8250: only call fintek_8250_probe when doing port I/O
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 18 May 2017 11:29:55 +0000 (12:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:39:10 +0000 (16:39 +0200)
commit59050fedbbb7648e2e6efb43d6b56511b49cfa3c
tree9b36bb0ad411134266be1243560ff0294406ea6f
parent6a0fa58cdd92da9a8e6fa4e621cabd91974091b3
drivers/tty: 8250: only call fintek_8250_probe when doing port I/O

Commit 9fddc956ff3b ("serial: 8250: Integrate Fintek into 8250_base")
modified the probing logic for PNP0501 devices, to remove a collision
between the generic 16550A driver and the Fintek driver, which reused
the same ACPI _HID.

The Fintek device probe is now incorporated into the common 8250 probe
path, and gets called for all discovered 16550A compatible devices,
including ones that are MMIO mapped rather than IO mapped. However,
the Fintek driver assumes the port base is a I/O address, and proceeds
to probe some arbitrary offsets above it.

This is generally a wrong thing to do, but on ARM systems (having no
native port I/O), this may result in faulting accesses of completely
unrelated MMIO regions in the PCI I/O space. Given that this is at
serial probe time, this results in hard to diagnose crashes at boot.

So let's restrict the Fintek probe to devices that we know are using
port I/O in the first place.

Fixes: 9fddc956ff3b ("serial: 8250: Integrate Fintek into 8250_base")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c