From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5833AC433E0 for ; Fri, 5 Feb 2021 15:01:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1235650DD for ; Fri, 5 Feb 2021 15:01:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1235650DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iv1V6XqoR+BUjDH8HudEsuz3+XUrbPhGb4NjhQ0uieI=; b=YPRTcF8BWjRX+P7IgrN5krcoO /yuQlKbQ7KGk7wzpGSru9wpiUgMxHquUMu/yH/gbaV7O/DUGIqlxs/dw8NTDN77OU5xJ56x/xu2w4 KstFHfrbed5ayV+n7tbvpbC5/rz/wOXglhfeZbh32EyQdtlJ63iHIozuzsAUQbzLBg54FmHcjyGyL ZfTmyM8AuvhihA+/DFx8s3rMcmN09bX1k5E7Ed0ghzZQzAvrQtGH3n+QjcJs6iPolkhEA351HAe5D gah9Vu7ZurcOFmbGBS/0ujiR6VAqmyw7RlJdArVOD0CawXIFDOGmovy4RqLqhcY75KiPtFybgIed3 Xad23iYyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l82aT-0004fa-2o; Fri, 05 Feb 2021 14:59:57 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l82aQ-0004eg-MO for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2021 14:59:55 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 115EofUK000447; Fri, 5 Feb 2021 15:59:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=Kmqf4H36jwosTyKxq7uvwp2sNs+1+ieQgvhe5qhxId4=; b=4mcLAf1tErID1vGA1tO01tiMTaOWZAAOTPbbfYAU8tP4Me1+VBOLlL2DxCxtS0pclT+S zTlJ/ied1CpzmUzuwXkdXdUqjHgE4LkcvCLZ8rJVg+tnWcrWp/FWhiHT79CHkWfOEHtt LlnvQiTmYXqaUrzoam/LrfPhD2DihB0X6DFDjXxUcAHL8BcUEKKDllIfdMmN5sbPihJa J51oi4QvmYP6udtt5vT/YQ25JwNmeJplbuTZf340LO3aqMGxyO77cComD0MkMZiKJ4Yx 2D9hb2Ops4csVpDGVV6aFIY30KeZCleETkmcTWrcJQxPyn66b27W1Txa9sA8ILdoOjsq wQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36ey7hh1v3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Feb 2021 15:59:46 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 85A0210002A; Fri, 5 Feb 2021 15:59:46 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6E66C2402BC; Fri, 5 Feb 2021 15:59:46 +0100 (CET) Received: from lmecxl1060.lme.st.com (10.75.127.45) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Feb 2021 15:59:44 +0100 Subject: Re: [PATCH 5/5] i2c: stm32f7: indicate the address being accessed on errors To: Alain Volmat , , References: <1612515104-838-1-git-send-email-alain.volmat@foss.st.com> <1612515104-838-6-git-send-email-alain.volmat@foss.st.com> From: Pierre Yves MORDRET Message-ID: <7b614b4e-2bea-2002-0be3-4b3a0d15a4e9@foss.st.com> Date: Fri, 5 Feb 2021 15:59:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1612515104-838-6-git-send-email-alain.volmat@foss.st.com> Content-Language: en-US X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-05_09:2021-02-05, 2021-02-05 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210205_095954_952923_C2DD1ED0 X-CRM114-Status: GOOD ( 20.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alexandre.torgue@foss.st.com, linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com, linux-i2c@vger.kernel.org, mcoquelin.stm32@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello all Looks good to me Signed-off-by: Pierre-Yves MORDRET Regards On 2/5/21 9:51 AM, Alain Volmat wrote: > To help debugging issues, add the address of the slave being > accessed when getting an error. > > Signed-off-by: Alain Volmat > --- > drivers/i2c/busses/i2c-stm32f7.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c > index f77cd6512a86..ef642fe1eb2c 100644 > --- a/drivers/i2c/busses/i2c-stm32f7.c > +++ b/drivers/i2c/busses/i2c-stm32f7.c > @@ -1602,7 +1602,8 @@ static irqreturn_t stm32f7_i2c_isr_error(int irq, void *data) > > /* Bus error */ > if (status & STM32F7_I2C_ISR_BERR) { > - dev_err(dev, "<%s>: Bus error\n", __func__); > + dev_err(dev, "<%s>: Bus error accessing addr 0x%x\n", > + __func__, f7_msg->addr); > writel_relaxed(STM32F7_I2C_ICR_BERRCF, base + STM32F7_I2C_ICR); > stm32f7_i2c_release_bus(&i2c_dev->adap); > f7_msg->result = -EIO; > @@ -1610,13 +1611,15 @@ static irqreturn_t stm32f7_i2c_isr_error(int irq, void *data) > > /* Arbitration loss */ > if (status & STM32F7_I2C_ISR_ARLO) { > - dev_dbg(dev, "<%s>: Arbitration loss\n", __func__); > + dev_dbg(dev, "<%s>: Arbitration loss accessing addr 0x%x\n", > + __func__, f7_msg->addr); > writel_relaxed(STM32F7_I2C_ICR_ARLOCF, base + STM32F7_I2C_ICR); > f7_msg->result = -EAGAIN; > } > > if (status & STM32F7_I2C_ISR_PECERR) { > - dev_err(dev, "<%s>: PEC error in reception\n", __func__); > + dev_err(dev, "<%s>: PEC error in reception accessing addr 0x%x\n", > + __func__, f7_msg->addr); > writel_relaxed(STM32F7_I2C_ICR_PECCF, base + STM32F7_I2C_ICR); > f7_msg->result = -EINVAL; > } > -- -- ~ Py MORDRET -- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel