From patchwork Wed Mar 14 11:48:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10281941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BD3E6038F for ; Wed, 14 Mar 2018 11:49:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 793932866C for ; Wed, 14 Mar 2018 11:49:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DD5828852; Wed, 14 Mar 2018 11:49:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C76182866C for ; Wed, 14 Mar 2018 11:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751599AbeCNLtu (ORCPT ); Wed, 14 Mar 2018 07:49:50 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45156 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbeCNLtb (ORCPT ); Wed, 14 Mar 2018 07:49:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AzWQZjNnaG774Ez3wijFpXkXrwNschhS+mkNddnEbYI=; b=lemEmfIDlh7QMLfx2F8KZt4v6 bpMVOONzHMMuXkRv5HNuI/kbKzb7/MMXM66uIA/cUc5/QQ5PX25oc6FNx65elyB7kgR3fvg/3CPAP f4lbDyqRI6XHPn5AHMacplmZjyFGN7UunrRAJsm5zwSxeX2CUKsRwf6rq03dvTF+LeKEIpEIFIopz dlZpiE+PNcvbK9AaQ1bEA+J+gZc6mEG0haihOq/v0mPwpWrBAytUhKf/SkGpnJmjNPmeh+yztf+tE h0azrBTw6Je/mu4OMaJdvXZUBf26cwDrrd/yH5I9YsnvwMzesn8A3d6uOT2yCocgrKT9UqsklYFLw 72av9SWvw==; Received: from 77.117.139.172.wireless.dyn.drei.com ([77.117.139.172] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ew4uN-0007Se-Eu; Wed, 14 Mar 2018 11:49:28 +0000 From: Christoph Hellwig To: "Martin K. Petersen" Cc: aacraid@adaptec.com, linuxdrivers@attotech.com, linux-m68k@lists.linux-m68k.org, linux-scsi@vger.kernel.org Subject: [PATCH 10/12] scsi: remove the mvme147 driver Date: Wed, 14 Mar 2018 12:48:32 +0100 Message-Id: <20180314114834.17380-11-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180314114834.17380-1-hch@lst.de> References: <20180314114834.17380-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver hasn't seen any recent bug fixing and is one of the last drivers using the scsi_module.c infrastruture that has been deprecated 15 years ago. Signed-off-by: Christoph Hellwig --- drivers/scsi/Kconfig | 8 --- drivers/scsi/Makefile | 1 - drivers/scsi/mvme147.c | 151 ------------------------------------------------- drivers/scsi/mvme147.h | 25 -------- drivers/scsi/wd33c93.c | 5 -- 5 files changed, 190 deletions(-) delete mode 100644 drivers/scsi/mvme147.c delete mode 100644 drivers/scsi/mvme147.h diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 11e89e56b865..a95084008fe0 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1390,14 +1390,6 @@ config SCSI_MAC_ESP To compile this driver as a module, choose M here: the module will be called mac_esp. -config MVME147_SCSI - bool "WD33C93 SCSI driver for MVME147" - depends on MVME147 && SCSI=y - select SCSI_SPI_ATTRS - help - Support for the on-board SCSI controller on the Motorola MVME147 - single-board computer. - config MVME16x_SCSI tristate "NCR53C710 SCSI driver for MVME16x" depends on MVME16x && SCSI diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index d5135efbf9cd..9575f291acda 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -51,7 +51,6 @@ obj-$(CONFIG_SCSI_ZORRO7XX) += 53c700.o zorro7xx.o obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o -obj-$(CONFIG_MVME147_SCSI) += mvme147.o wd33c93.o obj-$(CONFIG_SGIWD93_SCSI) += sgiwd93.o wd33c93.o obj-$(CONFIG_ATARI_SCSI) += atari_scsi.o obj-$(CONFIG_MAC_SCSI) += mac_scsi.o diff --git a/drivers/scsi/mvme147.c b/drivers/scsi/mvme147.c deleted file mode 100644 index e6b2b681fda3..000000000000 --- a/drivers/scsi/mvme147.c +++ /dev/null @@ -1,151 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi.h" -#include -#include "wd33c93.h" -#include "mvme147.h" - -#include - - -static irqreturn_t mvme147_intr(int irq, void *data) -{ - struct Scsi_Host *instance = data; - - if (irq == MVME147_IRQ_SCSI_PORT) - wd33c93_intr(instance); - else - m147_pcc->dma_intr = 0x89; /* Ack and enable ints */ - return IRQ_HANDLED; -} - -static int dma_setup(struct scsi_cmnd *cmd, int dir_in) -{ - struct Scsi_Host *instance = cmd->device->host; - struct WD33C93_hostdata *hdata = shost_priv(instance); - unsigned char flags = 0x01; - unsigned long addr = virt_to_bus(cmd->SCp.ptr); - - /* setup dma direction */ - if (!dir_in) - flags |= 0x04; - - /* remember direction */ - hdata->dma_dir = dir_in; - - if (dir_in) { - /* invalidate any cache */ - cache_clear(addr, cmd->SCp.this_residual); - } else { - /* push any dirty cache */ - cache_push(addr, cmd->SCp.this_residual); - } - - /* start DMA */ - m147_pcc->dma_bcr = cmd->SCp.this_residual | (1 << 24); - m147_pcc->dma_dadr = addr; - m147_pcc->dma_cntrl = flags; - - /* return success */ - return 0; -} - -static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, - int status) -{ - m147_pcc->dma_cntrl = 0; -} - -int mvme147_detect(struct scsi_host_template *tpnt) -{ - static unsigned char called = 0; - struct Scsi_Host *instance; - wd33c93_regs regs; - struct WD33C93_hostdata *hdata; - - if (!MACH_IS_MVME147 || called) - return 0; - called++; - - tpnt->proc_name = "MVME147"; - tpnt->show_info = wd33c93_show_info, - tpnt->write_info = wd33c93_write_info, - - instance = scsi_register(tpnt, sizeof(struct WD33C93_hostdata)); - if (!instance) - goto err_out; - - instance->base = 0xfffe4000; - instance->irq = MVME147_IRQ_SCSI_PORT; - regs.SASR = (volatile unsigned char *)0xfffe4000; - regs.SCMD = (volatile unsigned char *)0xfffe4001; - hdata = shost_priv(instance); - hdata->no_sync = 0xff; - hdata->fast = 0; - hdata->dma_mode = CTRL_DMA; - wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); - - if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, - "MVME147 SCSI PORT", instance)) - goto err_unregister; - if (request_irq(MVME147_IRQ_SCSI_DMA, mvme147_intr, 0, - "MVME147 SCSI DMA", instance)) - goto err_free_irq; -#if 0 /* Disabled; causes problems booting */ - m147_pcc->scsi_interrupt = 0x10; /* Assert SCSI bus reset */ - udelay(100); - m147_pcc->scsi_interrupt = 0x00; /* Negate SCSI bus reset */ - udelay(2000); - m147_pcc->scsi_interrupt = 0x40; /* Clear bus reset interrupt */ -#endif - m147_pcc->scsi_interrupt = 0x09; /* Enable interrupt */ - - m147_pcc->dma_cntrl = 0x00; /* ensure DMA is stopped */ - m147_pcc->dma_intr = 0x89; /* Ack and enable ints */ - - return 1; - -err_free_irq: - free_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr); -err_unregister: - scsi_unregister(instance); -err_out: - return 0; -} - -static struct scsi_host_template driver_template = { - .proc_name = "MVME147", - .name = "MVME147 built-in SCSI", - .detect = mvme147_detect, - .release = mvme147_release, - .queuecommand = wd33c93_queuecommand, - .eh_abort_handler = wd33c93_abort, - .eh_host_reset_handler = wd33c93_host_reset, - .can_queue = CAN_QUEUE, - .this_id = 7, - .sg_tablesize = SG_ALL, - .cmd_per_lun = CMD_PER_LUN, - .use_clustering = ENABLE_CLUSTERING -}; - - -#include "scsi_module.c" - -int mvme147_release(struct Scsi_Host *instance) -{ -#ifdef MODULE - /* XXX Make sure DMA is stopped! */ - free_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr); - free_irq(MVME147_IRQ_SCSI_DMA, mvme147_intr); -#endif - return 1; -} diff --git a/drivers/scsi/mvme147.h b/drivers/scsi/mvme147.h deleted file mode 100644 index f75ff58ddcd0..000000000000 --- a/drivers/scsi/mvme147.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef MVME147_H - -/* $Id: mvme147.h,v 1.4 1997/01/19 23:07:10 davem Exp $ - * - * Header file for the MVME147 built-in SCSI controller for Linux - * - * Written and (C) 1993, Hamish Macdonald, see mvme147.c for more info - * - */ - -#include - -int mvme147_detect(struct scsi_host_template *); -int mvme147_release(struct Scsi_Host *); - -#ifndef CMD_PER_LUN -#define CMD_PER_LUN 2 -#endif - -#ifndef CAN_QUEUE -#define CAN_QUEUE 16 -#endif - -#endif /* MVME147_H */ diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 74be04f2357c..00a53cf138d1 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c @@ -1540,11 +1540,6 @@ reset_wd33c93(struct Scsi_Host *instance) DEFAULT_SX_OFF, 0, hostdata->sx_table)); write_wd33c93(regs, WD_COMMAND, WD_CMD_RESET); - -#ifdef CONFIG_MVME147_SCSI - udelay(25); /* The old wd33c93 on MVME147 needs this, at least */ -#endif - while (!(read_aux_stat(regs) & ASR_INT)) ; sr = read_wd33c93(regs, WD_SCSI_STATUS);