From: Pierre Yves MORDRET <pierre-yves.mordret@foss.st.com>
To: Alain Volmat <alain.volmat@foss.st.com>, <wsa@kernel.org>,
<robh+dt@kernel.org>
Cc: <mark.rutland@arm.com>, <mcoquelin.stm32@gmail.com>,
<alexandre.torgue@foss.st.com>, <linux-i2c@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <fabrice.gasnier@foss.st.com>
Subject: Re: [PATCH 5/5] i2c: stm32f7: indicate the address being accessed on errors
Date: Fri, 5 Feb 2021 15:59:44 +0100 [thread overview]
Message-ID: <7b614b4e-2bea-2002-0be3-4b3a0d15a4e9@foss.st.com> (raw)
In-Reply-To: <1612515104-838-6-git-send-email-alain.volmat@foss.st.com>
Hello all
Looks good to me
Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
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 <alain.volmat@foss.st.com>
> ---
> 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
--
next prev parent reply other threads:[~2021-02-05 22:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 8:51 [PATCH 0/5] i2c: stm32: filter binding support & debug info Alain Volmat
2021-02-05 8:51 ` [PATCH 1/5] i2c: stm32f7: fix configuration of the digital filter Alain Volmat
2021-02-05 14:58 ` Pierre Yves MORDRET
2021-02-12 10:36 ` Wolfram Sang
2021-02-05 8:51 ` [PATCH 2/5] i2c: stm32f7: support DT binding i2c-analog-filter Alain Volmat
2021-02-05 14:58 ` Pierre Yves MORDRET
2021-03-18 10:51 ` Wolfram Sang
2021-03-18 10:54 ` Wolfram Sang
2021-02-05 8:51 ` [PATCH 3/5] i2c: stm32f7: add support for DNF i2c-digital-filter binding Alain Volmat
2021-02-05 14:59 ` Pierre Yves MORDRET
2021-03-18 10:54 ` Wolfram Sang
2021-02-05 8:51 ` [PATCH 4/5] ARM: dts: stm32: enable the analog filter for all I2C nodes in stm32mp151 Alain Volmat
2021-02-10 8:39 ` Pierre Yves MORDRET
2021-03-29 9:16 ` Alexandre TORGUE
2021-03-18 10:55 ` Wolfram Sang
2021-03-18 13:16 ` Alexandre TORGUE
2021-02-05 8:51 ` [PATCH 5/5] i2c: stm32f7: indicate the address being accessed on errors Alain Volmat
2021-02-05 14:59 ` Pierre Yves MORDRET [this message]
2021-03-18 10:58 ` Wolfram Sang
2021-02-05 14:57 ` [PATCH 0/5] i2c: stm32: filter binding support & debug info Pierre Yves MORDRET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b614b4e-2bea-2002-0be3-4b3a0d15a4e9@foss.st.com \
--to=pierre-yves.mordret@foss.st.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh+dt@kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).