mbox series

[0/4] i2c: remove printout on handled timeouts - part 2

Message ID 20240423121322.28460-1-wsa+renesas@sang-engineering.com
Headers show
Series i2c: remove printout on handled timeouts - part 2 | expand

Message

Wolfram Sang April 23, 2024, 12:13 p.m. UTC
Here is the continuation of the previous series, largely applied by Andi
meanwhile (Thanks!). I improved the i801 driver (only one debug print
left) and added the three ali* drivers which I overlooked before. Hope
you'll like the patches...


Wolfram Sang (4):
  i2c: i801: remove printout on handled timeouts
  i2c: ali1535: remove printout on handled timeouts
  i2c: ali1563: remove printout on handled timeouts
  i2c: ali15x3: remove printout on handled timeouts

 drivers/i2c/busses/i2c-ali1535.c | 8 ++------
 drivers/i2c/busses/i2c-ali1563.c | 1 -
 drivers/i2c/busses/i2c-ali15x3.c | 4 +---
 drivers/i2c/busses/i2c-i801.c    | 4 +---
 4 files changed, 4 insertions(+), 13 deletions(-)

Comments

Jean Delvare April 25, 2024, 3:45 p.m. UTC | #1
On Tue, 23 Apr 2024 14:13:18 +0200, Wolfram Sang wrote:
> I2C and SMBus timeouts are not something the user needs to be informed
> about on controller level. The client driver may know if that really is
> a problem and give more detailed information to the user. The controller
> should just pass this information upwards. Remove the printout and turn
> the SMBus-specific termination message to debug.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/i2c/busses/i2c-i801.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index e577abc776c1..d2d2a6dbe29f 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -399,9 +399,7 @@ static int i801_check_post(struct i801_priv *priv, int status)
>  	 * If the SMBus is still busy, we give up
>  	 */
>  	if (unlikely(status < 0)) {
> -		dev_err(&priv->pci_dev->dev, "Transaction timeout\n");
>  		/* try to stop the current command */
> -		dev_dbg(&priv->pci_dev->dev, "Terminating the current operation\n");
>  		outb_p(SMBHSTCNT_KILL, SMBHSTCNT(priv));
>  		usleep_range(1000, 2000);
>  		outb_p(0, SMBHSTCNT(priv));
> @@ -410,7 +408,7 @@ static int i801_check_post(struct i801_priv *priv, int status)
>  		status = inb_p(SMBHSTSTS(priv));
>  		if ((status & SMBHSTSTS_HOST_BUSY) ||
>  		    !(status & SMBHSTSTS_FAILED))
> -			dev_err(&priv->pci_dev->dev,
> +			dev_dbg(&priv->pci_dev->dev,
>  				"Failed terminating the transaction\n");
>  		return -ETIMEDOUT;
>  	}

Reviewed-by: Jean Delvare <jdelvare@suse.de>