[haiku-development] ps2 bus manager: Two questions: The First One.

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 14 Jun 2011 22:06:00 +0200

Hi All!

Last week I have dance around two of my bugs:

The first one is http://dev.haiku-os.org/ticket/7635

This notebook hangs during sending so known Active PS/2 Multiplexing activation sequence to KBC. The executions stops just after processing first interrupt from the AUX port and never returns to the activation procedure. I have tried to suppress the interrupts using the disable_interrupts()/restore_interrupts() frame in the ps2_command() implementation. And this helps to boot this system and the internal keyboard and touchpad are functional.

But:

ps2: ps2_command cmd 0xd3, out 1, in 1
ps2: ps2_command out 0xf0
ps2: ps2_write_ctrl 0xd3
ps2: ps2_write_data 0xf0
ps2: ps2_interrupt ignoring, ctrl 0x35 (aux)
Last message repeated 543 times.                <- !!!!!!!
ps2: ps2_command in 0xf0
ps2: ps2_command result 0x00000000
ps2: ps2_command cmd 0xd3, out 1, in 1
ps2: ps2_command out 0x56
ps2: ps2_write_ctrl 0xd3
ps2: ps2_write_data 0x56
ps2: ps2_interrupt ignoring, ctrl 0x35 (aux)
Last message repeated 5420 times.               <- !!!!!!!
ps2: ps2_command in 0x56
ps2: ps2_command result 0x00000000
ps2: ps2_command cmd 0xd3, out 1, in 1
ps2: ps2_command out 0xa4
ps2: ps2_write_ctrl 0xd3
ps2: ps2_write_data 0xa4
ps2: ps2_interrupt ignoring, ctrl 0x31 (aux)
ps2: ps2_command in 0x10
ps2: ps2_command result 0x00000000
ps2: active multiplexing v1.0 enabled


Looks like an interrupts storm is observed after restoring interrupts.I have no idea is it usual behavior of this KBC hardware (and the real source of my problem!) or just the result of programmatic interrupts suppressing. I have tested this modification on about of dozen of notebooks and PCs and observed no side-effects.

Another solution was to use the KB and AUX interrupt bits in the command byte. I have set them to 0 before starting the Active Multiplexing Activation Sequence and restore to 1 after it. And this solution works too.

So, are there any more ideas?

Personally, I prefer the second solution with disabling bits in command byte as more local one. Are there any objections in fixing #7635 in this way?

Thank you for the patience!

--
Kind Regards,
   S.Zharski

Other related posts:

  • » [haiku-development] ps2 bus manager: Two questions: The First One. - Siarzhuk Zharski