(In reply to Srihari Vijayaraghavan from comment #155)
> Leaving aside the fact that this patch didn't help the problem, I closely
> checked the definition of i8042_command() and its many invocations all over
> drivers/input/serio/i8042.c; they all use a pointer to an unsigned char as
> the first argument as per its definition. So I don't believe I've used it
> incorrectly at all. Please double check.
>
There's some magic involved here.
For example: i8042_command(output, 0x12d4);
When we have as a parameter 0x12d4 the actual command (d4) is encoded in the least significant byte.
The two most significant nibbles specify the number of input parameters (1) for the 8042 and the number of bytes to receive (2).
Therefore where we have something like this:
param = 0x5a;
retval = i8042_command(¶m, I8042_CMD_AUX_LOOP);
With:
#define I8042_CMD_AUX_LOOP 0x11d3 //include/linux/i8042.h
we only receive one parameter so the invocation is safe.
Commands retuning two bytes are very rare so that's why You didn't found any.
(In reply to Srihari Vijayaraghavan from comment #155) input/serio/ i8042.c; they all use a pointer to an unsigned char as
i8042_ command( output, 0x12d4);
> Leaving aside the fact that this patch didn't help the problem, I closely
> checked the definition of i8042_command() and its many invocations all over
> drivers/
> the first argument as per its definition. So I don't believe I've used it
> incorrectly at all. Please double check.
>
There's some magic involved here.
For example:
When we have as a parameter 0x12d4 the actual command (d4) is encoded in the least significant byte.
The two most significant nibbles specify the number of input parameters (1) for the 8042 and the number of bytes to receive (2).
Therefore where we have something like this:
param = 0x5a; ¶m, I8042_CMD_ AUX_LOOP) ; linux/i8042. h
retval = i8042_command(
With:
#define I8042_CMD_AUX_LOOP 0x11d3 //include/
we only receive one parameter so the invocation is safe.
Commands retuning two bytes are very rare so that's why You didn't found any.