Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp323560imm; Mon, 9 Jul 2018 02:23:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfif2UveuxukBRJmZLG+0KINFbO58p9t1QT9B+VgG5nWK3BL+Sve4d2h/j4ivYzHuhK/nvY X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr19804769plo.88.1531128220845; Mon, 09 Jul 2018 02:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531128220; cv=none; d=google.com; s=arc-20160816; b=Al+bp62/CS2AgdojiiIswHYClR8RlF2YWKdX5nGUvwbcmbtFtlL5T1Pi1wAmjSRGqE bQlEuwdt7uZO1f4JAmBeAJrDEeqVfDFa5+jX7JpTsHsU/A3KQceuFrPHmCWHFLujimN6 kyGT0WiMoCojOnSBEaibT04/g97574mQNADED0xaLYLkmgynuZAcwcJ354PolOGMsyWC +RYLI+b3t3ZaqiQRGk4E0VgofEbPW/3LmhtFoU4DdgNQ0RKg6W3NkoqSYSSZS1Rg42I8 9IiueyU98PDEpXmwRFqrRA0+5Nesk4aHJ2d92gmhFbOyObiYJbcgY0tfERLO1LZ5xx0k zrKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=IZDErLcIa56acnGokT+vwYyZ2fZu/MwZIhcghR9qyjw=; b=Ay1Gsv4GtaUSXKcy2sfzrsjF31Ex2nzIGcakhpzR4tVrvMP5XszJV+3RRzIusRvlzK flWJ9tppxsfIyzwKf/evyujUTfJ38ShiStUEDgz59mdft5gwWy4dh98LusT3sbJxalZW YbXy76WMkSOJMqhWZxSLcD/xCkA2/zZyTqae4uFA5ya7E0iZcFLS2RaG+sY8Ci2Wm7eM O1TNNsDcm8vir7Z3HBdsb6nuanwBl0slpdmNUJ7jxclivKvX4OiuPBaZHF3OExkBTasa uPbe7ovLG0slw+yxQhRXNvQG4FrZtWJrVODBJnPukr7yRPMyub8/Et5RBNvpWMFV6cla gHxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="PFnmUN/W"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16-v6si12292728pgr.325.2018.07.09.02.23.26; Mon, 09 Jul 2018 02:23:40 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b="PFnmUN/W"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932623AbeGIJWg (ORCPT + 99 others); Mon, 9 Jul 2018 05:22:36 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:44907 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241AbeGIJWe (ORCPT ); Mon, 9 Jul 2018 05:22:34 -0400 Received: by mail-lf0-f67.google.com with SMTP id g6-v6so3942595lfb.11; Mon, 09 Jul 2018 02:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=IZDErLcIa56acnGokT+vwYyZ2fZu/MwZIhcghR9qyjw=; b=PFnmUN/WxKpW4e4KIniSwkb/Ei3n1mbFECrcEPXqaWSTAbrjwf9PD+SYTSC5XJ1aN6 dt5LJehmZpYJSBraB30meJp+He6mvQCJvdShnUnREhf/kayEETUQxpEsKCXCxQc163hI 4AJqGsRGx7hc7xYnIM36AsJbLDRZvjkWS/IOQIibCMDnDyjV7fUJEQGn6ujRylDVKtEq nhoYvgg/PaeKNnzT2bI13PBm5lMQwsVIElboHgThyRrHL1E5lCV6lq/PB3Uy4KLTpcGW Mx4UJFsM2gMZCGZGWJczdurVxpvRYd+5rRHwfnMtqoFOzR24pEI0z3EVpAwW9mBy8QAN ws6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=IZDErLcIa56acnGokT+vwYyZ2fZu/MwZIhcghR9qyjw=; b=cw05vcnWhJlnzN0AwsN0tLQw73Wh0+/wERHoxMLUbG+bDgLM48QBUZKbA59ps95BXe ntluCzeC0rQRTSITqkP1MgmeFhAhzD0FsgbnzygkZp6Z5FfpjrG8SSWKqZLjCCGhSvJe yzMNcb3zpQncX8vC1KRq1lvwr7rVpt56kste5l0L9eaDzkX0IErvrx7+ytaRR2MvGlL1 3itkOgmYS/MywONx9EERb8AJZ0KKxIatt8gjYdkMBuGVXojL49jA4VWZBeCQpmFk0+Sy xD1R4CbhSMAh3yBeOJ9qRpo2Xjn1koGQiRVuaTXjE5+44+BpNOBty9UTbELMht+goY74 h/mA== X-Gm-Message-State: APt69E34QXYldrTQF2/t0vvodOwr4nn1Dy9LJ0wdr79Q0sS8eST7yEg4 CoNpjStAl9oAv7o2+H31PTZGX9WX X-Received: by 2002:a19:d313:: with SMTP id k19-v6mr13190873lfg.29.1531128153351; Mon, 09 Jul 2018 02:22:33 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id q65-v6sm1447807lfb.80.2018.07.09.02.22.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 02:22:32 -0700 (PDT) From: Esben Haabendal To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: linux-i2c@vger.kernel.org, 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 References: <20180523095623.3347-1-esben.haabendal@gmail.com> <20180523095623.3347-3-esben.haabendal@gmail.com> <20180705063229.sr6jplg63ybyzxta@pengutronix.de> Date: Mon, 09 Jul 2018 11:22:31 +0200 In-Reply-To: <20180705063229.sr6jplg63ybyzxta@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Thu, 5 Jul 2018 08:32:29 +0200") Message-ID: <87tvp8ahm0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Uwe Kleine-K=C3=B6nig writes: > On Wed, May 23, 2018 at 11:56:21AM +0200, Esben Haabendal wrote: >> From: Esben Haabendal >>=20 >> 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 genera= ted >> to kickstart the DMA read, and a timeout happens after DMA_TIMEOUT (1 se= c). >>=20 >> Fixed by setting the DMAEN bit before the dummy read. > > Does this fix the problem or just narrow the race window? It should fix the problem. /Esben