lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220418113801.uree7rvkzxpiwyni@suse>
Date:   Mon, 18 Apr 2022 14:38:01 +0300
From:   "Ivan T. Ivanov" <iivanov@...e.de>
To:     Stefan Wahren <stefan.wahren@...e.com>
Cc:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Phil Elwell <phil@...pberrypi.org>,
        kernel test robot <lkp@...el.com>,
        bcm-kernel-feedback-list@...adcom.com, linux-clk@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] clk: bcm2835: Round UART input clock up

On 04-18 13:22, Stefan Wahren wrote:
> 
> Hi Ivan,
> 
> Am 18.04.22 um 13:05 schrieb Ivan T. Ivanov:
> > Hi Stefan,
> > 
> > On 04-15 10:52, Stefan Wahren wrote:
> > > Hi Ivan,
> > > 
> > > Am 14.04.22 um 12:56 schrieb Ivan T. Ivanov:
> > > > Hi Stefan,
> > > > 
> > > > Please, could you take a look into following patch?
> > > yes, but i cannot give a technical review. But from my gut feeling this
> > > doesn't look really elegant to me.
> > > > Thanks!
> > > > Ivan
> > > > 
> > > > On 04-04 15:51, Ivan T. Ivanov wrote:
> > > > > Subject: [PATCH v2] clk: bcm2835: Round UART input clock up
> > > > > Message-Id: <20220404125113.80239-1-iivanov@...e.de>
> > > > > 
> > > > > The UART clock is initialised to be as close to the requested
> > > > > frequency as possible without exceeding it. Now that there is a
> > > > > clock manager that returns the actual frequencies, an expected
> > > > > 48MHz clock is reported as 47999625. If the requested baudrate
> > > > > == requested clock/16, there is no headroom and the slight
> > > > > reduction in actual clock rate results in failure.
> > > > > 
> > > > > If increasing a clock by less than 0.1% changes it from ..999..
> > > > > to ..000.., round it up.
> > > Based on this commit message this looks like a fix / workaround for an
> > > issue. It would be very helpful to know:
> > > 
> > > What issue should be fixed?
> > > 
> > > Why is it fixed here and not in the UART driver for instance?
> > The UART driver is amba-pl011. Original fix, see below Github link,
> > was inside pl011 module, but somehow it didn't look as the right
> > place either. Beside that this rounding function is not exactly
> > perfect for all possible clock values. So I deiced to move the hack
> > to the platform which actually need it.
> thanks for your explanation. These are import information which belongs in
> the commit log, because the motivation and the affected UART is very
> important.
> > 
> > > In case it fixes a regression, a Fixes tag should be necessary.
> > I found the issue because it was reported that RPi3[1] and RPi Zero 2W
> > boards have issues with the Bluetooth. So it turns out that when
> > switching from initial to operation speed host and device no longer
> > can talk each other because host uses incorrect baud rate.
> 
> Now i remember this issue, for the mainline kernel we decide to workaround
> the issue by lowering the BT baudrate to 2000000 baud.

I have workaranded this the same, at first, but then decided to look at
vendor tree and voilĂ !

> I didn't investigate
> the issue further, but your approach is a better solution.
> 
> Do you use the mainline DTS or the vendor DTS to see this issue?
> 

For (open)SUSE we use downstream DTS.

Do you think that if I put better description in commit message fix will
be more acceptable. Or if someone could suggest anything else I am open
to discussion.

Regards,
Ivan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ