Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8459
b: refs/heads/master
c: c3d31e7
h: refs/heads/master
i:
  8457: 905d8b5
  8455: 233af40
v: v3
  • Loading branch information
Dmitry Torokhov committed Sep 4, 2005
1 parent 3eff0c4 commit 6ed929c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d5987a6e17fa36776a0c9964db0f24c3d070862
refs/heads/master: c3d31e7f9a94800ba895a081e143e79954f6c62f
39 changes: 25 additions & 14 deletions trunk/drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ static void i8042_pnp_exit(void)

static int __init i8042_pnp_init(void)
{
int result_kbd, result_aux;
int result_kbd = 0, result_aux = 0;
char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };

if (i8042_nopnp) {
printk(KERN_INFO "i8042: PNP detection disabled\n");
Expand All @@ -267,6 +268,7 @@ static int __init i8042_pnp_init(void)

if ((result_kbd = pnp_register_driver(&i8042_pnp_kbd_driver)) >= 0)
i8042_pnp_kbd_registered = 1;

if ((result_aux = pnp_register_driver(&i8042_pnp_aux_driver)) >= 0)
i8042_pnp_aux_registered = 1;

Expand All @@ -280,6 +282,25 @@ static int __init i8042_pnp_init(void)
#endif
}

if (result_kbd > 0)
snprintf(kbd_irq_str, sizeof(kbd_irq_str),
"%d", i8042_pnp_kbd_irq);
if (result_aux > 0)
snprintf(aux_irq_str, sizeof(aux_irq_str),
"%d", i8042_pnp_aux_irq);

printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %s%s%s\n",
i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "",
i8042_pnp_aux_name,
i8042_pnp_data_reg, i8042_pnp_command_reg,
kbd_irq_str, (result_kbd > 0 && result_aux > 0) ? "," : "",
aux_irq_str);

#if defined(__ia64__)
if (result_aux <= 0)
i8042_noaux = 1;
#endif

if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
i8042_pnp_data_reg != i8042_data_reg) || !i8042_pnp_data_reg) {
printk(KERN_WARNING "PNP: PS/2 controller has invalid data port %#x; using default %#x\n",
Expand All @@ -295,30 +316,20 @@ static int __init i8042_pnp_init(void)
}

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);
if (!i8042_noaux && !i8042_pnp_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;
}

#if defined(__ia64__)
if (result_aux <= 0)
i8042_noaux = 1;
#endif

i8042_data_reg = i8042_pnp_data_reg;
i8042_command_reg = i8042_pnp_command_reg;
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",
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);

return 0;
}

Expand Down

0 comments on commit 6ed929c

Please sign in to comment.