Received: by 10.223.185.116 with SMTP id b49csp2224487wrg; Thu, 22 Feb 2018 10:03:54 -0800 (PST) X-Google-Smtp-Source: AH8x225al8NzupxihtlwBbNdtyoebJc4CxUSk0YsU4J3lVkZyqINdNE8mbhsrerCoQkb3Atutqg3 X-Received: by 10.98.137.90 with SMTP id v87mr7708727pfd.80.1519322634550; Thu, 22 Feb 2018 10:03:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519322634; cv=none; d=google.com; s=arc-20160816; b=skVdlbcWxypfcnEB/3Ko9AEGi7TcwRsnuG4bHkfcb+RYx/61VvMMqYbMbj3SgNQIPa 8AsssDdmSnQoR3umyBWzaHGLyAKuAdJOXuqrPVGT6ti6y12T2Gy3FTVcgnllEXD0NvXB aopEmPJ38c/UDNccnRbfxNRQGF96qFrCgmf05obeLLt0VWaTwxsoBUMqnGPkzVANeNw3 pWt/S4BlkDJZh2N02MZM5JC4/MikvlW5lvXLuhcgutd1uH5FO5cnWoJVbfXoml+OgHeK hyoPGW5N155hAdAJpPM0DyWDq5itCTrcfFRN/73xyYbA2RhMceN6Fg6+gC/LgY79t0WT bvkQ== 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 :references:in-reply-to:mime-version:arc-authentication-results; bh=PTnatQnE4hL2ulwb0yJ11rbacFZofi7QUbtzBBCve94=; b=QImKHBku4BAgaOqCJujJHqxNQ+CyO5v/HLVuk31i/Yx5+UVI8y4w+OeoZITnb3D5zg kUXvO0cURh265dMTaSk1MIj0YO0Hd/YRD3yYDRTimmYlYzctrb6M8Nz+jCXOukKmrAGN XAYXCD6pJUOErsmfZlaL514kz+K0ENZ619CF9yKab02ugW11l+ArOqPIc1lQ5SKbnHAU noUwxJb+4+/RbOrGtbElTzNtIHJ5bUwg4l/vtMeJaO4eq1sy8MPHP74TXm6mWnjMsWIv VBDWZamCr+YVL2yk8DkjSjSziZLY8EOVTby7GlEvlGTPu2PzWPahUsrSzcIDUlU0ZhkQ uChA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a69-v6si376331pli.251.2018.02.22.10.03.29; Thu, 22 Feb 2018 10:03:54 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933581AbeBVSCo (ORCPT + 99 others); Thu, 22 Feb 2018 13:02:44 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:55191 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933478AbeBVSCm (ORCPT ); Thu, 22 Feb 2018 13:02:42 -0500 Received: from mail-ot0-f197.google.com ([74.125.82.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eovCb-00055j-5O for linux-kernel@vger.kernel.org; Thu, 22 Feb 2018 18:02:41 +0000 Received: by mail-ot0-f197.google.com with SMTP id v63so2610171ota.12 for ; Thu, 22 Feb 2018 10:02:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PTnatQnE4hL2ulwb0yJ11rbacFZofi7QUbtzBBCve94=; b=VqzNxQcvl7Gkkg91ViE8k6A/q75uQxPXwneypNx5PiNs3npUH1LBsoQB7AW1LcL5Bq 09gJr/jfuWY81CNu6H69Et5a0MPlGrD8zfa8ALQLk3bZQsxQ6u7EYBimLTJA2SOTbuVK yEer7I184GtgEzooS7U9AsvGcwanCt78SY6Rypvd2Xa7lqH0oH39cuVr1l7ZMhOQadMF hNYfOBxky30w8RPG0Rxl20cULh7K+wu50Gu5MjjORPgGiHEHODEjfXPVPeE1mdW/ND9u ImJiiNwsvsJez50GqFDwZct/c57HbmCQ6sHc5p7YysJWHNTBasD1TfZzvmML7iAide9K FBmw== X-Gm-Message-State: APf1xPAjoacrq6TDWTqTG+TkYIMi8sfd4UKDoIsQ/EXZrvvKljIyVmRi iGbAhLBzx/roEgtNyGY3EN5UNKC8ur8sq3KaGhktD79ESJFjuLXOyEQSCdKV4GxcDDLaCYoVjot +IGQ3C/amhWmpGZd7L+XzlFbzpcQZ7vsNsDdjCq7dk2N9DEbsFvwMaEvJQQ== X-Received: by 10.157.114.199 with SMTP id d7mr5557102otk.4.1519322559908; Thu, 22 Feb 2018 10:02:39 -0800 (PST) X-Received: by 10.157.114.199 with SMTP id d7mr5557069otk.4.1519322559498; Thu, 22 Feb 2018 10:02:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.188.141 with HTTP; Thu, 22 Feb 2018 10:02:38 -0800 (PST) In-Reply-To: <1043d995-1448-3c0c-8052-8c31d18343d1@caviumnetworks.com> References: <1516253964-4615-1-git-send-email-george.cherian@cavium.com> <1043d995-1448-3c0c-8052-8c31d18343d1@caviumnetworks.com> From: dann frazier Date: Thu, 22 Feb 2018 11:02:38 -0700 Message-ID: Subject: Re: [PATCH 1/4] i2c: xlp9xx: return ENXIO on slave address NACK To: George Cherian Cc: George Cherian , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, wsa@the-dreams.de, Dmitry Bazhenov 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 On Tue, Jan 30, 2018 at 7:28 AM, George Cherian wrote: > Gentle Ping on this series. I've been using these on a few Cavium Sabre boards, which previously had an unusable system interface (/dev/ipmi) due to timeouts or just enumerations failures. So, fwiw: Tested-by: dann frazier -dann > On 01/18/2018 11:09 AM, George Cherian wrote: >> >> From: Dmitry Bazhenov >> >> Fix the driver violation of the common practice to return >> ENXIO error on a slave address NACK. >> >> Signed-off-by: Dmitry Bazhenov >> Signed-off-by: George Cherian >> --- >> drivers/i2c/busses/i2c-xlp9xx.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/i2c/busses/i2c-xlp9xx.c >> b/drivers/i2c/busses/i2c-xlp9xx.c >> index b970bf8..6d78cdc 100644 >> --- a/drivers/i2c/busses/i2c-xlp9xx.c >> +++ b/drivers/i2c/busses/i2c-xlp9xx.c >> @@ -324,7 +324,8 @@ static int xlp9xx_i2c_xfer_msg(struct xlp9xx_i2c_dev >> *priv, struct i2c_msg *msg, >> dev_dbg(priv->dev, "transfer error %x!\n", priv->msg_err); >> if (priv->msg_err & XLP9XX_I2C_INTEN_BUSERR) >> xlp9xx_i2c_init(priv); >> - return -EIO; >> + return (priv->msg_err & XLP9XX_I2C_INTEN_NACKADDR) ? >> + -ENXIO : -EIO; >> } >> if (timeleft == 0) { >> > > Regards > -George