From patchwork Thu Dec 10 14:27:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 341050 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp5743078ejs; Thu, 10 Dec 2020 07:39:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtUrDDjJXTSO2QkGEsaGp+O9Fqf8nvTnGeMUOytSUEVSdXVpSNTwBK8rYsdzoEMd9kB8G/ X-Received: by 2002:aa7:c403:: with SMTP id j3mr7268644edq.217.1607614783235; Thu, 10 Dec 2020 07:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607614783; cv=none; d=google.com; s=arc-20160816; b=dFdxw6+fq3xW55lWCAP48w2VZ3pMBrdr8T+TOs1qAFiFqFh8Q5TC+WW0Ar8SV+3Fmu 4N7K5JbfRLj5pOMukyx5DQZSgZwYDhr+/FfafN6thy2JLR5HuFE/e0gjqf5cG7huA9QC krbIxfmiFz1NT+QhS/S6XjXaUdJSqdc0f2nhzKdDIUO6dFYsY7seHBZrJPybD6mR+LvF B+B9dKZ7sRVfpzms5F6NjKWFO0Y7b6AHdaCfvl1DQYLdvNkvYbD/AXynG08dABPgLPge dGKiRb8cn/OzBSijj8qa9L84yWIPisvjUAdgU2DAa5G3WzqvcFsV9KnLbrPVDmFoz0Av 1ABw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=ud6y8jvMS+OVBkG/a4X32kZs4zV0ommElVUtS0V2M9o=; b=rWJIfeKdUXwUl1CXgrO40QDqQtp0vr1N4hE0R+nIldhuMFKJtlk82g3D66HhjjCVTd q/JRlc+WQDuy5aahwDu2gygUDVnGh+fMIApzDLKRTWCMye0gvXNLRiw0xpe1OinPU9MU 03lhjGSnf9IhdKXVcOXOgl2iX5uG1KG+FGGVvep0KKVSDuRTK4ibp9PwaYVP/rO8MMUR 1540F7NJ2yFUX6rcRvfOsRDWjw39ca1nV9amBnQtz41sJn5tkaaRted9WMaGwI5TQtlj PMIfY3lsKgzhnKxzNuVf8b3+gfSMRUB1VjI/CcO3YG+cGFbLJF+NVU8ipq4XqbHMqfsR JF4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm18si1049654edb.422.2020.12.10.07.39.42; Thu, 10 Dec 2020 07:39:43 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390527AbgLJOkz (ORCPT + 14 others); Thu, 10 Dec 2020 09:40:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:47994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391151AbgLJOks (ORCPT ); Thu, 10 Dec 2020 09:40:48 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loic Poulain , Robert Foss , Manivannan Sadhasivam , Wolfram Sang Subject: [PATCH 5.9 68/75] i2c: qcom: Fix IRQ error misassignement Date: Thu, 10 Dec 2020 15:27:33 +0100 Message-Id: <20201210142609.374492033@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142606.074509102@linuxfoundation.org> References: <20201210142606.074509102@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Robert Foss commit 14718b3e129b058cb716a60c6faf40ef68661c54 upstream. 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. Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver") Reported-by: Loic Poulain Suggested-by: Loic Poulain Signed-off-by: Robert Foss Reviewed-by: Manivannan Sadhasivam Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-qcom-cci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 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 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;