Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2609816rdb; Wed, 21 Feb 2024 13:14:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+ddUtkw4TnMjthiXJ9YhKutuRpkowRBbCZ67gAFjCtv53HTBVLv/kQ/yFskLYdk2Wu/H6xAjNJuCefhGJz/RXTC4PM+LV6EQ5RMzG3w== X-Google-Smtp-Source: AGHT+IGGRVbETSte5C59EFH5jlaJMrltZoNMAmslLrLW727Y/vHpmtKXHGt8c5W8EFjxlp3a8M72 X-Received: by 2002:a05:622a:48b:b0:42d:f362:8c8e with SMTP id p11-20020a05622a048b00b0042df3628c8emr17913891qtx.23.1708550098162; Wed, 21 Feb 2024 13:14:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708550098; cv=pass; d=google.com; s=arc-20160816; b=ZwEcP6DG1vxmXWhXJ+x50RRG9zIVq8mg2/XYtBJXFDaA/hlI+MAKM1xr7NX9l+fwfb mf58baqeXlLUytHCPzn/7oet1b9J+UihCdYj6giu0H9GtdMfhy1SsFTP/epFUj/aLX3n vMtwK54LBEPJ8QBYolVL4Lld7Jv6mrR7b+EupdABCSJiQMyd5z2dLMzSw6A3eaauHTAO fOHTkBzaQycWAJqhynTq0RVJeqkcMtfthtQ/LPdlWbBUOUjaDnxzUAGrRhEqhYLtolJG vh1mwcSdUkT818GpjS1qVonddzFS7JG4NlWJpU35b6qlouPamQPr0Dv4AikL6aSz6vX/ jedA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3wwqdMhJ+r4fv2Ub8mzSnio7TybVnllw9FzEz6nnm/A=; fh=fkIdEBMqS80pMkGZYPYtL+iY73X158bfeex0G0PF8JQ=; b=i6CkeR98wC9qLzmBUDL2Rqf2QGljip5QnqFcaYGQ+qPWdBi1Viafn7Hx8L1Qq9cXVy gfGFDyCTkvV90U6P7BihvK49WAR9c6Aih2u9jg65AZPr3aQ7+1uYT0r2kNUqP5tFtk2d YujZH8PZiNXz5T5YfS8B0DW88/sMsaCDlgWoTX0Jm5whGLStykxxPPWqMcruCH0fV6sR MuM8FzglpzomMBezrrAiuMxY9KE8O1v1rkGxh6bENX/3g1Ax9PVBJWI6zzSUWAow3E3+ ppspBqQy6oV87jnH4lPWP3vR7FFtTwWswYf8EkDiOPsXJdokQ4ck4Hf1RHvUO4+kFZ/0 G62A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvD9pA4A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s2-20020a05622a018200b0042e32844ed9si3421618qtw.129.2024.02.21.13.14.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:14:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvD9pA4A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B9CAA1C24503 for ; Wed, 21 Feb 2024 21:14:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B7DE126F31; Wed, 21 Feb 2024 21:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gvD9pA4A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F60183CD8; Wed, 21 Feb 2024 21:14:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550091; cv=none; b=taUGbCYLxD3LNj8wwx6D5L5UVYNwQoccz1mFjK4y7T4k2qra1K/Z6MugS94m3onp9qUmiq0dIuH3a+Q57nOegUGkdgv/EguyK+29pr3XgKX9apwPsjMwanDu7hYgSJ4Onj5GnAhPctK9HJDSxfexIcwJSfJ5WjPw3X8iS/sq1FE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708550091; c=relaxed/simple; bh=+EdDNbEsAKZRG0zuuQG5RTrKozfYoT2Jo7rs3XByyDY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UknOA7iEzZKmCLXtAJeLWOy441NSsONtdM/64isb2A+nrHU1dMAd85i9KVaVv/F1+DL7j+zHEi0PURXe2ogOGtnXP3yCnjPJwgH4jadaU6DYVA21o2T5ghvoi+YbuTvxhfbEZCLVJxNShvBkoPG+ffP+dyctz5A9op/3+xp/JmE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gvD9pA4A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB035C433C7; Wed, 21 Feb 2024 21:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708550090; bh=+EdDNbEsAKZRG0zuuQG5RTrKozfYoT2Jo7rs3XByyDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gvD9pA4AqNbNBkzO7LgRGJtM3iQqVlQPGMqpx3Omqi+g54/KXwHnkereA0ovaKlm4 WseGRIOQH/DIChpAJuWH5mKcyQCFhcANqueAgHtTt2Xx1R7tSL9pbLeWLjmLKKlXSF oM9wcJ2vWNtAkW/KRr5V7IcVGmQWdbn7zmjK2coqK5AhMg+S1djDUlGAxaqFonyTc0 lqCvXAW3xe3Yf5R8Tq7D3mIoEJN3Mf6C8J7zQC1dClU8VJOqXGQn2xIR6pjfxKw0OP m33qeF22uontgE1lJ8tHHoYW7W3QmXzxQ1J2lyV6gEuVIsjVMxlZoesDIZptNvhg0W goVCLPc8/ET4Q== Date: Wed, 21 Feb 2024 22:14:46 +0100 From: Andi Shyti To: Tommy Huang Cc: brendan.higgins@linux.dev, p.zabel@pengutronix.de, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, benh@kernel.crashing.org, joel@jms.id.au, andrew@aj.id.au, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, BMC-SW@aspeedtech.com Subject: Re: [PATCH] i2c: aspeed: Fix the dummy irq expected print Message-ID: References: <20240216120455.4138642-1-tommy_huang@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240216120455.4138642-1-tommy_huang@aspeedtech.com> Hi Tommy, On Fri, Feb 16, 2024 at 08:04:55PM +0800, Tommy Huang wrote: > When the i2c error condition occurred and master state was not idle, > the master irq function will goto complete state without any other > interrupt handling. It would cause dummy irq expected print. Under > this condition, assign the irq_status into irq_handle. I'm sorry, but I don't understand much from your log here. Do you mean that irq_handled in aspeed_i2c_master_irq() is left with some states that is not supposed to have and then you end up printing here: dev_err(bus->dev, "irq handled != irq. expected 0x%08x, but was 0x%08x\n", irq_received, irq_handled); Can you please explain better? If that's the case, wouldn't it make more sense to check for bus->master_state != ASPEED_I2C_MASTER_INACTIVE) earlier? And, still, If that's the case, I believe you might need the Fixes tag. It's true that you are not really failing, but you are not reporting a failure by mistake. Thanks, Andi > Signed-off-by: Tommy Huang > --- > drivers/i2c/busses/i2c-aspeed.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c > index 5511fd46a65e..ce8c4846b7fa 100644 > --- a/drivers/i2c/busses/i2c-aspeed.c > +++ b/drivers/i2c/busses/i2c-aspeed.c > @@ -445,6 +445,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status) > irq_status); > irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS); > if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) { > + irq_handled = irq_status; > bus->cmd_err = ret; > bus->master_state = ASPEED_I2C_MASTER_INACTIVE; > goto out_complete; > -- > 2.25.1 >