From patchwork Thu Nov 26 14:53:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 333019 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1380820ilb; Thu, 26 Nov 2020 06:56:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5cIXvf1CKgF94o5DIX8haMKXTmR/GQVgqvT+AuCqRoff+klRK+rR7baz03fi1xvH/FNCN X-Received: by 2002:aa7:c886:: with SMTP id p6mr2901191eds.207.1606402600282; Thu, 26 Nov 2020 06:56:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606402600; cv=none; d=google.com; s=arc-20160816; b=LgSx9rxTtX25OSDPz3i1hU159LousDvdeC1kypl6d1IXcQp4Wlf4KtGoVB7mKld06T WCb7xiM7cXofR6Me7rxE6nooI8E5+7No1jaYRpyD++IYXmuL1S9T4wIJ2kGXzjfAiUJT D2lAV4Xq5iCQSX7Ei+mm+myMek+xzhK3WSmuN+tYR/FaKzemBaVE2OeusNGUL3dVbNhQ EFsM4DVnnGXDxqZCy0mOLE6veOqpJsR0h6r+tMx99uzRmyZmpd/fi+r3saGUV0B932yV JkhBTmRumlerjJr9JP0iCnrIqKvw8TMow3/TP+UvNZNbwftTqsVBZdvVXYCiqE7B15NT 5liw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=DoEwWU3FcyAaL+Tym7arwyArkXDvjphvUtIZys9Wej0=; b=LIaF0VMr/pBZknzAtNhzYgW82Llvb9Ta1UnyTiGOY3YWjcBjA7ff3Gh9BruU+sMjZp sctVUs2aBCITVvIcC9szuFLf8wk2lqSaVw1KftHqP/VaYmbdQlZ9RcyujIrW3/jhtfsp SPasLP0w8NuXfFXgFq2JZtFO193s/rvklnXXsEhT0qqMC4Cnm6iRyMCd6s2IJ2A/gKuD 24OCf7/m1oUprKz1LjFLhCD7NSqtw+o+FhYAZd7UXSriZ++LMAq2+aCMkkQ7RVmuSOJ0 /2b1XQu+3yrpApq5Pdo+pZnaacUB/GRESTaKii0ISCrHMMFBwRNmR7yVYQS2jl2XLvGs me5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kD3eRsvV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si3076224ejd.689.2020.11.26.06.56.40; Thu, 26 Nov 2020 06:56:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=kD3eRsvV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391143AbgKZOyX (ORCPT + 15 others); Thu, 26 Nov 2020 09:54:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391130AbgKZOyX (ORCPT ); Thu, 26 Nov 2020 09:54:23 -0500 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9308C0617A7 for ; Thu, 26 Nov 2020 06:54:21 -0800 (PST) Received: by mail-ej1-x641.google.com with SMTP id mc24so3318999ejb.6 for ; Thu, 26 Nov 2020 06:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=DoEwWU3FcyAaL+Tym7arwyArkXDvjphvUtIZys9Wej0=; b=kD3eRsvVQnTG7OCxCilmXrra/m4FPpCrW4jVWjS7Q4OZC94Ih7CdmxWJOzOChiw8jD SPIG0zYtbau4klIa1W9gBe3c7cb1hpIhWdNeRoYPIMHJobnPAkC0WPkeltRX8BGRTEOa 6h5LsfpY4GbzmWlDMRM5kJgfy2+2mLQBDxx77R3aSMzdH8N/qDRnUzVIkVwa4X+DR8/G 4qNtyFPGbtTIexPxHwWKdPc3zUK8DZ+HkL2DyCrQXHosnAk7iecyxj9GEVUKZgbIpBmx qMN8hpHcrQfC4dfSujbPtnpzrKOEZ0qGzYDRqZ7377sovm15KETBYofWffrCZvAGgodk 2w0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=DoEwWU3FcyAaL+Tym7arwyArkXDvjphvUtIZys9Wej0=; b=mzyRJAzbpsBkbh3Zgfukfb3egL8aGSTOHYwsotbeKdeAX923d+6Ci7NMe1Fh2GxVgC aWgmMc7Ev9L1SCG5FpzghswJNUSaaHRthfo+2vhqzkgVmCPq9DpMsBIOTGWOWIQ5A8jN KwdHXINGZwt0vU8tdr2d0YqTcTX2d35ghYETdf799GeqEiO5pBbqB5LqAIzXN1UHq+Jn GVGI4WH7zV3BEZgEBH1ujNi03g1bAol/qmjO+vJoSb55SRlxJ0hdwltHmq0MaC1W+2jA B8VBPrSRQW8kLl9ybA6XxQLNcfSlhB4Hokf6dH01GJptnbVtG+2Dlma635X2OGi2mNLY f3gw== X-Gm-Message-State: AOAM532GPoVcLi8MZkb76ORMEQ3xfNB1szh/KNuVvT+VVYP0lj8D2me5 dg4EbfraCO8dRHNchG0YnPOkEw== X-Received: by 2002:a17:906:d0cd:: with SMTP id bq13mr2937055ejb.372.1606402460536; Thu, 26 Nov 2020 06:54:20 -0800 (PST) Received: from localhost.localdomain ([2a02:2450:102f:d6a:a9ae:e75d:ff39:a0bb]) by smtp.gmail.com with ESMTPSA id t10sm3215105eji.61.2020.11.26.06.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 06:54:19 -0800 (PST) From: Robert Foss To: loic.poulain@linaro.org, robert.foss@linaro.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] i2c: qcom: Fix IRQ error misassignement Date: Thu, 26 Nov 2020 15:53:21 +0100 Message-Id: <20201126145321.18269-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1. Suggested-by: Loic Poulain Signed-off-by: Robert Foss --- drivers/i2c/busses/i2c-qcom-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index f13735beca58..1c259b5188de 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -194,9 +194,9 @@ static irqreturn_t cci_isr(int irq, void *dev) if (unlikely(val & CCI_IRQ_STATUS_0_I2C_M1_ERROR)) { if (val & CCI_IRQ_STATUS_0_I2C_M1_Q0_NACK_ERR || val & CCI_IRQ_STATUS_0_I2C_M1_Q1_NACK_ERR) - cci->master[0].status = -ENXIO; + cci->master[1].status = -ENXIO; else - cci->master[0].status = -EIO; + cci->master[1].status = -EIO; writel(CCI_HALT_REQ_I2C_M1_Q0Q1, cci->base + CCI_HALT_REQ); ret = IRQ_HANDLED;