linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
Cc: linux-arch@vger.kernel.org,
	Miquel van Smoorenburg <mikevs@xs4all.net>,
	linux-scsi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	linux-m68k@lists.linux-m68k.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Martyn Welch <martyn@welchs.me.uk>,
	Manohar Vanga <manohar.vanga@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, Denis Efremov <efremov@linux.com>,
	Mark Salyzyn <salyzyn@android.com>,
	Christoph Hellwig <hch@infradead.org>,
	iommu@lists.linux-foundation.org, linux-parisc@vger.kernel.org,
	linux-alpha@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	Khalid Aziz <khalid@gonehiking.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH 4/6] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency
Date: Mon,  6 Jun 2022 10:41:07 +0200	[thread overview]
Message-ID: <20220606084109.4108188-5-arnd@kernel.org> (raw)
In-Reply-To: <20220606084109.4108188-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008 but
it a stale reference in a broken error handling code path that could
never work.

Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency.

The alternative to this would be to just remove the driver, as it is
clearly obsolete. The i2o driver layer was removed in 2015 with commit
4a72a7af462d ("staging: remove i2o subsystem"), but the even older
dpt_i2o scsi driver stayed around.

The last non-cleanup patches I could find were from Miquel van
Smoorenburg and Mark Salyzyn back in 2008, they might know if
there is any chance of the hardware still being used anywhere.

Fixes: 67af2b060e02 ("[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent")
Cc: Miquel van Smoorenburg <mikevs@xs4all.net>
Cc: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/Kconfig   | 2 +-
 drivers/scsi/dpt_i2o.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index a9fe5152addd..cf75588a2587 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -460,7 +460,7 @@ config SCSI_MVUMI
 
 config SCSI_DPT_I2O
 	tristate "Adaptec I2O RAID support "
-	depends on SCSI && PCI && VIRT_TO_BUS
+	depends on SCSI && PCI
 	help
 	  This driver supports all of Adaptec's I2O based RAID controllers as 
 	  well as the DPT SmartRaid V cards.  This is an Adaptec maintained
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 2e9155ba7408..55dfe7011912 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -52,11 +52,11 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");
 
 #include <linux/timer.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 
 #include <asm/processor.h>	/* for boot_cpu_data */
-#include <asm/io.h>		/* for virt_to_bus, etc. */
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -2112,7 +2112,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id)
 		} else {
 			/* Ick, we should *never* be here */
 			printk(KERN_ERR "dpti: reply frame not from pool\n");
-			reply = (u8 *)bus_to_virt(m);
+			goto out;
 		}
 
 		if (readl(reply) & MSG_FAIL) {
-- 
2.29.2


  parent reply	other threads:[~2022-06-06  8:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06  8:41 [PATCH 0/6] phase out CONFIG_VIRT_TO_BUS Arnd Bergmann
2022-06-06  8:41 ` [PATCH 1/6] vme: remove ca91cx42 Universe-II support Arnd Bergmann
2022-06-06  8:41 ` [PATCH 2/6] vme: move back to staging Arnd Bergmann
2022-06-06  8:41 ` [PATCH 3/6] media: sta2x11: remove VIRT_TO_BUS dependency Arnd Bergmann
2022-06-06  8:41 ` Arnd Bergmann [this message]
2022-06-06  8:41 ` [PATCH 5/6] scsi: remove stale BusLogic driver Arnd Bergmann
2022-06-06 10:40   ` Maciej W. Rozycki
2022-06-06 15:00     ` Arnd Bergmann
2022-06-06 16:35   ` Khalid Aziz
2022-06-08  8:19     ` Arnd Bergmann
2022-06-06  8:41 ` [PATCH 6/6] arch/*/: remove CONFIG_VIRT_TO_BUS Arnd Bergmann
2022-06-07  7:29   ` Geert Uytterhoeven
2022-06-07 12:33   ` Michael Ellerman
2022-06-06  9:25 ` [PATCH 0/6] phase out CONFIG_VIRT_TO_BUS Greg Kroah-Hartman
2022-06-06 15:01   ` Arnd Bergmann
2022-06-07  9:09   ` Martyn Welch

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=20220606084109.4108188-5-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=efremov@linux.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=khalid@gonehiking.org \
    --cc=kuba@kernel.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m.szyprowski@samsung.com \
    --cc=manohar.vanga@gmail.com \
    --cc=martyn@welchs.me.uk \
    --cc=mikevs@xs4all.net \
    --cc=robin.murphy@arm.com \
    --cc=salyzyn@android.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).