Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752654AbdGCHDo (ORCPT ); Mon, 3 Jul 2017 03:03:44 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:43917 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223AbdGCHDm (ORCPT ); Mon, 3 Jul 2017 03:03:42 -0400 Date: Mon, 3 Jul 2017 09:03:35 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Romain Perier Cc: Greg Kroah-Hartman , Nandor Han , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 6/7] serial: imx: update the stop rx,tx procedures Message-ID: <20170703070335.4c2g7zzd2d3vhoky@pengutronix.de> References: <20170630120446.13994-1-romain.perier@collabora.com> <20170630120446.13994-7-romain.perier@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170630120446.13994-7-romain.perier@collabora.com> 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: 40 On Fri, Jun 30, 2017 at 02:04:45PM +0200, Romain Perier 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. In case DMA is used > the sg buffers are also un-maped. This unmapping is implicit, becuae imx_stop_rx_dma unmaps since the previous commit, right? > > Signed-off-by: Nandor Han > Signed-off-by: Romain Perier > --- > drivers/tty/serial/imx.c | 39 ++++++++++++++++++++------------------- > 1 file changed, 20 insertions(+), 19 deletions(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index 58d6b1c..d5b6e09 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -360,6 +360,9 @@ static void imx_port_rts_auto(struct imx_port *sport, unsigned long *ucr2) > *ucr2 |= UCR2_CTSC; > } > > +static void imx_stop_rx_dma(struct imx_port *sport); > +static void imx_stop_tx_dma(struct imx_port *sport); Is it possible to reshuffle the order of functions to make this forward declaration redundant? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |