Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp276918imm; Wed, 4 Jul 2018 23:35:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdTG9i3q9uqYHZYUrhL3MHlD4FhjGtp7PVZUNASnkfZUs2+OLjR+oFYEy1MmVp9KzfM994b X-Received: by 2002:a65:5545:: with SMTP id t5-v6mr4370096pgr.157.1530772512682; Wed, 04 Jul 2018 23:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530772512; cv=none; d=google.com; s=arc-20160816; b=P+YBBXh+abYtpYwJM7xmGeNLs2BaohO49TdGVP9SNML//Ctz5uJxaebsNJXylxSQVz 4llSm06QTv/3CzBM0yh6csQuH9QEBUFPwit5aP/1d64A+6jtwfIZ9Kvcxc98E3yWigCh V3Zfulf3YmGGqjQPC3BdnwGw8nEOILNrvE0M5M7rFTmais+wGpPeyonMweOZdKsPnedq cHrhM0+OhJruF7vmeFThZwzoy1CeF48CyUGjnQ+q3bx9zcuZ2GdyyS/qREdMPz0TPDox jymkWqA6JtG7bF2N/aFnKTx+eAT8ns5Vr5zcKHxyPHoqwtuWzuEyNtmMvCHA0DMKOQuo JoFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=0oIp4a30w08b9YFXdmTqlyOU+icslDKBJJAn1iJSspM=; b=HhVeL+wolmOCNh0rz9XR/xiwWsaKAi7omlDVzQQi4TThDLw9kqcKBpHS+a2b9OjwAx 4fv2EfxnBvNe4gpWfqcNfZCrdfWYL9/N0LcN6B95eonLxEtTh8xlw0b0q/lXyToh8W8+ 6ZdVon/dMa3u0+LK0rsL8Cz5oGJBDXOYQVxuA6dqTTMyE8h2fFsZIIbTFXD3RXs9InIp +bEYLgRHF8LL/7hV//QzgMyCfUIXHAzRFdtBG5T3/d8voqzUprifPkZXGspZ6SqOiJdN 5SeA3yKPF5bVZ3xIqMwCa0gCSS5e9eiZ3z69u1BIYpSFQSFUGqTP9bO5UZe3D5WFldad NIkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19-v6si5107189pgk.100.2018.07.04.23.34.57; Wed, 04 Jul 2018 23:35:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091AbeGEGct (ORCPT + 99 others); Thu, 5 Jul 2018 02:32:49 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:45913 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751621AbeGEGcs (ORCPT ); Thu, 5 Jul 2018 02:32:48 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1faxog-0006WM-Vk; Thu, 05 Jul 2018 08:32:34 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1faxob-0001Y4-Oq; Thu, 05 Jul 2018 08:32:29 +0200 Date: Thu, 5 Jul 2018 08:32:29 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Esben Haabendal Cc: linux-i2c@vger.kernel.org, Esben Haabendal , Wolfram Sang , Lucas Stach , Phil Reid , Linus Walleij , Clemens Gruber , Wei Jinhua , Michail Georgios Etairidis , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] i2c: imx: Fix race condition in dma read Message-ID: <20180705063229.sr6jplg63ybyzxta@pengutronix.de> References: <20180523095623.3347-1-esben.haabendal@gmail.com> <20180523095623.3347-3-esben.haabendal@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180523095623.3347-3-esben.haabendal@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 11:56:21AM +0200, Esben Haabendal wrote: > From: Esben Haabendal > > This fixes a race condition, where the DMAEN bit ends up being set after > I2C slave has transmitted a byte following the dummy read. When that > happens, an interrupt is generated instead, and no DMA request is generated > to kickstart the DMA read, and a timeout happens after DMA_TIMEOUT (1 sec). > > Fixed by setting the DMAEN bit before the dummy read. Does this fix the problem or just narrow the race window? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |