Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3200597pxk; Mon, 21 Sep 2020 07:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4Z/tYuyh+RkyWFGVQfNiLXIldM+UBs18RCutBjcjDleXpLOcxQ0ofQkCoOQo0tQ69noNW X-Received: by 2002:a05:6402:12d1:: with SMTP id k17mr51451743edx.323.1600699434013; Mon, 21 Sep 2020 07:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600699434; cv=none; d=google.com; s=arc-20160816; b=I+LS3PvCgHHfH4VsbwHF0IyK/LeBXg8NpyjELAuG4paAoA/G+k/j9RU0Ujv3PPTKgA gYX5lGxLBIKsmZjQV1a8U8pZTDo1SiPUuOnSB/LXJGNbNzHoT90k9M1kpyquggaL2Zx3 0swSaynneAfyd9gLKDMATTWRxwRvAr8YRbeCmlt13swXvPJ7DbcPqwBVAHmsz5RlfQ6+ ScT/1YG/M/3y6pUmte6iQEfyi/eLpL/ubm2IULDBT6NWTFrvL0Dyi9Mp88ViCKwI1mlA qbuATE+9J6U645aIYa7lo+NZQxhxwZgKlVniJZ3PQJiGzwRTvhFzFbKOPPJf4eb1J2Mp 3JOA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SQIGGXRiVnQ++SNGfDP+yA1gR40zc5SftcCdby9F9bs=; b=k8k+5fHIU+2cnmIAuEZd91BdZBm5z+JNVJF4OEvdBC+QqF1kiDtVrdXcZEDI6W2DkK zClj4bQVtg0MUGwM62C0+TrEYipz5h/V9xaKJ8APiCDllvJYorBJ38zh91YIm8GzdoZ7 Z74xDUIa5wk8pypDjgyA2vmD40fGBihxIK09NFhiH6hVO4RsDl+PJG/8eXy565766mXW s+nFrOwYuuBn/UMZk6bz+6gbcuMr+Y2UOP/RdJ03CixLwP72j7TLKT1NKWqzyRDFyZcZ Qct/DufFpR3cLJTq462BEx0G5CkL0eUCFgTPgN/Tldqrf6udZ/Eok/pMpUb0IZyF9jVy p6Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NdN31+VD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si9612296ejb.752.2020.09.21.07.43.30; Mon, 21 Sep 2020 07:43:54 -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=@kernel.org header.s=default header.b=NdN31+VD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgIUOkz (ORCPT + 99 others); Mon, 21 Sep 2020 10:40:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:49250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727837AbgIUOki (ORCPT ); Mon, 21 Sep 2020 10:40:38 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 69BFD235FC; Mon, 21 Sep 2020 14:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600699238; bh=oQsBq+CnHlR+V9v4/Bx2lGJ9uMC9L2bhMPGikWBh58U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NdN31+VDNl/JsvEB93oQt1XSORxCfgFNl5r6duyQ4CYZwgK0WRR6BK84LqniNjWmn DBqwYrwezij1LQDmXrbYP8sgl9jueGb/JGLNHtdbh5Gux/Lq9pXhxxVh0gPnpBdCS+ 9wU5prxTl8ohVDEIpIqd4kXBrGxIk1AVbOLhMGkc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eddie James , Tao Ren , Wolfram Sang , Sasha Levin , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.8 08/20] i2c: aspeed: Mask IRQ status to relevant bits Date: Mon, 21 Sep 2020 10:40:15 -0400 Message-Id: <20200921144027.2135390-8-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200921144027.2135390-1-sashal@kernel.org> References: <20200921144027.2135390-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eddie James [ Upstream commit 1a1d6db23ddacde0b15ea589e9103373e05af8de ] Mask the IRQ status to only the bits that the driver checks. This prevents excessive driver warnings when operating in slave mode when additional bits are set that the driver doesn't handle. Signed-off-by: Eddie James Reviewed-by: Tao Ren Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-aspeed.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index f51702d86a90e..1ad74efcab372 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -69,6 +69,7 @@ * These share bit definitions, so use the same values for the enable & * status bits. */ +#define ASPEED_I2CD_INTR_RECV_MASK 0xf000ffff #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT BIT(14) #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE BIT(13) #define ASPEED_I2CD_INTR_SLAVE_MATCH BIT(7) @@ -604,6 +605,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id) writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE, bus->base + ASPEED_I2C_INTR_STS_REG); readl(bus->base + ASPEED_I2C_INTR_STS_REG); + irq_received &= ASPEED_I2CD_INTR_RECV_MASK; irq_remaining = irq_received; #if IS_ENABLED(CONFIG_I2C_SLAVE) -- 2.25.1