All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: qemu-devel@nongnu.org, laurent@vivier.eu
Subject: [PATCH v3 9/9] escc: fix STATUS_SYNC bit in R_STATUS register
Date: Fri,  3 Sep 2021 12:32:23 +0100	[thread overview]
Message-ID: <20210903113223.19551-10-mark.cave-ayland@ilande.co.uk> (raw)
In-Reply-To: <20210903113223.19551-1-mark.cave-ayland@ilande.co.uk>

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>
---
 hw/char/escc.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/hw/char/escc.c b/hw/char/escc.c
index 9283ed70a6..0fce4f6324 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:
-- 
2.20.1



  parent reply	other threads:[~2021-09-03 11:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 11:32 [PATCH v3 0/9] escc: fix reset and R_STATUS when SDLC mode is enabled Mark Cave-Ayland
2021-09-03 11:32 ` [PATCH v3 1/9] escc: checkpatch fixes Mark Cave-Ayland
2021-09-03 11:32 ` [PATCH v3 2/9] escc: reset register values to zero in escc_reset() Mark Cave-Ayland
2021-09-07 12:59   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 3/9] escc: introduce escc_soft_reset_chn() for software reset Mark Cave-Ayland
2021-09-07 13:00   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 4/9] escc: introduce escc_hard_reset_chn() for hardware reset Mark Cave-Ayland
2021-09-07 13:00   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 5/9] escc: implement soft reset as described in the datasheet Mark Cave-Ayland
2021-09-07 13:06   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 6/9] escc: implement hard " Mark Cave-Ayland
2021-09-07 13:09   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 7/9] escc: remove register changes from escc_reset_chn() Mark Cave-Ayland
2021-09-07 13:10   ` Peter Maydell
2021-09-03 11:32 ` [PATCH v3 8/9] escc: re-use escc_reset_chn() for soft reset Mark Cave-Ayland
2021-09-07 13:10   ` Peter Maydell
2021-09-03 11:32 ` Mark Cave-Ayland [this message]
2021-09-08 10:06 ` [PATCH v3 0/9] escc: fix reset and R_STATUS when SDLC mode is enabled Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210903113223.19551-10-mark.cave-ayland@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.