All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Hannes Reinecke <hare@suse.com>
Subject: [PATCH 11/28] scsi: drop bus reset for wd33c93-compatible boards
Date: Wed, 28 Jun 2017 10:24:59 +0200	[thread overview]
Message-ID: <1498638316-44420-12-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1498638316-44420-1-git-send-email-hare@suse.de>

The bus reset function is just a wrapper calling host reset
under the host lock. So move taking of the host lock into
the host reset function and drop bus reset.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/a2091.c   | 17 -----------------
 drivers/scsi/a3000.c   | 17 -----------------
 drivers/scsi/gvp11.c   | 18 ------------------
 drivers/scsi/mvme147.c | 16 ----------------
 drivers/scsi/sgiwd93.c | 15 ---------------
 drivers/scsi/wd33c93.c |  2 ++
 6 files changed, 2 insertions(+), 83 deletions(-)

diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 9176bfb..61aadc7 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -147,22 +147,6 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 	}
 }
 
-static int a2091_bus_reset(struct scsi_cmnd *cmd)
-{
-	struct Scsi_Host *instance = cmd->device->host;
-
-	/* FIXME perform bus-specific reset */
-
-	/* FIXME 2: kill this function, and let midlayer fall back
-	   to the same action, calling wd33c93_host_reset() */
-
-	spin_lock_irq(instance->host_lock);
-	wd33c93_host_reset(cmd);
-	spin_unlock_irq(instance->host_lock);
-
-	return SUCCESS;
-}
-
 static struct scsi_host_template a2091_scsi_template = {
 	.module			= THIS_MODULE,
 	.name			= "Commodore A2091/A590 SCSI",
@@ -171,7 +155,6 @@ static int a2091_bus_reset(struct scsi_cmnd *cmd)
 	.proc_name		= "A2901",
 	.queuecommand		= wd33c93_queuecommand,
 	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= a2091_bus_reset,
 	.eh_host_reset_handler	= wd33c93_host_reset,
 	.can_queue		= CAN_QUEUE,
 	.this_id		= 7,
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index e6375b4..2427a85 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -162,22 +162,6 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 	}
 }
 
-static int a3000_bus_reset(struct scsi_cmnd *cmd)
-{
-	struct Scsi_Host *instance = cmd->device->host;
-
-	/* FIXME perform bus-specific reset */
-
-	/* FIXME 2: kill this entire function, which should
-	   cause mid-layer to call wd33c93_host_reset anyway? */
-
-	spin_lock_irq(instance->host_lock);
-	wd33c93_host_reset(cmd);
-	spin_unlock_irq(instance->host_lock);
-
-	return SUCCESS;
-}
-
 static struct scsi_host_template amiga_a3000_scsi_template = {
 	.module			= THIS_MODULE,
 	.name			= "Amiga 3000 built-in SCSI",
@@ -186,7 +170,6 @@ static int a3000_bus_reset(struct scsi_cmnd *cmd)
 	.proc_name		= "A3000",
 	.queuecommand		= wd33c93_queuecommand,
 	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= a3000_bus_reset,
 	.eh_host_reset_handler	= wd33c93_host_reset,
 	.can_queue		= CAN_QUEUE,
 	.this_id		= 7,
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 3b6f83f..a27fc49 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -171,23 +171,6 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 	}
 }
 
-static int gvp11_bus_reset(struct scsi_cmnd *cmd)
-{
-	struct Scsi_Host *instance = cmd->device->host;
-
-	/* FIXME perform bus-specific reset */
-
-	/* FIXME 2: shouldn't we no-op this function (return
-	   FAILED), and fall back to host reset function,
-	   wd33c93_host_reset ? */
-
-	spin_lock_irq(instance->host_lock);
-	wd33c93_host_reset(cmd);
-	spin_unlock_irq(instance->host_lock);
-
-	return SUCCESS;
-}
-
 static struct scsi_host_template gvp11_scsi_template = {
 	.module			= THIS_MODULE,
 	.name			= "GVP Series II SCSI",
@@ -196,7 +179,6 @@ static int gvp11_bus_reset(struct scsi_cmnd *cmd)
 	.proc_name		= "GVP11",
 	.queuecommand		= wd33c93_queuecommand,
 	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= gvp11_bus_reset,
 	.eh_host_reset_handler	= wd33c93_host_reset,
 	.can_queue		= CAN_QUEUE,
 	.this_id		= 7,
diff --git a/drivers/scsi/mvme147.c b/drivers/scsi/mvme147.c
index e7f6661..4f51570 100644
--- a/drivers/scsi/mvme147.c
+++ b/drivers/scsi/mvme147.c
@@ -121,21 +121,6 @@ int mvme147_detect(struct scsi_host_template *tpnt)
 	return 0;
 }
 
-static int mvme147_bus_reset(struct scsi_cmnd *cmd)
-{
-	/* FIXME perform bus-specific reset */
-
-	/* FIXME 2: kill this function, and let midlayer fallback to
-	   the same result, calling wd33c93_host_reset() */
-
-	spin_lock_irq(cmd->device->host->host_lock);
-	wd33c93_host_reset(cmd);
-	spin_unlock_irq(cmd->device->host->host_lock);
-
-	return SUCCESS;
-}
-
-
 static struct scsi_host_template driver_template = {
 	.proc_name		= "MVME147",
 	.name			= "MVME147 built-in SCSI",
@@ -143,7 +128,6 @@ static int mvme147_bus_reset(struct scsi_cmnd *cmd)
 	.release		= mvme147_release,
 	.queuecommand		= wd33c93_queuecommand,
 	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= mvme147_bus_reset,
 	.eh_host_reset_handler	= wd33c93_host_reset,
 	.can_queue		= CAN_QUEUE,
 	.this_id		= 7,
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index 80cfa93..5ed696d 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -192,20 +192,6 @@ static inline void init_hpc_chain(struct ip22_hostdata *hdata)
 	hcp->desc.pnext = hdata->dma;
 }
 
-static int sgiwd93_bus_reset(struct scsi_cmnd *cmd)
-{
-	/* FIXME perform bus-specific reset */
-
-	/* FIXME 2: kill this function, and let midlayer fallback
-	   to the same result, calling wd33c93_host_reset() */
-
-	spin_lock_irq(cmd->device->host->host_lock);
-	wd33c93_host_reset(cmd);
-	spin_unlock_irq(cmd->device->host->host_lock);
-
-	return SUCCESS;
-}
-
 /*
  * Kludge alert - the SCSI code calls the abort and reset method with int
  * arguments not with pointers.  So this is going to blow up beautyfully
@@ -217,7 +203,6 @@ static int sgiwd93_bus_reset(struct scsi_cmnd *cmd)
 	.name			= "SGI WD93",
 	.queuecommand		= wd33c93_queuecommand,
 	.eh_abort_handler	= wd33c93_abort,
-	.eh_bus_reset_handler	= sgiwd93_bus_reset,
 	.eh_host_reset_handler	= wd33c93_host_reset,
 	.can_queue		= 16,
 	.this_id		= 7,
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index 9e09da4..74be04f 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -1578,6 +1578,7 @@
 	int i;
 
 	instance = SCpnt->device->host;
+	spin_lock_irq(instance->host_lock);
 	hostdata = (struct WD33C93_hostdata *) instance->hostdata;
 
 	printk("scsi%d: reset. ", instance->host_no);
@@ -1603,6 +1604,7 @@
 	reset_wd33c93(instance);
 	SCpnt->result = DID_RESET << 16;
 	enable_irq(instance->irq);
+	spin_unlock_irq(instance->host_lock);
 	return SUCCESS;
 }
 
-- 
1.8.5.6

  parent reply	other threads:[~2017-06-28  8:31 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  8:24 [PATCH 00/28] SCSI EH argument reshuffle part I Hannes Reinecke
2017-06-28  8:24 ` [PATCH 01/28] scsi: fix comment in scsi_device_set_state() Hannes Reinecke
2017-06-28  8:36   ` Johannes Thumshirn
2017-06-28 13:54   ` Christoph Hellwig
2017-06-28  8:24 ` [PATCH 02/28] mptfc: Do not call fc_block_scsi_eh() on host reset Hannes Reinecke
2017-06-28  8:36   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 03/28] ibmvfc: " Hannes Reinecke
2017-06-28  8:37   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 04/28] fc_fcp: do not call fc_block_scsi_eh() from " Hannes Reinecke
2017-06-28  8:37   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 05/28] fnic: do not call host reset from command abort Hannes Reinecke
2017-06-28  8:38   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 06/28] uas: move eh_bus_reset_handler to eh_device_reset_handler Hannes Reinecke
2017-06-28  8:39   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 07/28] libsas: move bus_reset_handler() to target_reset_handler() Hannes Reinecke
2017-06-28  8:41   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 08/28] bfa: move bus reset to target reset Hannes Reinecke
2017-06-28  8:44   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 09/28] hptiop: Simplify reset handling Hannes Reinecke
2017-06-28  8:45   ` Johannes Thumshirn
2017-06-28  8:24 ` [PATCH 10/28] fdomain: move bus reset to host reset Hannes Reinecke
2017-06-28  8:45   ` Johannes Thumshirn
2017-06-28 13:55   ` Christoph Hellwig
2017-06-28  8:24 ` Hannes Reinecke [this message]
2017-06-28  8:46   ` [PATCH 11/28] scsi: drop bus reset for wd33c93-compatible boards Johannes Thumshirn
2017-06-28 13:56   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 12/28] rtsx: drop bus reset function Hannes Reinecke
2017-06-28  8:47   ` Johannes Thumshirn
2017-06-28  8:25 ` [PATCH 13/28] qlogicpti: move bus reset to host reset Hannes Reinecke
2017-06-28  8:54   ` Johannes Thumshirn
2017-06-28  8:25 ` [PATCH 14/28] acornscsi: " Hannes Reinecke
2017-06-28  8:55   ` Johannes Thumshirn
2017-06-28  8:25 ` [PATCH 15/28] NCR5380: Move " Hannes Reinecke
2017-06-28  8:55   ` Johannes Thumshirn
2017-06-28 13:57   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 16/28] qlogicfas: move bus_reset to host_reset Hannes Reinecke
2017-06-28  8:56   ` Johannes Thumshirn
2017-06-28  8:25 ` [PATCH 17/28] imm: drop duplicate bus_reset handler Hannes Reinecke
2017-06-28  8:58   ` Johannes Thumshirn
2017-06-28 13:57   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 18/28] ppa: " Hannes Reinecke
2017-06-28  8:58   ` Johannes Thumshirn
2017-06-28 13:58   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 19/28] qedf: drop bus reset handler Hannes Reinecke
2017-06-28 13:58   ` Christoph Hellwig
2017-06-28 14:07     ` Chad Dupuis
2017-06-28 14:37       ` Christoph Hellwig
2017-06-28 15:05         ` Chad Dupuis
2017-06-28  8:25 ` [PATCH 20/28] nsp32: drop bus reset Hannes Reinecke
2017-06-28  8:59   ` Johannes Thumshirn
2017-06-28 14:00   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 21/28] aha152x: " Hannes Reinecke
2017-06-28  9:00   ` Johannes Thumshirn
2017-06-28 14:02   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 22/28] 53c700: move bus reset to host reset Hannes Reinecke
2017-06-28 14:05   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 23/28] bnx2fc: remove obsolete bnx2fc_eh_host_reset() definition Hannes Reinecke
2017-06-28  9:01   ` Johannes Thumshirn
2017-06-28  8:25 ` [PATCH 24/28] megaraid_mbox: drop duplicate bus reset and device reset function Hannes Reinecke
2017-06-28  9:01   ` Johannes Thumshirn
2017-06-28 14:05   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 25/28] lpfc: drop lpfc_no_handler and lpfc_bus_reset_handler() Hannes Reinecke
2017-06-28  8:25 ` [PATCH 26/28] visorhba: sanitze private device data allocation Hannes Reinecke
2017-06-30 20:16   ` Kershner, David A
     [not found]   ` <CY4PR07MB3176109C5BDB7B51AD3BB73FF0A60@CY4PR07MB3176.namprd07.prod.outlook.com>
2017-07-24  9:28     ` Hannes Reinecke
2017-06-28  8:25 ` [PATCH 27/28] eata: remove 'arg_done' from eata2x_eh_host_reset() Hannes Reinecke
2017-06-28  9:03   ` Johannes Thumshirn
2017-06-28 14:06   ` Christoph Hellwig
2017-06-28  8:25 ` [PATCH 28/28] NCR5380: Clear all unissued commands on host reset Hannes Reinecke
2017-06-28  9:04   ` Johannes Thumshirn

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=1498638316-44420-12-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --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.