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] [day] [month] [year] [list]
Date:	Wed, 25 May 2016 16:07:55 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Pramod Gurav <pramod.gurav@...aro.org>
Cc:	Andy Gross <andy.gross@...aro.org>, gregkh@...uxfoundation.org,
	David Brown <davidb@...eaurora.org>, jslaby@...e.com,
	linux-arm-msm@...r.kernel.org, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: serial: msm: Remove duplicate handling of clocks

On 05/16, Pramod Gurav wrote:
> On 11 May 2016 at 14:30, Pramod Gurav <pramod.gurav@...aro.org> wrote:
> > msm_serial driver provides a .pm callback to the serial core to enable
> > and disable clock resource in suspend/resume path. This function is
> > also called before msm_startup. msm_startup also enables the clocks which
> > is not needed. Hence remove the duplcate clock operation from msm_startup
> > and msm_shutdown. Same is done in console setup to get rid of duplicate
> > clock operation.
> >
> > Tested on DB410C console.
> >
> > Signed-off-by: Pramod Gurav <pramod.gurav@...aro.org>
> > ---
> >  drivers/tty/serial/msm_serial.c | 15 ++-------------
> >  1 file changed, 2 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
> > index dcde955..73c3217 100644
> > --- a/drivers/tty/serial/msm_serial.c
> > +++ b/drivers/tty/serial/msm_serial.c
> > @@ -959,15 +959,6 @@ static int msm_set_baud_rate(struct uart_port *port, unsigned int baud,
> >         return baud;
> >  }
> >
> > -static void msm_init_clock(struct uart_port *port)
> > -{
> > -       struct msm_port *msm_port = UART_TO_MSM(port);
> > -
> > -       clk_prepare_enable(msm_port->clk);
> > -       clk_prepare_enable(msm_port->pclk);
> > -       msm_serial_set_mnd_regs(port);
> > -}
> > -
> >  static int msm_startup(struct uart_port *port)
> >  {
> >         struct msm_port *msm_port = UART_TO_MSM(port);
> > @@ -982,7 +973,7 @@ static int msm_startup(struct uart_port *port)
> >         if (unlikely(ret))
> >                 return ret;
> >
> > -       msm_init_clock(port);
> > +       msm_serial_set_mnd_regs(port);
> 
> Further testing with another UART port made me realize that serial
> port does not work after disabling msm_port->clk clock. The RX data
> part will be affected.
> Confirmed from manual that this clock should never be turned of to
> avoid loss of incoming data. Sorry for the noise.
> 

Does that mean this patch shouldn't be applied? I hope that the
pm callback would do the right thing and be called when we expect
to be receiving data on the line.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ