Linux Serial subsystem development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Grant Edwards <grant.b.edwards@gmail.com>
Cc: linux-serial <linux-serial@vger.kernel.org>
Subject: Re: kernel 5.19.8: "Oxford Semiconductor Ltd OXPCIe952 Dual Native 950 UART" gets wrong baudrate (PCI ID 1415:c158)
Date: Wed, 5 Oct 2022 13:02:40 +0300 (EEST)	[thread overview]
Message-ID: <b2ea1bbe-5ec3-4420-462-b94bf8e5c0d3@linux.intel.com> (raw)
In-Reply-To: <thi5m6$j7r$1@ciao.gmane.io>

On Tue, 4 Oct 2022, Grant Edwards wrote:

> On 2022-09-13, Anders Blomdell <anders.blomdell@control.lth.se> wrote:
> > I get incorrect baudrates, my oscilloscope gives:
> >
> > Programmed	Measured
> >
> >    2400		  5208
> >    4800		 13150
> >    9600		 10410
> >   19200		 71420
> >   38400		142000
> >   57600		201600
> > 115200		138800
> 
> I just ran into what I think is the same problem when upgrading from
> 5.10.76 to 5.15.68 (sorry I don't have any intermediate kernel
> versions to test with). This is an oxford quad 950 board that has
> worked flawlessly for many years. Now the baud rates are all wrong.
> 
> $ lspci | grep OX
> 03:00.0 Serial controller: Oxford Semiconductor Ltd OXPCIe954 Quad Native 950 UART
> 
> $ dmesg | grep ttyS
> [    0.265026] 0000:03:00.0: ttyS0 at MMIO 0xf7801000 (irq = 19, base_baud = 15625000) is a 16550A
> [    0.265130] 0000:03:00.0: ttyS1 at MMIO 0xf7801200 (irq = 19, base_baud = 15625000) is a 16550A
> [    0.265231] 0000:03:00.0: ttyS2 at MMIO 0xf7801400 (irq = 19, base_baud = 15625000) is a 16550A
> [    0.265358] 0000:03:00.0: ttyS3 at MMIO 0xf7801600 (irq = 19, base_baud = 15625000) is a 16550A
> 
> The only change I could see in dmesg/setserial output is that the
> baud base changed from 4000000 to 15625000. However, changing the baud
> base back to 4000000 does not make the ports work again
> 
> With the default baud base of 15625000, baud rates look like this:
> 
> Programmed  Measured
>     2400       5398
>     4800      13812
>     9600      10796 
>    19200      74418
>    
> The curious thing is that the buad rate errors are non-linear, so you
> can't just adjust the base baud value to get correct baud rates. The
> algorithm used to calculate the baud divisors seems to be broken.
> 
> I've read through the rest of this thread a couple times, but was
> unable to figure out what to do to fix this problem or if it got fixed
> in more recent kernel versions.
> 
> Did this problem get fixed in more recent kernels?

This series was used to fix the problem:

https://lore.kernel.org/linux-serial/alpine.DEB.2.21.2209201659350.41633@angie.orcam.me.uk/T/#t

Patch 2/3 went only for v5.19+.

-- 
 i.


> Is there something I can do with a 6.15 kernel to get it this board to
> work again?
> 
> --
> Grant
> 


      parent reply	other threads:[~2022-10-05 10:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 19:59 kernel 5.19.8: "Oxford Semiconductor Ltd OXPCIe952 Dual Native 950 UART" gets wrong baudrate (PCI ID 1415:c158) Anders Blomdell
2022-09-13  8:21 ` Greg Kroah-Hartman
2022-09-13 12:16   ` Anders Blomdell
2022-09-13 12:30     ` Greg Kroah-Hartman
2022-09-13 12:43       ` Anders Blomdell
2022-09-13 14:01         ` Greg Kroah-Hartman
2022-09-13 15:34           ` Anders Blomdell
2022-09-13 16:19             ` Maciej W. Rozycki
2022-09-13 17:17               ` Anders Blomdell
2022-09-16 21:50                 ` Maciej W. Rozycki
2022-09-13 18:59               ` Anders Blomdell
2022-09-13 21:07               ` Anders Blomdell
2022-09-14  0:00                 ` Maciej W. Rozycki
2022-09-14 11:01                   ` Anders Blomdell
2022-09-14 11:41                     ` Maciej W. Rozycki
2022-09-14 14:15                       ` Maciej W. Rozycki
2022-09-14 14:22                         ` Anders Blomdell
2022-09-16 21:03                           ` Maciej W. Rozycki
2022-09-19  6:50                             ` Anders Blomdell
2022-09-14 14:57                         ` Greg Kroah-Hartman
2022-09-15 10:09                           ` Anders Blomdell
2022-09-16 21:03                             ` Maciej W. Rozycki
2022-10-04 20:39     ` Grant Edwards
2022-10-04 21:14       ` Grant Edwards
2022-10-05 10:02       ` Ilpo Järvinen [this message]

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=b2ea1bbe-5ec3-4420-462-b94bf8e5c0d3@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=grant.b.edwards@gmail.com \
    --cc=linux-serial@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