Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbdIUS2Z (ORCPT ); Thu, 21 Sep 2017 14:28:25 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:37133 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdIUS2X (ORCPT ); Thu, 21 Sep 2017 14:28:23 -0400 Date: Thu, 21 Sep 2017 20:28:17 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Martyn Welch Cc: Greg Kroah-Hartman , Nandor Han , Romain Perier , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fabio Estevam Subject: Re: [PATCH v3 5/6] serial: imx: update the stop rx,tx procedures Message-ID: <20170921182817.wejxqp5e733systb@pengutronix.de> References: <1506010697-22114-1-git-send-email-martyn.welch@collabora.co.uk> <1506010697-22114-6-git-send-email-martyn.welch@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1506010697-22114-6-git-send-email-martyn.welch@collabora.co.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:5054:ff:fe2a:3aa X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1497 Lines: 39 On Thu, Sep 21, 2017 at 05:18:16PM +0100, Martyn Welch wrote: > From: Nandor Han > > According to "Documentation/serial/driver" both procedures should stop > receiving or sending data. Based on this the procedures should stop the > activity regardless if DMA is enabled or not. > > This commit updates both imx_stop_{rx|tx} procedures to stop the > activity and disable the interrupts related to that. > > Signed-off-by: Nandor Han > Signed-off-by: Romain Perier > Signed-off-by: Martyn Welch > --- > drivers/tty/serial/imx.c | 36 +++++++++++++++++------------------- > 1 file changed, 17 insertions(+), 19 deletions(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index ed02783..256b128 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -388,15 +388,14 @@ static void imx_stop_tx(struct uart_port *port) > struct imx_port *sport = (struct imx_port *)port; > unsigned long temp; > > - /* > - * We are maybe in the SMP context, so if the DMA TX thread is running > - * on other cpu, we have to wait for it to finish. > - */ did you understand this comment you're removing here? I admit I don't but unless it is non-sensical you're doing something wrong. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |