This is a note to let you know that I've just added the patch titled serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: serial-8250-request-full-16550a-feature-probing-for-oxsemi-pcie-devices.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 00b7a4d4ee42be1c515e56cb1e8ba0f25e271d8e Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" <macro@xxxxxxxxxxx> Date: Wed, 21 Sep 2022 00:35:37 +0100 Subject: serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices From: Maciej W. Rozycki <macro@xxxxxxxxxxx> commit 00b7a4d4ee42be1c515e56cb1e8ba0f25e271d8e upstream. Oxford Semiconductor PCIe (Tornado) 950 serial port devices need to operate in the enhanced mode via the EFR register for the Divide-by-M N/8 baud rate generator prescaler to be used in their native UART mode. Otherwise the prescaler is fixed at 1 causing grossly incorrect baud rates to be programmed. Accessing the EFR register requires 16550A features to have been probed for, so request this to happen regardless of SERIAL_8250_16550A_VARIANTS by setting UPF_FULL_PROBE in port flags. Fixes: 366f6c955d4d ("serial: 8250: Add proper clock handling for OxSemi PCIe devices") Cc: stable@xxxxxxxxxxxxxxx # v5.19+ Reported-by: Anders Blomdell <anders.blomdell@xxxxxxxxxxxxxx> Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx> Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209210005040.41633@xxxxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/8250/8250_pci.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -1232,6 +1232,10 @@ static void pci_oxsemi_tornado_set_mctrl serial8250_do_set_mctrl(port, mctrl); } +/* + * We require EFR features for clock programming, so set UPF_FULL_PROBE + * for full probing regardless of CONFIG_SERIAL_8250_16550A_VARIANTS setting. + */ static int pci_oxsemi_tornado_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_8250_port *up, int idx) @@ -1239,6 +1243,7 @@ static int pci_oxsemi_tornado_setup(stru struct pci_dev *dev = priv->dev; if (pci_oxsemi_tornado_p(dev)) { + up->port.flags |= UPF_FULL_PROBE; up->port.get_divisor = pci_oxsemi_tornado_get_divisor; up->port.set_divisor = pci_oxsemi_tornado_set_divisor; up->port.set_mctrl = pci_oxsemi_tornado_set_mctrl; Patches currently in stable-queue which might be from macro@xxxxxxxxxxx are queue-5.19/serial-8250-request-full-16550a-feature-probing-for-oxsemi-pcie-devices.patch queue-5.19/serial-8250-let-drivers-request-full-16550a-feature-probing.patch queue-5.19/risc-v-make-port-i-o-string-accessors-actually-work.patch queue-5.19/pci-sanitise-firmware-bar-assignments-behind-a-pci-pci-bridge.patch