Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp297244imm; Thu, 6 Sep 2018 02:37:20 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda7VSgknYBUU5wbc6xf79pXb2yb6N8PNaEk30InGF+QfNXhXjm52eVu1rHFpUdv+4LP8dAM X-Received: by 2002:a62:e008:: with SMTP id f8-v6mr1935246pfh.208.1536226640781; Thu, 06 Sep 2018 02:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536226640; cv=none; d=google.com; s=arc-20160816; b=AtCXR00Q/zdUMaO6VVbKpbnfShx/gDp9p67anX+oLd7iChchq8tIQNaASfIwdwDkJt Z1Gv6djE0C6goSjae4So/qiszBucxZl4zoQ37cyodyNsZ+hSG47jckjJJFhjvJbELzt2 fCAbRggxipVhbp0kLqPXrpvt8rjFxe/78nuq1hXBwor2nxMGKm0cYNVk/EemeM+esPFC c+j7npldBdAyWc9PK1GNE9jKU/VLQ9085m300G5dLh8wv8SCUbgvRR3tpnsGLMD3SAos 49VKfhUAInjxykEOw0F0rctlHfJvX6EoGczjCAhcwtZkE+2oGPvQ34VXgxiUur5eDDY3 +0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HIrhOLwX+48sraw1dvPiPGC19YPahmb62sUBou1xt9s=; b=d20xQ8TvoDGOq40PYCUenJ4QZl4/V3HLPcsrQUz4I/2wIl5U5HAfbr/p4oC1Yanm3v fp76q+CnzJeIiagv/AMbXAm8brxW2vGzLqH9ciMvALAOvgovTkRKtIOd4blI2ALXigy0 G9qFt0wPVyODsh3Cr1iei72cJUyKuwaC3Tk2pN3tlAwQC3U9kczkrNWD4nq2YWxs3njp Tn0xs6bO6o5uEC3uz65VpWEjgE13nfkSCJPH0NzXZRdFs3gp/omJATDabOLvRRBYF5El /OUBDuqdaL3PO0xR/PGtLj1yc3PuvpTeG2W+6bqsOQwM0Fih7SubnSwoHfW8RGAZbCyS P1iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E3PXKowb; 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=pass (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 h3-v6si4339409plb.249.2018.09.06.02.37.04; Thu, 06 Sep 2018 02:37:20 -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=pass header.i=@gmail.com header.s=20161025 header.b=E3PXKowb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbeIFLmV (ORCPT + 99 others); Thu, 6 Sep 2018 07:42:21 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:36501 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbeIFLmV (ORCPT ); Thu, 6 Sep 2018 07:42:21 -0400 Received: by mail-qt0-f194.google.com with SMTP id t5-v6so11142637qtn.3; Thu, 06 Sep 2018 00:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HIrhOLwX+48sraw1dvPiPGC19YPahmb62sUBou1xt9s=; b=E3PXKowbak9wZoX2nHMu7iSjBAKDzfRuxoLI7ngzUli+JN54hNHFKW9n0x5BRN8Ta0 99bAwJ/2HXQ9qfXeShUYnTrauIgpN8xpMIz4XeZuMwV7Ot3ViZ5GOpuCGVppQH61Umy/ +Bvnc7pbmpiyc0S9YRSE7rwVN9OPj+xd0pvMWqQ2KQG1fwTPMemDSbsuVTRANnt+Bj0X FMFP/KnlJKJ7uliJ+RzXWoqjzBiQCON8Kub5DzE3RlCtJybi0Lme2hMzo1fPk7YeJldH 9Spl3J/bfOyH9Onxe12BSqYlobGayPIW1zD+C/WM6qtb/HsMASJs5vK2zSKQXOFnBW4U j50g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HIrhOLwX+48sraw1dvPiPGC19YPahmb62sUBou1xt9s=; b=FbOZ8wgH91YxOYShmnrpsXRSo8LnQLA6Eor9b4nPAFsYOOpT85agLyeZhec7nKz6zV H9c/wuDL18AtjfikdaUwqyc++vsIVelPkNaoNaOn+H50/v/JrYautRHFYvt8DpEAsprq cf1Zhpvw/ug1dMnsDlmSY1EihKxN8qXGXkagae7fDXAMe3+pChhreOYP92cZJWouhYsv UQIBTYHd1n+t49EMwxOCqSAWM89dcErYbmkAk1w/smguoZeWPqTkvNSJHlvIKar/yI+k nCgdAoNXokleM5HtIKihPuChZxhNn61bD9ge//zHhHFvAJA/c15voXEPdtFWH9aRCfjk 2liQ== X-Gm-Message-State: APzg51ATr/ZxdVgZRhCGOBIGXrU417KGjL9qC3TqHSY2Eunoopecddrk /8Ao/WvStj06eOLlBU4gJRiiE+ki0v06cI2qGss= X-Received: by 2002:ac8:11b:: with SMTP id e27-v6mr919259qtg.221.1536217700316; Thu, 06 Sep 2018 00:08:20 -0700 (PDT) MIME-Version: 1.0 References: <1535967671-7784-1-git-send-email-shubhrajyoti.datta@gmail.com> <20180904161114.GC5000@kunai> In-Reply-To: <20180904161114.GC5000@kunai> From: Shubhrajyoti Datta Date: Thu, 6 Sep 2018 12:38:08 +0530 Message-ID: Subject: Re: [PATCH] i2c: xiic: Make the start and the byte count write atomic To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Shubhrajyoti Datta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Sep 4, 2018 at 9:41 PM Wolfram Sang wrote: > > On Mon, Sep 03, 2018 at 03:11:11PM +0530, shubhrajyoti.datta@gmail.com wrote: > > From: Shubhrajyoti Datta > > > > Disable interrupts while configuring the transfer and enable them back. > > > > We have below as the programming sequence > > 1. start and slave address > > 2. byte count and stop > > > > In some customer platform there was a lot of interrupts between 1 and 2 > > and after slave address (around 7 clock cyles) if 2 is not executed > > then the transaction is nacked. > > > > To fix this case make the 2 writes atomic. > > > > Signed-off-by: Shubhrajyoti Datta > > Signed-off-by: Michal Simek > > I assume simply changing the order of the register writes won't fix it? No that is not possible. > > I also assume this is stable material? > Yes let me know if you want me to resend with the stable tag?