adb: add trace-events for monitoring keyboard/mouse during bus enumeration

This is useful to help diagnose problems related to address clashes during
MacOS 9 boot.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Mark Cave-Ayland 2018-03-05 21:51:13 +00:00 committed by David Gibson
parent 8d62259420
commit 9d9769c208
3 changed files with 14 additions and 0 deletions

View file

@ -258,6 +258,7 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
case ADB_CMD_CHANGE_ID_AND_ACT:
case ADB_CMD_CHANGE_ID_AND_ENABLE:
d->devaddr = buf[1] & 0xf;
trace_adb_kbd_request_change_addr(d->devaddr);
break;
default:
d->devaddr = buf[1] & 0xf;
@ -269,6 +270,9 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
if (buf[2] == 1 || buf[2] == 2 || buf[2] == 3) {
d->handler = buf[2];
}
trace_adb_kbd_request_change_addr_and_handler(d->devaddr,
d->handler);
break;
}
}