From: Jiri Slaby <jirislaby@kernel.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
Anders Blomdell <anders.blomdell@control.lth.se>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices
Date: Mon, 19 Sep 2022 06:44:11 +0200 [thread overview]
Message-ID: <7785ca40-2f4d-a0a8-2ada-ca5fb941b6a2@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2209171020390.31781@angie.orcam.me.uk>
On 17. 09. 22, 12:07, Maciej W. Rozycki wrote:
> 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.
>
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> Reported-by: Anders Blomdell <anders.blomdell@control.lth.se>
> Fixes: 366f6c955d4d ("serial: 8250: Add proper clock handling for OxSemi PCIe devices")
> Cc: stable@vger.kernel.org # v5.19+
> ---
> drivers/tty/serial/8250/8250_pci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> linux-serial-8250-oxsemi-efr.diff
> Index: linux-macro/drivers/tty/serial/8250/8250_pci.c
> ===================================================================
> --- linux-macro.orig/drivers/tty/serial/8250/8250_pci.c
> +++ linux-macro/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.
> + */
It'd make more sense to me to move this comment right before the line
you add below.
> 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;
thanks,
--
js
suse labs
next prev parent reply other threads:[~2022-09-19 4:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 10:07 [PATCH 0/2] serial: 8250: Let drivers request full 16550A feature probing Maciej W. Rozycki
2022-09-17 10:07 ` [PATCH 1/2] " Maciej W. Rozycki
2022-09-19 4:42 ` Jiri Slaby
2022-09-19 8:18 ` Maciej W. Rozycki
2022-09-19 10:49 ` Jiri Slaby
2022-09-20 23:35 ` Maciej W. Rozycki
2022-09-17 10:07 ` [PATCH 2/2] serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices Maciej W. Rozycki
2022-09-19 4:44 ` Jiri Slaby [this message]
2022-09-19 8:23 ` Maciej W. Rozycki
2022-09-20 23:35 ` Maciej W. Rozycki
2022-09-17 15:00 ` [PATCH 0/2] serial: 8250: Let drivers request full 16550A feature probing Josh Triplett
2022-09-18 8:26 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7785ca40-2f4d-a0a8-2ada-ca5fb941b6a2@kernel.org \
--to=jirislaby@kernel.org \
--cc=anders.blomdell@control.lth.se \
--cc=gregkh@linuxfoundation.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox