Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4926456pxv; Tue, 20 Jul 2021 14:46:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqAw2pjavtxuudj3oKhaDREurbRJ//+mjoQTi0wEIW6XyXGV5fSdO2oEbTYKhyjpy8o0n3 X-Received: by 2002:a5d:9d07:: with SMTP id j7mr24053566ioj.33.1626817584525; Tue, 20 Jul 2021 14:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626817584; cv=none; d=google.com; s=arc-20160816; b=cNU0Xgy8uTw2cpybyDvQsjxd4ZxJfQMpFQ7zp/w2HAa9SBzfhOsSCDOxm1B4vez9GO pIGRCDiMt3CjBJ8Qg9/SHKxNz4snT0Ffjj1DzLOMpZxotAP5T/aGbrD/ICy59FPwI86K HuFuhIVkwSwkscWKZ0NLeO7oMGLORJ/IZ/+PLjq8+90bA0td7CFtMakzmAHt5nbYTjnt 7mSiadGkMy8dmR6CtjCFoGs9Ph+27sZPKwQqIA5Il4XFo5LNq2ziLdbJ0gaav+o1DsSz D+naEBrCQ1QQ+UvoXdkutKm0uziFW4PjCEfo9Z8XyIcPGIn4byAgxIj8EP809POi1Uvp aiTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=h5XEosukgF25k6st1HMBLCI5Q/k59LxbfCM5pDxEvgY=; b=FYLAqDavCh9MeGhcmuon4/sU9G1uHbqLYmBZPRKCyNrNX1LpDj/Lase2nBRmT9VtCi 6oWxSvnfwTiF5pFqbPTA12c32cYnq+v/a7tgtleAmPU62YSVgQl16UHzOkYrzhWPrO0U vb1kBNZpVOLVIi7TVPKd4fQqt0RW9vJ5eTLaRDk0q7wn5imTXJe+X0MJKQRdjDgfg4KE 9E7BJB/XJTfaOUM+6Zq4FUqRJUEDz1z1cG3cARa0+bTUoRQo5vdTkrAItwzvJJiTM4xw xCCPabIrFz6gjQUU22CsOKcLlInQ+bRdjq6pWDsz5klvwH/r6c2W+sEwjz6z45ZT0pIC 0fhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=gLsbZzKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si24180635ios.10.2021.07.20.14.46.12; Tue, 20 Jul 2021 14:46:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=gLsbZzKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231975AbhGTVDW (ORCPT + 99 others); Tue, 20 Jul 2021 17:03:22 -0400 Received: from phobos.denx.de ([85.214.62.61]:48732 "EHLO phobos.denx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbhGTVDT (ORCPT ); Tue, 20 Jul 2021 17:03:19 -0400 Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 6F9188203B; Tue, 20 Jul 2021 23:43:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1626817436; bh=h5XEosukgF25k6st1HMBLCI5Q/k59LxbfCM5pDxEvgY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=gLsbZzKhLgh8UO5gw1Eh2lo3dVKEQd0xD7vML9gdyraHkDwUJWBv+k2HXCPtIP/dD kQeWXRf4bCccf4tLg/93uPkr1YaEpzx0FVIYczLLZ/qH2HsSxIf/ukZj4qLMBgjB5M WYek5HU8pRipqyd7isYGBku+EMjjZMKQu+XEtnwnNSLpaTaqErQgmZql63hgfM4pw7 LxIRuJm3vCP56TYOz2eCq9krVvSfI449FsB0cCG7L670ysjDs4q/XKsQh/ei73srrE Mvlf4xo7dFpy2GiVJ8Z/nyM9dUCgivZFF0E5MpJKL6oF3nNQ2QRtY/6Uu/69LMZUWI DyvnpMkkFqZPg== Subject: Re: [PATCH v2 00/10] i2c: xiic: Add features, bug fixes. To: Raviteja Narayanam , Michal Simek , "linux-i2c@vger.kernel.org" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , git , "joe@perches.com" References: <20210626102806.15402-1-raviteja.narayanam@xilinx.com> <95162fd0-10e6-2bc6-4079-899ac26f66ce@xilinx.com> <0c51785f-9763-aebc-a9ea-04337ad1accc@denx.de> <45aa8d2b-a077-32a2-0608-8f20a5b807a8@denx.de> From: Marek Vasut Message-ID: <328f6c4e-ff0b-c88f-d246-75b493b67a9a@denx.de> Date: Tue, 20 Jul 2021 23:43:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/20/21 4:19 PM, Raviteja Narayanam wrote: Hi, [...] >>> I have tested this again on our boards with eeprom and other sensors, this >> is working fine for us. >> >> Can you share details of how those tests were performed ? > > Stress test - 1: > Heavy ethernet traffic running in the background. > I2c commands script (like below) running. We can see visible stutter in the output as expected, but nothing failed. > > i=0 > while [ 1 ] > do > i2ctransfer -y -f 2 w1@0X54 0X00 r31@0X54 > i2ctransfer -y -f 2 w1@0X54 0X00 r32@0X54 > i2ctransfer -y -f 2 w1@0X54 0X00 r255@0X54 > i2ctransfer -y -f 2 w1@0X54 0X00 r273@0X54 > i2ctransfer -y -f 2 w1@0X54 0X00 r1@0X54 Could it be that you never see the problem because you always talk to one single device ? Do you also test writes which are not 1 byte long ? > i=$(expr $i + 1) > echo "$i" > done > > Stress test - 2: > Two i2c scripts running in parallel with commands as shown above with different bus numbers (as a result of mux), but going into same XIIC adapter. > This is also working fine. Could it be the i2c-dev serializes each of those transfers , so no race can be triggered ? > Stress test - 3: > Two i2c scripts running in parallel with same commands in separate terminals. This is also working fine. > > From your log, the race condition is occurring at boot time during i2c clients registration. I am starting a similar test at my setup > to reproduce this issue at boot time. Thank you