Skip to content

Commit 15a2a1a

Browse files
committed
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 <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Mark Cave-Ayland <[email protected]>
1 parent 99b0f05 commit 15a2a1a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hw/char/escc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
#define W_IVEC 2
9595
#define W_RXCTRL 3
9696
#define RXCTRL_RXEN 0x01
97+
#define RXCTRL_HUNT 0x10
9798
#define W_TXCTRL1 4
9899
#define TXCTRL1_PAREN 0x01
99100
#define TXCTRL1_PAREV 0x02
@@ -561,7 +562,13 @@ static void escc_mem_write(void *opaque, hwaddr addr,
561562
break;
562563
}
563564
break;
564-
case W_INTR ... W_RXCTRL:
565+
case W_RXCTRL:
566+
s->wregs[s->reg] = val;
567+
if (val & RXCTRL_HUNT) {
568+
s->rregs[R_STATUS] |= STATUS_SYNC;
569+
}
570+
break;
571+
case W_INTR ... W_IVEC:
565572
case W_SYNC1 ... W_TXBUF:
566573
case W_MISC1 ... W_CLOCK:
567574
case W_MISC2 ... W_EXTINT:

0 commit comments

Comments
 (0)