From 913f47ef96990fc72135ec604b6bb1fe2d1e389a Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 23 Jun 2020 21:49:34 +0100 Subject: adb: only call autopoll callbacks when autopoll is not blocked Handle this at the ADB bus level so that individual implementations do not need to handle this themselves. Finally add an assert() into adb_request() to prevent developers from accidentally making an explicit ADB request without blocking autopoll. Signed-off-by: Mark Cave-Ayland Tested-by: Finn Thain Acked-by: Laurent Vivier Message-Id: <20200623204936.24064-21-mark.cave-ayland@ilande.co.uk> --- hw/misc/mac_via.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'hw/misc') diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 71b6f92..d76d7b2 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -615,11 +615,7 @@ static void adb_via_poll(void *opaque) * received, however we must block autopoll until the point where * the entire reply has been read back to the host */ - if (adb_bus->autopoll_blocked) { - return; - } else { - adb_autopoll_block(adb_bus); - } + adb_autopoll_block(adb_bus); m->adb_data_in_index = 0; m->adb_data_out_index = 0; -- cgit v1.1