From patchwork Mon Jun 6 08:41:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 579761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8483FCCA473 for ; Mon, 6 Jun 2022 08:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232665AbiFFIny (ORCPT ); Mon, 6 Jun 2022 04:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232361AbiFFImf (ORCPT ); Mon, 6 Jun 2022 04:42:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDCF612C955; Mon, 6 Jun 2022 01:42:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 44F796123A; Mon, 6 Jun 2022 08:41:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAD17C385A9; Mon, 6 Jun 2022 08:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654504901; bh=sHZYUEjwBxBUleP6rLOntUs99pabhsyegEx2gHHwIp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TzxWXINo1szvP//HX7+WO9BRKXewDZPzIIdGvyF/Nn5zCPrLG4V1kGVA4TZH9K9xm ChbDj2KBLN1GQNsPkNCOY3ZQ/jbpwcZpzlXpR4YxtQ+nVyRQQR2UQTc9bWaJfgAidS tavX/6u1PtZPBPln8CbqRNXSKoCeDaHDUbwMdeWjaklM8H4oAQJHfzLC35bfnMJixG HR6nFTHRz6awyzemzgxIDpsr0zAXvHqmyqqOp7TL49K2LcH6t+UqrChJ9Vhy+u8SQS 7Nr9qd7nez9GTPFdOY3KVbc5cFAerEaIfHjq8kOVaiyzrnGlcs7SB9MNNemingOQuD sED60jF5bByNg== From: Arnd Bergmann Cc: Arnd Bergmann , Jakub Kicinski , Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, Khalid Aziz , linux-scsi@vger.kernel.org, Manohar Vanga , Martyn Welch , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-parisc@vger.kernel.org, Denis Efremov , Miquel van Smoorenburg , Mark Salyzyn Subject: [PATCH 4/6] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency Date: Mon, 6 Jun 2022 10:41:07 +0200 Message-Id: <20220606084109.4108188-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220606084109.4108188-1-arnd@kernel.org> References: <20220606084109.4108188-1-arnd@kernel.org> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arnd Bergmann 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 Cc: Mark Salyzyn Signed-off-by: Arnd Bergmann --- 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 #include +#include #include #include #include /* for boot_cpu_data */ -#include /* for virt_to_bus, etc. */ #include #include @@ -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) {