OSDN Git Service

mac_via: workaround NetBSD ADB bus enumeration issue
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 4 Oct 2023 08:38:01 +0000 (09:38 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 6 Oct 2023 08:33:43 +0000 (10:33 +0200)
commit2006904938fbb85ef32eb79ab96cdcc8cbc6de1c
tree6fc5adf1dc0e45554277503501e865b0a3555d1b
parent366d27796ca1d09d6b6a6ad69a89cb7644d92930
mac_via: workaround NetBSD ADB bus enumeration issue

NetBSD assumes it can send its first ADB command after sending the ADB_BUSRESET
command in ADB_STATE_NEW without changing the state back to ADB_STATE_IDLE
first as detailed in the ADB protocol.

Add a workaround to detect this condition at the start of ADB enumeration
and send the next command written to SR after a ADB_BUSRESET onto the bus
regardless, even if we don't detect a state transition to ADB_STATE_NEW.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-16-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/misc/mac_via.c
hw/misc/trace-events