drivers/input/serio/i8042-x86ia64.h
Hi Andrew.
Non-trivial in that I'm unsure of original intent but trivial in that it's just a printk()...
On bootup, I see:
pnp: the driver 'i8042 kbd' has been registered
pnp: match found with the PnP device '00:05' and the driver 'i8042 kbd'
pnp: the driver 'i8042 aux' has been registered
PNP: PS/2 controller doesn't have AUX irq; using default 0xc
PNP: PS/2 Controller [PNP0303] at 0x60,0x64 irq 112
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
That "irq 112" (last PNP: line) should read "irq 1,12" but is being run together:
printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n",
i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "", i8042_pnp_aux_name, i8042_data_reg, i8042_command_reg, i8042_kbd_irq, (result_aux > 0) ? "," : "", i8042_aux_irq);
That first 'foo ? "," : ""' construct there seems somewhat okay-ish since i8042_pnp_aux_name is a 0-string when result_aux <= 0, but this obviously does not work for i8042_aux_irq (an integer).
In my case result_aux is 0 due to my BIOS not exporting a PS/2 mouse PNP id after which the code just assigns the default irq 12 (the first PNP: line above) but winds up printing "irq 112". Due to that default assignment, the correct fix would seem to be to just have "%d,%d". Attachment does this (and takes the opportunity to change two %#x format specifiers for the IRQs to %d).
Did not know who to more specifically bother about this; hope that's okay.
Rene.
drivers/input/serio/i8042-x86ia64io.h renamed from drivers/input/serio/i8042-x86ia64io.h.orig +4 -5
@@ -281,12 +281,12 @@ }if (!i8042_pnp_kbd_irq) { -printk (KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %#x\n" , i8042_kbd_irq); +printk (KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n" , i8042_kbd_irq); i8042_pnp_kbd_irq = i8042_kbd_irq; }if (!i8042_pnp_aux_irq) { -printk (KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n" , i8042_aux_irq); +printk (KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %d\n" , i8042_aux_irq); i8042_pnp_aux_irq = i8042_aux_irq; }
@@ -300,10 +300,9 @@ i8042_kbd_irq = i8042_pnp_kbd_irq; i8042_aux_irq = i8042_pnp_aux_irq; -printk (KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n" , +printk (KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d,%d\n" , i8042_pnp_kbd_name, (result_kbd >0 && result_aux >0 ) ?"," :"" , i8042_pnp_aux_name, - i8042_data_reg, i8042_command_reg, i8042_kbd_irq, - (result_aux >0 ) ?"," :"" , i8042_aux_irq); + i8042_data_reg, i8042_command_reg, i8042_kbd_irq, i8042_aux_irq);return 0 ; }
Quoted 27 lines · Rene Herman
Hi Andrew.
Non-trivial in that I'm unsure of original intent but trivial in that it's just a
printk()...On bootup, I see:
pnp: the driver 'i8042 kbd' has been registered
pnp: match found with the PnP device '00:05' and the driver 'i8042 kbd'
pnp: the driver 'i8042 aux' has been registered
PNP: PS/2 controller doesn't have AUX irq; using default0xc
PNP: PS/2 Controller [PNP0303] at 0x60,0x64 irq 112
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1That "irq 112" (last PNP: line) should read "irq 1,12" but is being run together:
printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n",
i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "", i8042_pnp_aux_name, i8042_data_reg, i8042_command_reg, i8042_kbd_irq, (result_aux > 0) ? "," : "", i8042_aux_irq);
Quoted 3 lines
That first 'foo ? "," : ""' construct there seems somewhat okay-ish since
i8042_pnp_aux_nameis a 0-string whenresult_aux<= 0, but this obviously does not work fori8042_aux_irq(an integer).
I've already fixed this part in my code, and will be pushing it upstream as soon as the input GIT tree gets merged by Linus.
Quoted 15 lines
In my case
result_auxis 0 due to my BIOS not exporting a PS/2 mouse PNP id after which the code just assigns the default irq 12 (the first PNP:
line above) but winds up printing "irq 112". Due to that default assignment, the correct fix would seem to be to just have "%d,%d". Attachment does this (and takes the opportunity to change two %#x format specifiers for the IRQs to %d).Did not know who to more specifically bother about this; hope that's okay.
drivers/input/serio/i8042-x86ia64io.h renamed from drivers/input/serio/i8042-x86ia64io.h.orig +0
-0@@ -281,12 +281,12 @@ }if (!i8042_pnp_kbd_irq) {
drivers/input/serio/i8042-x86ia64io.h line 291
Quoted 10 lines
drivers/input/serio/i8042-x86ia64io.h renamed from drivers/input/serio/i8042-x86ia64io.h.orig +2
-2-printk (KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %#x\n" , i8042_kbd_irq); +printk (KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n" , i8042_kbd_irq); i8042_pnp_kbd_irq = i8042_kbd_irq; }if (!i8042_pnp_aux_irq) { -printk (KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n" , i8042_aux_irq); +printk (KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %d\n" , i8042_aux_irq); i8042_pnp_aux_irq = i8042_aux_irq; }
And I'm fixing this now, too.
Quoted 13 lines
drivers/input/serio/i8042-x86ia64io.h renamed from drivers/input/serio/i8042-x86ia64io.h.orig +2
-3@@ -300,10 +300,9 @@ i8042_kbd_irq = i8042_pnp_kbd_irq; i8042_aux_irq = i8042_pnp_aux_irq; -printk (KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n" , +printk (KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d,%d\n" , i8042_pnp_kbd_name, (result_kbd >0 && result_aux >0 ) ?"," :"" , i8042_pnp_aux_name, - i8042_data_reg, i8042_command_reg, i8042_kbd_irq, - (result_aux >0 ) ?"," :"" , i8042_aux_irq); + i8042_data_reg, i8042_command_reg, i8042_kbd_irq, i8042_aux_irq);return 0 ; }
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR