All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>, Helge Deller <deller@gmx.de>,
	Fam Zheng <fam@euphon.net>, BALATON Zoltan <balaton@eik.bme.hu>,
	Keith Monahan <keith@techtravels.org>
Subject: [PATCH v3 4/6] hw/scsi/ncr53c710: move to COMMAND on CLEAR ACK after MESSAGE REJECT
Date: Fri, 20 Nov 2026 00:32:33 +0100	[thread overview]
Message-ID: <20261119233235.32808-5-deller@kernel.org> (raw)
In-Reply-To: <20261119233235.32808-1-deller@kernel.org>

From: Keith Monahan <keith@techtravels.org>

Releasing ACK on the last byte of a declined negotiation MESSAGE REJECT
lets the target move on to COMMAND.  HP-UX 9 tests the phase with JUMP
WHEN COMMAND after CLEAR ACK instead of issuing the CDB block move
directly.

Signed-off-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/scsi/ncr53c710.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
index 1559a9fbd1..231e9ffc18 100644
--- a/hw/scsi/ncr53c710.c
+++ b/hw/scsi/ncr53c710.c
@@ -1181,6 +1181,16 @@ again:
                 }
                 if (insn & (1 << 6)) {
                     s->sbcl &= ~LSI_SBCL_ACK;
+                    /*
+                     * Releasing ACK on the last byte of a declined negotiation
+                     * MESSAGE REJECT lets the target move on to COMMAND.  HP-UX
+                     * 9 tests the phase with JUMP WHEN COMMAND after CLEAR ACK
+                     * instead of issuing the CDB block move directly.
+                     */
+                    if ((s->sstat2 & PHASE_MASK) == PHASE_MI && s->msg_len == 0 &&
+                        s->msg_action == LSI_MSG_ACTION_COMMAND) {
+                        lsi_set_phase(s, PHASE_CMD);
+                    }
                 }
                 if (insn & (1 << 10)) {
                     s->carry = 0;
-- 
2.54.0



  parent reply	other threads:[~2026-11-19 23:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 23:32 [PATCH v3 0/6] nc53c710 rewrite Helge Deller
2026-11-19 23:32 ` [PATCH v3 1/6] hw/scsi/ncr53c710: rewrite the 53C710 SCRIPTS engine Helge Deller
2026-11-19 23:32 ` [PATCH v3 2/6] hw/scsi: share NCR/LSI definitions in lsi_scsi.h Helge Deller
2026-11-20  0:58   ` BALATON Zoltan
2026-11-20  8:43     ` Helge Deller
2026-11-20 10:37       ` BALATON Zoltan
2026-11-19 23:32 ` [PATCH v3 3/6] hw/scsi/lasi_ncr710: map the full LASI SCSI module page Helge Deller
2026-11-19 23:32 ` Helge Deller [this message]
2026-11-19 23:32 ` [PATCH v3 5/6] hw/scsi/scsi-disk: add quirk_mode_page_no_flexible_disk, use it on the 715 Helge Deller
2026-11-19 23:32 ` [PATCH v3 6/6] hw/scsi/ncr53c710: Comment cleanup, reduce verbosity, repetition Helge Deller
2026-11-19 23:39 ` [PATCH v3 0/6] nc53c710 rewrite Philippe Mathieu-Daudé
2026-11-20  8:25   ` Helge Deller
2026-11-20  9:59     ` Mark Cave-Ayland
2026-11-20 16:34       ` Philippe Mathieu-Daudé
2026-11-20 16:43         ` Mark Cave-Ayland
2026-11-20 17:18           ` Philippe Mathieu-Daudé
2026-11-20  1:12 ` BALATON Zoltan

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=20261119233235.32808-5-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=balaton@eik.bme.hu \
    --cc=deller@gmx.de \
    --cc=fam@euphon.net \
    --cc=keith@techtravels.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.