Re: [PATCH 20/28] nsp32: drop bus reset

2017-06-28 Thread Christoph Hellwig
On Wed, Jun 28, 2017 at 10:25:08AM +0200, Hannes Reinecke wrote:
> From: Hannes Reinecke 
> 
> bus reset is essentially identical to host reset, and will always
> return SUCCESS, thus disabling the use of host reset.
> So drop bus reset in favour of host reset.
> 
> Signed-off-by: Hannes Reinecke 

nsp32_eh_host_reset additionally calls nsp32hw_init, so they
don't really look "mostly" the same.  That being said I think
the bus_reset as-is is probably rather useless.


Re: [PATCH 20/28] nsp32: drop bus reset

2017-06-28 Thread Johannes Thumshirn

Reviewed-by: Johannes Thumshirn 
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


[PATCH 20/28] nsp32: drop bus reset

2017-06-28 Thread Hannes Reinecke
From: Hannes Reinecke 

bus reset is essentially identical to host reset, and will always
return SUCCESS, thus disabling the use of host reset.
So drop bus reset in favour of host reset.

Signed-off-by: Hannes Reinecke 
---
 drivers/scsi/nsp32.c | 22 +-
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 53c8477..107e191 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -201,7 +201,6 @@
 
 /* SCSI error handler */
 static int nsp32_eh_abort (struct scsi_cmnd *);
-static int nsp32_eh_bus_reset (struct scsi_cmnd *);
 static int nsp32_eh_host_reset(struct scsi_cmnd *);
 
 /* generate SCSI message */
@@ -276,8 +275,7 @@
.max_sectors= 128,
.this_id= NSP32_HOST_SCSIID,
.use_clustering = DISABLE_CLUSTERING,
-   .eh_abort_handler   = nsp32_eh_abort,
-   .eh_bus_reset_handler   = nsp32_eh_bus_reset,
+   .eh_abort_handler   = nsp32_eh_abort,
.eh_host_reset_handler  = nsp32_eh_host_reset,
 /* .highmem_io = 1, */
 };
@@ -2845,24 +2843,6 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt)
return SUCCESS;
 }
 
-static int nsp32_eh_bus_reset(struct scsi_cmnd *SCpnt)
-{
-   nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
-   unsigned int   base = SCpnt->device->host->io_port;
-
-   spin_lock_irq(SCpnt->device->host->host_lock);
-
-   nsp32_msg(KERN_INFO, "Bus Reset");  
-   nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt);
-
-   nsp32_write2(base, IRQ_CONTROL, IRQ_CONTROL_ALL_IRQ_MASK);
-   nsp32_do_bus_reset(data);
-   nsp32_write2(base, IRQ_CONTROL, 0);
-
-   spin_unlock_irq(SCpnt->device->host->host_lock);
-   return SUCCESS; /* SCSI bus reset is succeeded at any time. */
-}
-
 static void nsp32_do_bus_reset(nsp32_hw_data *data)
 {
unsigned int   base = data->BaseAddress;
-- 
1.8.5.6