* [PATCH] i2c: octeon: Prevent error message on bus error
@ 2018-02-27 15:42 Jan Glauber
2018-03-02 10:11 ` Wolfram Sang
0 siblings, 1 reply; 4+ messages in thread
From: Jan Glauber @ 2018-02-27 15:42 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Jan Glauber
The error message:
[Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0
is mis-leading as state 0 (bus error) is not an unknown state.
Return -EIO as before but avoid printing the message. Also rename
STAT_ERROR to STATE_BUS_ERROR.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
---
drivers/i2c/busses/i2c-octeon-core.c | 1 +
drivers/i2c/busses/i2c-octeon-core.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-octeon-core.c b/drivers/i2c/busses/i2c-octeon-core.c
index 1d8775799056..d9607905dc2f 100644
--- a/drivers/i2c/busses/i2c-octeon-core.c
+++ b/drivers/i2c/busses/i2c-octeon-core.c
@@ -233,6 +233,7 @@ static int octeon_i2c_check_status(struct octeon_i2c *i2c, int final_read)
return -EOPNOTSUPP;
case STAT_TXDATA_NAK:
+ case STAT_BUS_ERROR:
return -EIO;
case STAT_TXADDR_NAK:
case STAT_RXADDR_NAK:
diff --git a/drivers/i2c/busses/i2c-octeon-core.h b/drivers/i2c/busses/i2c-octeon-core.h
index a7ef19855bb8..9bb9f64fdda0 100644
--- a/drivers/i2c/busses/i2c-octeon-core.h
+++ b/drivers/i2c/busses/i2c-octeon-core.h
@@ -43,7 +43,7 @@
#define TWSI_CTL_AAK 0x04 /* Assert ACK */
/* Status values */
-#define STAT_ERROR 0x00
+#define STAT_BUS_ERROR 0x00
#define STAT_START 0x08
#define STAT_REP_START 0x10
#define STAT_TXADDR_ACK 0x18
--
2.16.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: octeon: Prevent error message on bus error
2018-02-27 15:42 [PATCH] i2c: octeon: Prevent error message on bus error Jan Glauber
@ 2018-03-02 10:11 ` Wolfram Sang
2018-03-02 19:19 ` Phil Pokorny
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2018-03-02 10:11 UTC (permalink / raw)
To: Jan Glauber; +Cc: linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 434 bytes --]
On Tue, Feb 27, 2018 at 04:42:13PM +0100, Jan Glauber wrote:
> The error message:
>
> [Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0
>
> is mis-leading as state 0 (bus error) is not an unknown state.
>
> Return -EIO as before but avoid printing the message. Also rename
> STAT_ERROR to STATE_BUS_ERROR.
>
> Signed-off-by: Jan Glauber <jglauber@cavium.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: octeon: Prevent error message on bus error
2018-03-02 10:11 ` Wolfram Sang
@ 2018-03-02 19:19 ` Phil Pokorny
2018-03-03 19:37 ` Wolfram Sang
0 siblings, 1 reply; 4+ messages in thread
From: Phil Pokorny @ 2018-03-02 19:19 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Jan Glauber, linux-i2c, linux-kernel
On Fri, Mar 2, 2018 at 2:11 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
>
> On Tue, Feb 27, 2018 at 04:42:13PM +0100, Jan Glauber wrote:
> > The error message:
> >
> > [Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0
> >
> > is mis-leading as state 0 (bus error) is not an unknown state.
> >
> > Return -EIO as before but avoid printing the message. Also rename
> > STAT_ERROR to STATE_BUS_ERROR.
> >
> > Signed-off-by: Jan Glauber <jglauber@cavium.com>
>
> Applied to for-current, thanks!
Did you also pick up the i2c-xlp9xx patches for current?
Similar set of issues there.
Multiple people have now tested them and reported they resolve issues
with IPMI SSIF on ThunderX2 platforms.
Thanks,
Phil P.
--
Philip Pokorny, RHCE
Chief Technology Officer
PENGUIN COMPUTING, Inc
www.penguincomputing.com
Changing the world through technical innovation
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: octeon: Prevent error message on bus error
2018-03-02 19:19 ` Phil Pokorny
@ 2018-03-03 19:37 ` Wolfram Sang
0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-03-03 19:37 UTC (permalink / raw)
To: Phil Pokorny; +Cc: Jan Glauber, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
> Did you also pick up the i2c-xlp9xx patches for current?
Dunno which one of those you mean, but I reply to every patch to which
branch I applied it to so you can check it easily.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-03 19:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 15:42 [PATCH] i2c: octeon: Prevent error message on bus error Jan Glauber
2018-03-02 10:11 ` Wolfram Sang
2018-03-02 19:19 ` Phil Pokorny
2018-03-03 19:37 ` Wolfram Sang
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).