From 81d40ece27692b7a5032013c67d39b12f0fc0858 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Sat, 28 Apr 2007 23:46:15 +0000 Subject: [PATCH] Implemented a workaround for broken hardware, multiplexed mouse port 0 will be ignored if it's not working after 100 ms git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20893 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ps2/ps2_common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ps2/ps2_common.c b/src/add-ons/kernel/bus_managers/ps2/ps2_common.c index 594cf85859..737c3d75aa 100644 --- a/src/add-ons/kernel/bus_managers/ps2/ps2_common.c +++ b/src/add-ons/kernel/bus_managers/ps2/ps2_common.c @@ -360,12 +360,19 @@ ps2_init(void) goto err5; } - ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_KEYB]); - ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE]); if (gActiveMultiplexingEnabled) { + if (B_TIMED_OUT == ps2_dev_command_timeout(&ps2_device[PS2_DEVICE_MOUSE], 0xe6, NULL, 0, NULL, 0, 100000)) { + INFO("ps2: accessing multiplexed mouse port 0 timed out, ignoring it!\n"); + } else { + ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE]); + } ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE + 1]); ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE + 2]); ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE + 3]); + ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_KEYB]); + } else { + ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_MOUSE]); + ps2_service_notify_device_added(&ps2_device[PS2_DEVICE_KEYB]); } TRACE("ps2: init done!\n");