All of lore.kernel.org
 help / color / mirror / Atom feed
From: deller@kernel.org
To: qemu-devel@nongnu.org
Cc: "Soumyajyotii Ssarkar" <soumyajyotisarkar23@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Helge Deller" <deller@gmx.de>,
	"Sven Schnelle" <svens@stackframe.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Fam Zheng" <fam@euphon.net>
Subject: [PULL 10/12] scsi: ncr710: Fix DSA register
Date: Tue, 23 Dec 2025 16:50:29 +0100	[thread overview]
Message-ID: <20251223155031.7110-11-deller@kernel.org> (raw)
In-Reply-To: <20251223155031.7110-1-deller@kernel.org>

From: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>

Implement bytewise write handling for DSA register instead of using
the macro, as NetBSD driver accesses it byte by byte.

Signed-off-by: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/scsi/ncr53c710.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
index dd453991e0..0ea1fc43a3 100644
--- a/hw/scsi/ncr53c710.c
+++ b/hw/scsi/ncr53c710.c
@@ -2078,7 +2078,21 @@ static void ncr710_reg_writeb(NCR710State *s, int offset, uint8_t val)
         /* Linux writes to these readonly registers on startup */
         return;
 
-    CASE_SET_REG32(dsa, NCR710_DSA_REG)
+    case NCR710_DSA_REG:
+        s->dsa &= 0xffffff00;
+        s->dsa |= val;
+        break;
+    case NCR710_DSA_REG + 1:
+        s->dsa &= 0xffff00ff;
+        s->dsa |= val << 8;
+        break;
+    case NCR710_DSA_REG + 2:
+        s->dsa &= 0xff00ffff;
+        s->dsa |= val << 16;
+        break;
+    case NCR710_DSA_REG + 3:
+        s->dsa &= 0x00ffffff;
+        s->dsa |= val << 24;
         break;
 
     case NCR710_CTEST0_REG: /* CTEST0 */
-- 
2.52.0



  parent reply	other threads:[~2025-12-23 15:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 15:50 [PULL 00/12] Hppa updates qemu v11 patches deller
2025-12-23 15:50 ` [PULL 02/12] scsi: ncr710: Add null pointer checks deller
2025-12-23 15:50 ` [PULL 03/12] scsi: ncr710: Fix use after free in command_complete deller
2025-12-23 15:50 ` [PULL 04/12] scsi: ncr710: Fix interrupt related register handing deller
2025-12-23 15:50 ` [PULL 05/12] scsi: ncr710: Fix DMA State machine and flow control deller
2025-12-23 15:50 ` [PULL 06/12] scsi: ncr710: Fix table indirect addressing endianness deller
2025-12-23 15:50 ` [PULL 07/12] scsi: ncr710: Mark command complete in status phase and fix disconnect deller
2025-12-23 15:50 ` [PULL 08/12] scsi: ncr710: Add LUN scanning deller
2025-12-23 15:50 ` [PULL 09/12] scsi: ncr710: Simplify disconnect handling deller
2025-12-23 15:50 ` deller [this message]
2025-12-23 15:50 ` [PULL 11/12] scsi: ncr710: Fix CTEST FIFO status deller
2025-12-23 15:50 ` [PULL 12/12] target/hppa: add 64 bit support to gdbstub deller
2026-03-10  6:15   ` Philippe Mathieu-Daudé
2026-03-10  6:45     ` Sven Schnelle
2026-03-10  7:06       ` Sven Schnelle
2026-03-10 10:54         ` Philippe Mathieu-Daudé
2026-03-10 16:49           ` Sven Schnelle
2025-12-28 22:08 ` [PULL 00/12] Hppa updates qemu v11 patches Richard Henderson

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=20251223155031.7110-11-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=soumyajyotisarkar23@gmail.com \
    --cc=svens@stackframe.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.