All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Lindholm <linmag7@gmail.com>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-alpha@vger.kernel.org, martin.petersen@oracle.com,
	James.Bottomley@HansenPartnership.com, hch@infradead.org,
	macro@orcam.me.uk
Cc: linmag7@gmail.com
Subject: [PATCH 1/1] scsi: qla1280: Make 64-bit DMA addressing a Kconfig option
Date: Mon, 28 Jul 2025 18:34:14 +0200	[thread overview]
Message-ID: <20250728163752.9778-2-linmag7@gmail.com> (raw)
In-Reply-To: <20250728163752.9778-1-linmag7@gmail.com>

Make 64-bit DMA addressing a Kconfig option.

While defaulting to 64-bit addressing, this gives the user the option
to revert to 32-bits when necessary without messing with the kernel
source. The Kconfig help text also points out the issues with tsunami
based alphas with more than 2GB RAM and 32-bit PCI Qlogic SCSI
controllers.

Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
 drivers/scsi/Kconfig   | 17 +++++++++++++++++
 drivers/scsi/qla1280.c |  2 ++
 2 files changed, 19 insertions(+)

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 5522310bab8d..27cf94f374f4 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1126,6 +1126,23 @@ config SCSI_QLOGIC_1280
 	  To compile this driver as a module, choose M here: the
 	  module will be called qla1280.
 
+config SCSI_QLOGIC_1280_DMA_64BIT_ADDRESSING
+        bool "Enable 64-bit DMA addressing mode"
+        depends on SCSI_QLOGIC_1280
+        default y
+        help
+	  This options enables full 64-bit addressing for Qlogic ISP
+	  chips. 64-bit addressing works on most platforms and is hence
+	  the default. Some platforms like for example the SGI Octace2,
+	  require full 64-bit addressing in order to work and must have
+	  this option enabled.
+
+	  On some systems, like tsunami based Alpha systems, 32-bit
+	  PCI Qlogic SCSI controllers will not work propberly on systems
+	  with more than 2GB RAM installed. If you are on a tsunami
+	  based alpha (like the ES40, DS20) and want to use cards with
+	  the ISP1040/1020 chip, you should say no here.
+
 config SCSI_QLOGICPTI
 	tristate "PTI Qlogic, ISP Driver"
 	depends on SBUS && SCSI
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 6af018f1ca22..d02141157abe 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -371,8 +371,10 @@
 #include "qla1280.h"
 
 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
+#ifdef CONFIG_SCSI_QLOGIC_1280_DMA_64BIT_ADDRESSING
 #define QLA_64BIT_PTR	1
 #endif
+#endif
 
 #define NVRAM_DELAY()			udelay(500)	/* 2 microseconds */
 
-- 
2.49.0


  reply	other threads:[~2025-07-28 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 16:34 [PATCH 0/1] scsi: qla1280: Make 64-bit DMA addressing a Kconfig option Magnus Lindholm
2025-07-28 16:34 ` Magnus Lindholm [this message]
2025-07-29  7:32   ` [PATCH 1/1] " Christoph Hellwig
2025-07-29  8:58     ` Magnus Lindholm
2025-07-31  9:40 ` [PATCH 0/1] " Maciej W. Rozycki
2025-08-05  8:52   ` Magnus Lindholm
2025-09-01 21:41     ` Magnus Lindholm

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=20250728163752.9778-2-linmag7@gmail.com \
    --to=linmag7@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hch@infradead.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=martin.petersen@oracle.com \
    /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.