@@ -791,9 +791,9 @@ static bool atkbd_is_portable_device(void)
791
791
* not work. So in this case simply assume a keyboard is connected to avoid
792
792
* confusing some laptop keyboards.
793
793
*
794
- * Skipping ATKBD_CMD_GETID ends up using a fake keyboard id. Using a fake id is
795
- * ok in translated mode, only atkbd_select_set() checks atkbd->id and in
796
- * translated mode that is a no-op.
794
+ * Skipping ATKBD_CMD_GETID ends up using a fake keyboard id. Using the standard
795
+ * 0xab83 id is ok in translated mode, only atkbd_select_set() checks atkbd->id
796
+ * and in translated mode that is a no-op.
797
797
*/
798
798
static bool atkbd_skip_getid (struct atkbd * atkbd )
799
799
{
@@ -811,6 +811,7 @@ static int atkbd_probe(struct atkbd *atkbd)
811
811
{
812
812
struct ps2dev * ps2dev = & atkbd -> ps2dev ;
813
813
unsigned char param [2 ];
814
+ bool skip_getid ;
814
815
815
816
/*
816
817
* Some systems, where the bit-twiddling when testing the io-lines of the
@@ -832,7 +833,8 @@ static int atkbd_probe(struct atkbd *atkbd)
832
833
*/
833
834
834
835
param [0 ] = param [1 ] = 0xa5 ; /* initialize with invalid values */
835
- if (atkbd_skip_getid (atkbd ) || ps2_command (ps2dev , param , ATKBD_CMD_GETID )) {
836
+ skip_getid = atkbd_skip_getid (atkbd );
837
+ if (skip_getid || ps2_command (ps2dev , param , ATKBD_CMD_GETID )) {
836
838
837
839
/*
838
840
* If the get ID command was skipped or failed, we check if we can at least set
@@ -842,7 +844,7 @@ static int atkbd_probe(struct atkbd *atkbd)
842
844
param [0 ] = 0 ;
843
845
if (ps2_command (ps2dev , param , ATKBD_CMD_SETLEDS ))
844
846
return -1 ;
845
- atkbd -> id = 0xabba ;
847
+ atkbd -> id = skip_getid ? 0xab83 : 0xabba ;
846
848
return 0 ;
847
849
}
848
850
0 commit comments