linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -resend] Input: i8042, lower log level when controller_init fails
@ 2016-10-03  8:56 Jiri Slaby
  2016-10-24  9:05 ` Jiri Slaby
  2016-10-24 17:55 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2016-10-03  8:56 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-kernel, linux-input, Jiri Slaby

There are a lot of machines without i8042 controller nowadays.
Sometimes i8042_controller_check returns 0 because i8042_flush does
nothing (read from the port returns 0 and the while loop does not
execute).

In that case, the probe method is called and fails with this error
output to console:
i8042: Can't read CTR while initializing i8042
i8042: probe of i8042 failed with error -5

Lower the former error message to be KERN_INFO and make the function
in that case return -ENODEV instead of -EIO. This will suppress the
latter.

There is also an IBM support page about these messages:
https://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5082417

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/input/serio/i8042.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 405252a884dd..15c87b98d70b 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -950,8 +950,8 @@ static int i8042_controller_init(void)
 			udelay(50);
 
 		if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
-			pr_err("Can't read CTR while initializing i8042\n");
-			return -EIO;
+			pr_info("Can't read CTR while initializing i8042. Either i8042 controller is not present or it does not respond.\n");
+			return -ENODEV;
 		}
 
 	} while (n < 2 || ctr[0] != ctr[1]);
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -resend] Input: i8042, lower log level when controller_init fails
  2016-10-03  8:56 [PATCH -resend] Input: i8042, lower log level when controller_init fails Jiri Slaby
@ 2016-10-24  9:05 ` Jiri Slaby
  2016-10-24 17:55 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2016-10-24  9:05 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-kernel, linux-input

Any updates on this?

On 10/03/2016, 10:56 AM, Jiri Slaby wrote:
> There are a lot of machines without i8042 controller nowadays.
> Sometimes i8042_controller_check returns 0 because i8042_flush does
> nothing (read from the port returns 0 and the while loop does not
> execute).
> 
> In that case, the probe method is called and fails with this error
> output to console:
> i8042: Can't read CTR while initializing i8042
> i8042: probe of i8042 failed with error -5
> 
> Lower the former error message to be KERN_INFO and make the function
> in that case return -ENODEV instead of -EIO. This will suppress the
> latter.
> 
> There is also an IBM support page about these messages:
> https://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5082417
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  drivers/input/serio/i8042.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 405252a884dd..15c87b98d70b 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -950,8 +950,8 @@ static int i8042_controller_init(void)
>  			udelay(50);
>  
>  		if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
> -			pr_err("Can't read CTR while initializing i8042\n");
> -			return -EIO;
> +			pr_info("Can't read CTR while initializing i8042. Either i8042 controller is not present or it does not respond.\n");
> +			return -ENODEV;
>  		}
>  
>  	} while (n < 2 || ctr[0] != ctr[1]);
> 


-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -resend] Input: i8042, lower log level when controller_init fails
  2016-10-03  8:56 [PATCH -resend] Input: i8042, lower log level when controller_init fails Jiri Slaby
  2016-10-24  9:05 ` Jiri Slaby
@ 2016-10-24 17:55 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2016-10-24 17:55 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, linux-input

On Mon, Oct 03, 2016 at 10:56:52AM +0200, Jiri Slaby wrote:
> There are a lot of machines without i8042 controller nowadays.
> Sometimes i8042_controller_check returns 0 because i8042_flush does
> nothing (read from the port returns 0 and the while loop does not
> execute).
> 
> In that case, the probe method is called and fails with this error
> output to console:
> i8042: Can't read CTR while initializing i8042
> i8042: probe of i8042 failed with error -5
> 
> Lower the former error message to be KERN_INFO and make the function
> in that case return -ENODEV instead of -EIO. This will suppress the
> latter.

No, this is low level enough that I would prefer keeping it as is. I
think we should instead bail out earlier, maybe in i8042_pnp_init().
Right now we only trust PNP data if we are on ia64. Maybe we could
extend it to X86_64 as well.

Thanks.

> 
> There is also an IBM support page about these messages:
> https://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5082417
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  drivers/input/serio/i8042.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 405252a884dd..15c87b98d70b 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -950,8 +950,8 @@ static int i8042_controller_init(void)
>  			udelay(50);
>  
>  		if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) {
> -			pr_err("Can't read CTR while initializing i8042\n");
> -			return -EIO;
> +			pr_info("Can't read CTR while initializing i8042. Either i8042 controller is not present or it does not respond.\n");
> +			return -ENODEV;
>  		}
>  
>  	} while (n < 2 || ctr[0] != ctr[1]);
> -- 
> 2.10.0
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-24 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03  8:56 [PATCH -resend] Input: i8042, lower log level when controller_init fails Jiri Slaby
2016-10-24  9:05 ` Jiri Slaby
2016-10-24 17:55 ` Dmitry Torokhov

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