[PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

dann frazier-4
From: Jan Glauber <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1754076

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 <[hidden email]>
Signed-off-by: Wolfram Sang <[hidden email]>
(cherry picked from commit 7c4246797b84e55e2dfaaf8a18033de9df7c18c1)
Signed-off-by: dann frazier <[hidden email]>
---
 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


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

Stefan Bader-2
On 07.03.2018 17:11, dann frazier wrote:

> From: Jan Glauber <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1754076
>
> 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 <[hidden email]>
> Signed-off-by: Wolfram Sang <[hidden email]>
> (cherry picked from commit 7c4246797b84e55e2dfaaf8a18033de9df7c18c1)
> Signed-off-by: dann frazier <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  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
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

Kleber Souza
In reply to this post by dann frazier-4
On 03/07/18 17:11, dann frazier wrote:

> From: Jan Glauber <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1754076
>
> 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 <[hidden email]>
> Signed-off-by: Wolfram Sang <[hidden email]>
> (cherry picked from commit 7c4246797b84e55e2dfaaf8a18033de9df7c18c1)
> Signed-off-by: dann frazier <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  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
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[Xenial][Artful/backlog]: [PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

Kleber Souza
In reply to this post by dann frazier-4
On 03/07/18 17:11, dann frazier wrote:

> From: Jan Glauber <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1754076
>
> 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 <[hidden email]>
> Signed-off-by: Wolfram Sang <[hidden email]>
> (cherry picked from commit 7c4246797b84e55e2dfaaf8a18033de9df7c18c1)
> Signed-off-by: dann frazier <[hidden email]>
> ---
>  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
>

Applied to xenial/master-next and artful/master-next-backlog branches.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[bionic]: [PATCH][Bionic][SRU Artful][SRU Xenial] i2c: octeon: Prevent error message on bus error

Seth Forshee
In reply to this post by dann frazier-4
On Wed, Mar 07, 2018 at 05:11:33PM +0100, dann frazier wrote:

> From: Jan Glauber <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1754076
>
> 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 <[hidden email]>
> Signed-off-by: Wolfram Sang <[hidden email]>
> (cherry picked from commit 7c4246797b84e55e2dfaaf8a18033de9df7c18c1)
> Signed-off-by: dann frazier <[hidden email]>

Applied to bionic/master-next, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team