* [PATCH] Input: i8042 - force synchronous probing of PNP drivers
@ 2016-12-13 17:56 Dmitry Torokhov
2016-12-16 8:56 ` Luis R. Rodriguez
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2016-12-13 17:56 UTC (permalink / raw)
To: linux-input; +Cc: Marcos Paulo de Souza, Luis R. Rodriguez, linux-kernel
We rely on the result of scanning PNP bus for keyboard and mouse devices to
decide whether we should continue initialization of i8042 driver or not, so
the probes can not be asynchronous.
Also, it is not a good idea to unbind either of the PNP devices while i8042
is running, so let's disable bind/unbind for the PNP drivers through sysfs
and rely on i8042 cleaning after itself properly. User can still unbind and
rebind entire i8042 and that will take care of PNP drivers as well.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 2503d01..79daea84 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -925,6 +925,10 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
.name = "i8042 kbd",
.id_table = pnp_kbd_devids,
.probe = i8042_pnp_kbd_probe,
+ .driver = {
+ .probe_type = PROBE_FORCE_SYNCHRONOUS,
+ .suppress_bind_attrs = true,
+ },
};
static struct pnp_device_id pnp_aux_devids[] = {
@@ -947,6 +951,10 @@ static struct pnp_driver i8042_pnp_aux_driver = {
.name = "i8042 aux",
.id_table = pnp_aux_devids,
.probe = i8042_pnp_aux_probe,
+ .driver = {
+ .probe_type = PROBE_FORCE_SYNCHRONOUS,
+ .suppress_bind_attrs = true,
+ },
};
static void i8042_pnp_exit(void)
--
2.8.0.rc3.226.g39d4020
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Input: i8042 - force synchronous probing of PNP drivers
2016-12-13 17:56 [PATCH] Input: i8042 - force synchronous probing of PNP drivers Dmitry Torokhov
@ 2016-12-16 8:56 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2016-12-16 8:56 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linux-input, Marcos Paulo de Souza, Luis R. Rodriguez,
linux-kernel
On Tue, Dec 13, 2016 at 09:56:32AM -0800, Dmitry Torokhov wrote:
> We rely on the result of scanning PNP bus for keyboard and mouse devices to
> decide whether we should continue initialization of i8042 driver or not, so
> the probes can not be asynchronous.
Can initializing of i8042 driver happen using a wait for completion ?
If so I'd be happy for the sort of change going in first and then a fix
to enable it so that others can rely on it as an example of how to shy
away from the temporary async probe blacklist.
And is there any grammatical expression which can be used to hunt for similar
types of incompatibilities with async probe ? I'm wondering if one can hunt
for them using for instance Coccinelle SmPL grammar
> Also, it is not a good idea to unbind either of the PNP devices while i8042
> is running, so let's disable bind/unbind for the PNP drivers through sysfs
> and rely on i8042 cleaning after itself properly. User can still unbind and
> rebind entire i8042 and that will take care of PNP drivers as well.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Otherwise:
Reviewed-by: Luis R. Rodriguez <mgrof@kernel.org>
Luis
> ---
> drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index 2503d01..79daea84 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -925,6 +925,10 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
> .name = "i8042 kbd",
> .id_table = pnp_kbd_devids,
> .probe = i8042_pnp_kbd_probe,
> + .driver = {
> + .probe_type = PROBE_FORCE_SYNCHRONOUS,
> + .suppress_bind_attrs = true,
> + },
> };
>
> static struct pnp_device_id pnp_aux_devids[] = {
> @@ -947,6 +951,10 @@ static struct pnp_driver i8042_pnp_aux_driver = {
> .name = "i8042 aux",
> .id_table = pnp_aux_devids,
> .probe = i8042_pnp_aux_probe,
> + .driver = {
> + .probe_type = PROBE_FORCE_SYNCHRONOUS,
> + .suppress_bind_attrs = true,
> + },
> };
>
> static void i8042_pnp_exit(void)
> --
> 2.8.0.rc3.226.g39d4020
>
>
> --
> Dmitry
>
--
Luis Rodriguez, SUSE LINUX GmbH
Maxfeldstrasse 5; D-90409 Nuernberg
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-16 8:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-13 17:56 [PATCH] Input: i8042 - force synchronous probing of PNP drivers Dmitry Torokhov
2016-12-16 8:56 ` Luis R. Rodriguez
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).