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 06/12] scsi: ncr710: Fix table indirect addressing endianness
Date: Tue, 23 Dec 2025 16:50:25 +0100	[thread overview]
Message-ID: <20251223155031.7110-7-deller@kernel.org> (raw)
In-Reply-To: <20251223155031.7110-1-deller@kernel.org>

From: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>

Correct the endianness conversion for table indirect addressing and
use be32_to_cpu() instead of cpu_to_le32().

This fix descriptor table parsing when using indirect addressing modes
in SCRIPTS.

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

diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
index e17d1f3fb8..4b42fab754 100644
--- a/hw/scsi/ncr53c710.c
+++ b/hw/scsi/ncr53c710.c
@@ -1355,8 +1355,8 @@ again:
             offset = sextract32(addr, 0, 24);
             ncr710_dma_read(s, s->dsa + offset, buf, 8);
             /* byte count is stored in bits 0:23 only */
-            s->dbc = cpu_to_le32(buf[0]) & 0xffffff;
-            addr = cpu_to_le32(buf[1]);
+            s->dbc = be32_to_cpu(buf[0]) & 0xffffff;
+            addr = be32_to_cpu(buf[1]);
         }
         /* Check phase match for block move instructions */
         if ((s->sstat2 & PHASE_MASK) != ((insn >> 24) & 7)) {
-- 
2.52.0



  parent reply	other threads:[~2025-12-23 15:51 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 ` deller [this message]
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 ` [PULL 10/12] scsi: ncr710: Fix DSA register deller
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-7-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.