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: <VI1PR04MB4800F6C28186CE70F3E1D197F3920@VI1PR04MB4800.eurprd04.prod.outlook.com>
Date:   Thu, 25 Jun 2020 10:12:54 +0000
From:   "Vabhav Sharma (OSS)" <vabhav.sharma@....nxp.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        "Vabhav Sharma (OSS)" <vabhav.sharma@....nxp.com>
CC:     "jslaby@...e.com" <jslaby@...e.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Varun Sethi <V.Sethi@....com>
Subject: RE: [PATCH] tty: serial: fsl_lpuart: minimum baud rate support



> -----Original Message-----
> From: Greg KH <gregkh@...uxfoundation.org>
> Sent: Thursday, June 25, 2020 3:34 PM
> To: Vabhav Sharma (OSS) <vabhav.sharma@....nxp.com>
> Cc: jslaby@...e.com; linux-serial@...r.kernel.org; linux-
> kernel@...r.kernel.org; Varun Sethi <V.Sethi@....com>; Vabhav Sharma
> <vabhav.sharma@....com>
> Subject: Re: [PATCH] tty: serial: fsl_lpuart: minimum baud rate support
> 
> On Thu, Jun 25, 2020 at 03:19:05PM +0530, Vabhav Sharma wrote:
> > From: Vabhav Sharma <vabhav.sharma@....com>
> >
> > The formula for the baud rate is
> > baud rate = "baud clock / ((OSR+1) × SBR)
> >
> > Algorithm used in function lpuart32_serial_setbrg() only changes the
> > SBR. Even with maxmum value put in, OSR stays at 0x7 and the lowest
> > baud rate would be ~ 2600 bps
> >
> > Update the algorithm to allow driver operation at 1200,2400 or
> > 600 bps
> >
> > Signed-off-by: Vabhav Sharma <vabhav.sharma@....com>
> > ---
> >  drivers/tty/serial/fsl_lpuart.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/tty/serial/fsl_lpuart.c
> > b/drivers/tty/serial/fsl_lpuart.c index 90298c4..0fd0fa5f 100644
> > --- a/drivers/tty/serial/fsl_lpuart.c
> > +++ b/drivers/tty/serial/fsl_lpuart.c
> > @@ -1925,6 +1925,10 @@ static void __lpuart32_serial_setbrg(struct
> uart_port *port,
> >  			tmp_sbr++;
> >  		}
> >
> > +		if (tmp_sbr > UARTBAUD_SBR_MASK) {
> > +			continue;
> > +		}
> 
> Always use scripts/checkpatch.pl on your patches so you do not get grumpy
> emails from maintainers telling you to use scripts/checkpatch.pl on your
> patches...
Indeed, I run the script before sending patch
./scripts/checkpatch.pl 0001-tty-serial-fsl_lpuart-minimum-baud-rate-support.patch
total: 0 errors, 0 warnings, 10 lines checked

0001-tty-serial-fsl_lpuart-minimum-baud-rate-support.patch has no obvious style problems and is ready for submission.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ