[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-22 Thread Mark Laws
As explained in 1407814240-4275-1-git-send-email-de...@microsoft.com: > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes > ps2_command(). libps2.c depends on i8042.c because it invokes > i8042_check_port_ow

[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-22 Thread Mark Laws
A few tripels later and the patch has been completely rewritten. The problem symbols have been moved to a new module, libi8042.c, which both libps2.c and i8042.c use. libps2.c no longer depends on i8042.c, and i8042.c no longer needs the gross hack of the previous patch. Since I didn't write anyt

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-22 Thread Dan Carpenter
Why is platform_create_bundle() failing? It didn't fail in the first version of the patch. Btw, I'm not asking rhetorical questions, if I ask a question it means I legitimately don't know the answer. But I don't like this patch. Could you describe how you have tested it with real hardware? Wha

[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-22 Thread Mark Laws
As explained in 1407814240-4275-1-git-send-email-de...@microsoft.com: > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes > ps2_command(). libps2.c depends on i8042.c because it invokes > i8042_check_port_ow

[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-22 Thread Mark Laws
This is an updated version of the original patch from this thread. It fixes the style issues Dan Carpenter brought up. Mark Laws (1): Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs drivers/input/serio/i8042.c | 50 ++--- 1 file changed,

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-19 Thread Mark Laws
On Tue, Apr 19, 2016 at 5:22 PM, Dan Carpenter wrote: > Yeah. Just remove the call to i8042_controller_check(). Wouldn't > everyone be happy with that situation? No problem, I agree this is better--just wasn't sure what you meant initially. > Your patch makes life slightly more complicated for

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-19 Thread Dan Carpenter
On Tue, Apr 19, 2016 at 07:00:42AM +0900, Mark Laws wrote: > On Tue, Apr 19, 2016 at 5:36 AM, Dan Carpenter > wrote: > > On Tue, Apr 19, 2016 at 02:24:47AM +0900, Mark Laws wrote: > >> Sorry, I don't understand--which part are you suggesting we remove? > > > > The call to i8042_controller_check()

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Mark Laws
On Tue, Apr 19, 2016 at 5:36 AM, Dan Carpenter wrote: > On Tue, Apr 19, 2016 at 02:24:47AM +0900, Mark Laws wrote: >> Sorry, I don't understand--which part are you suggesting we remove? > > The call to i8042_controller_check() or move it to the probe function or > something. Why must we have the

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Dan Carpenter
On Tue, Apr 19, 2016 at 02:24:47AM +0900, Mark Laws wrote: > On Tue, Apr 19, 2016 at 1:54 AM, Dan Carpenter > wrote: > > So if the user inserts the module without a keyboard then in the > > original code they would just put a keyboard in and try again. Now they > > have to do an extra rmmod. Wh

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Mark Laws
On Tue, Apr 19, 2016 at 1:54 AM, Dan Carpenter wrote: > So if the user inserts the module without a keyboard then in the > original code they would just put a keyboard in and try again. Now they > have to do an extra rmmod. What about if we just removed the test for > if the keyboard is present?

Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Dan Carpenter
So if the user inserts the module without a keyboard then in the original code they would just put a keyboard in and try again. Now they have to do an extra rmmod. What about if we just removed the test for if the keyboard is present? On Tue, Apr 19, 2016 at 12:23:36AM +0900, Mark Laws wrote: >

[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Mark Laws
As explained in 1407814240-4275-1-git-send-email-de...@microsoft.com: > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes > ps2_command(). libps2.c depends on i8042.c because it invokes > i8042_check_port_ow

[PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

2016-04-18 Thread Mark Laws
Hi, Please keep me Cc:ed in any replies as I'm not on these lists. Description of the fix is in the commit message for the patch. Discussion: Given that most distributions were already statically linking i8042.c, having it not unload even if there is no i8042 device seems a better fix than the