Re: [PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-31 Thread Raul Rangel
On Sat, Aug 29, 2020 at 1:48 AM Pavel Machek wrote: > > On Thu 2020-08-27 13:52:22, Raul E Rangel wrote: > > The i8042_mutex must be held by writers of the AUX and KBD ports, as > > well as users of i8042_command. There were a lot of users of > > i8042_command that were not calling i8042_lock_chip

Re: [PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-29 Thread Pavel Machek
On Thu 2020-08-27 13:52:22, Raul E Rangel wrote: > The i8042_mutex must be held by writers of the AUX and KBD ports, as > well as users of i8042_command. There were a lot of users of > i8042_command that were not calling i8042_lock_chip/i8042_unlock_chip. > This resulted in i8042_commands being iss

Re: [PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-27 Thread Raul Rangel
On Thu, Aug 27, 2020 at 2:12 PM Andy Shevchenko wrote: > > On Thu, Aug 27, 2020 at 10:52 PM Raul E Rangel wrote: > > > > The i8042_mutex must be held by writers of the AUX and KBD ports, as > > well as users of i8042_command. There were a lot of users of > > i8042_command that were not calling i8

Re: [PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-27 Thread Andy Shevchenko
On Thu, Aug 27, 2020 at 11:12 PM Andy Shevchenko wrote: > On Thu, Aug 27, 2020 at 10:52 PM Raul E Rangel wrote: ... > > + mutex_lock(&i8042_mutex); > > + > > spin_lock_irqsave(&i8042_lock, flags); > > retval = __i8042_command(param, command); > > spin_unlock_irqres

Re: [PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-27 Thread Andy Shevchenko
On Thu, Aug 27, 2020 at 10:52 PM Raul E Rangel wrote: > > The i8042_mutex must be held by writers of the AUX and KBD ports, as > well as users of i8042_command. There were a lot of users of > i8042_command that were not calling i8042_lock_chip/i8042_unlock_chip. > This resulted in i8042_commands b

[PATCH 1/2] Input: i8042 - Prevent intermixing i8042 commands

2020-08-27 Thread Raul E Rangel
The i8042_mutex must be held by writers of the AUX and KBD ports, as well as users of i8042_command. There were a lot of users of i8042_command that were not calling i8042_lock_chip/i8042_unlock_chip. This resulted in i8042_commands being issues in between PS/2 transactions. This change moves the