diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2021-09-03 12:32:23 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2021-09-08 11:09:45 +0100 |
commit | 15a2a1a4d1eecc74a87e1552f5cc4e3668375715 (patch) | |
tree | 39489f0bc88170c01d02979d89bdd69b672fcb54 /hw | |
parent | 99b0f0584132d942547046bc064478db5bcbe7c5 (diff) | |
download | qemu-15a2a1a4d1eecc74a87e1552f5cc4e3668375715.zip qemu-15a2a1a4d1eecc74a87e1552f5cc4e3668375715.tar.gz qemu-15a2a1a4d1eecc74a87e1552f5cc4e3668375715.tar.bz2 |
escc: fix STATUS_SYNC bit in R_STATUS register
After an SDLC "Enter hunt" command has been sent the STATUS_SYNC bit should remain
high until the flag byte has been detected. Whilst the ESCC device doesn't yet
implement SDLC mode, without this change the active low STATUS_SYNC is constantly
asserted causing the MacOS OpenTransport extension to hang on startup as it thinks
it is constantly receiving LocalTalk responses during its initial negotiation
phase.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210903113223.19551-10-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/char/escc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/char/escc.c b/hw/char/escc.c index 9283ed7..0fce4f6 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -94,6 +94,7 @@ #define W_IVEC 2 #define W_RXCTRL 3 #define RXCTRL_RXEN 0x01 +#define RXCTRL_HUNT 0x10 #define W_TXCTRL1 4 #define TXCTRL1_PAREN 0x01 #define TXCTRL1_PAREV 0x02 @@ -561,7 +562,13 @@ static void escc_mem_write(void *opaque, hwaddr addr, break; } break; - case W_INTR ... W_RXCTRL: + case W_RXCTRL: + s->wregs[s->reg] = val; + if (val & RXCTRL_HUNT) { + s->rregs[R_STATUS] |= STATUS_SYNC; + } + break; + case W_INTR ... W_IVEC: case W_SYNC1 ... W_TXBUF: case W_MISC1 ... W_CLOCK: case W_MISC2 ... W_EXTINT: |