From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE03CC64E60 for ; Mon, 19 Jul 2021 18:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB6A761186 for ; Mon, 19 Jul 2021 18:27:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382974AbhGSRn3 (ORCPT ); Mon, 19 Jul 2021 13:43:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236213AbhGSRV7 (ORCPT ); Mon, 19 Jul 2021 13:21:59 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E29CC0613B7; Mon, 19 Jul 2021 10:44:21 -0700 (PDT) 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 02023829E7; Mon, 19 Jul 2021 20:00:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1626717620; bh=HEXZweqgYJVklWr9hryJRs34EHGLfve8XO83yKZu7B8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=J+ywi6bQWKnsHS3gBtT5PAfJuzpX5IN4LBOfCQHf/gB1A3uRouP+KjX3FJ5C/1TQr 1+D+F8vIDSO32O6E2Z5+M3XkV0m1MZfejm+UdchLH/ET6AOIJAt3MxWYT4/4cnO3/J XVMdPsaEe3jfFjv7E4VKzP2R4UMXJ1Zc24EJ+yfdv6MCf+2o2NHMoaTxuWW1hAmuHt HjW2nuPFQzTKm4/YyKRzAj2oOsxgGNlGhGwuvz8cJuU1tumkSZTbsWeEWqpsF1MMUN um1GChfcTcVfcTCcy5CdrhzNAiTXXrUq2OAKzSWbQTmGca2e/4RmMepl32SpelDCGW +KRDWIW0ArSRQ== 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> From: Marek Vasut Message-ID: <45aa8d2b-a077-32a2-0608-8f20a5b807a8@denx.de> Date: Mon, 19 Jul 2021 20:00:19 +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/19/21 12:09 PM, Raviteja Narayanam wrote: Hi, [...] >>>> -Add 'standard mode' feature for reads > 255 bytes. >>>> -Add 'smbus block read' functionality. >>>> -Add 'xlnx,axi-iic-2.1' new IP version support. >>>> -Switch to 'AXI I2C standard mode' for i2c reads in affected IP versions. >>>> -Remove 'local_irq_save/restore' calls as discussed here: >> https://www.spinics.net/lists/linux-i2c/msg46483.html. >>>> -Some trivial fixes. >>>> >>>> Changes in v2: >>>> -Grouped the commits as fixes first and then features. >>>> -The first 4 commits fix the dynamic mode broken feature. >>>> -Corrected the indentation in coding style issues. >>>> >>>> Michal Simek (1): >>>> i2c: xiic: Fix coding style issues >>>> >>>> Raviteja Narayanam (7): >>>> i2c: xiic: Fix Tx Interrupt path for grouped messages >>>> i2c: xiic: Add standard mode support for > 255 byte read transfers >>>> i2c: xiic: Switch to Xiic standard mode for i2c-read >>>> i2c: xiic: Remove interrupt enable/disable in Rx path >>>> dt-bindings: i2c: xiic: Add 'xlnx,axi-iic-2.1' to compatible >>>> i2c: xiic: Update compatible with new IP version >>>> i2c: xiic: Add smbus_block_read functionality >>>> >>>> Shubhrajyoti Datta (2): >>>> i2c: xiic: Return value of xiic_reinit >>>> i2c: xiic: Fix the type check for xiic_wakeup >>>> >>>> .../bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 4 +- >>>> drivers/i2c/busses/i2c-xiic.c | 593 ++++++++++++++---- >>>> 2 files changed, 487 insertions(+), 110 deletions(-) >>>> >>> >>> Acked-by: Michal Simek >> >> I just tested this patchset on next-20210716 and the XIIC failures are still >> present, see: > > The probe of ' atmel_mxt_ts' failed as per the error. May I know the details of > your test case if you tweaked any i2ctransfers/added delays. It is still the same test case from a year ago -- Atmel MXT touchscreen controller connected to XIIC I2C IP in ZynqMP FPGA, both drivers are compiled into the kernel. Also, it is not the "new" XIIC IP revision, but older one from Vivado 2019 or so. > If it failed without adding anything, then please check whether the vivado design constraints > are correctly applied or not. They are, we already checked multiple times and the FPGA part is OK. > Also check if the other devices on the bus are detected and i2ctransfer command is successful on them. Note that this problem is very likely a race condition in the XIIC driver, so a trivial test like i2ctransfer on idle system from userspace is unlikely to trigger it. When the system is under heavy load e.g. during the kernel boot, that is when these corner cases start showing up. > It would be helpful to know if the device ' atmel_mxt_ts' is successfully probed with next-20210716 > without applying this patchset. Sometimes, the XIIC driver in current mainline Linux suffers from race conditions on SMP, so it depends. The MXT driver also has to be patched to avoid longer than 255 byte transfers, because that is currently broken with XIIC. > 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 ?