Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbdIUSPQ (ORCPT ); Thu, 21 Sep 2017 14:15:16 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:51707 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751661AbdIUSPO (ORCPT ); Thu, 21 Sep 2017 14:15:14 -0400 Date: Thu, 21 Sep 2017 20:15:03 +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 2/6] serial: imx: only set dma_is_rxing when DMA starts Message-ID: <20170921181503.2d4w7fklptt4cktv@pengutronix.de> References: <1506010697-22114-1-git-send-email-martyn.welch@collabora.co.uk> <1506010697-22114-3-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-3-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: 967 Lines: 25 On Thu, Sep 21, 2017 at 05:18:13PM +0100, Martyn Welch wrote: > From: Romain Perier > > The variable dma_is_rxing is currently set to 1 in imx_disable_rx_int(). > This is problematic as: > > - whilst imx_disable_rx_int() is currently always called before > start_rx_dma() this dependency isn't obvious. > - start_rx_dma() does error checking and might exit without > enabling DMA. Currently this will result in dma_is_rxing suggesting > that DMA is being used for recieving. > > To avoid these issues, move the setting of dma_is_rxing to > start_rx_dma() when appropriate. > > Signed-off-by: Romain Perier > Signed-off-by: Martyn Welch Reviewed-by: Uwe Kleine-K?nig Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |