diff options
author | Hannes Reinecke <hare@suse.com> | 2017-08-25 07:57:15 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 17:21:11 -0400 |
commit | 71b2e66336fc2746ad072e22d3104a42561b436f (patch) | |
tree | c7083ae5575c006df83ce46988cb909791cb08e7 /drivers/scsi/nsp32.c | |
parent | a81ac3b046f2dd15b4a6933b18b7a2139d26b204 (diff) |
scsi: nsp32: drop bus reset
bus reset is a host reset without nsp32hw_init(), 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 <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/nsp32.c')
-rw-r--r-- | drivers/scsi/nsp32.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 53c84771f0e8..107e191bf023 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -201,7 +201,6 @@ static int nsp32_release (struct Scsi_Host *); | |||
201 | 201 | ||
202 | /* SCSI error handler */ | 202 | /* SCSI error handler */ |
203 | static int nsp32_eh_abort (struct scsi_cmnd *); | 203 | static int nsp32_eh_abort (struct scsi_cmnd *); |
204 | static int nsp32_eh_bus_reset (struct scsi_cmnd *); | ||
205 | static int nsp32_eh_host_reset(struct scsi_cmnd *); | 204 | static int nsp32_eh_host_reset(struct scsi_cmnd *); |
206 | 205 | ||
207 | /* generate SCSI message */ | 206 | /* generate SCSI message */ |
@@ -276,8 +275,7 @@ static struct scsi_host_template nsp32_template = { | |||
276 | .max_sectors = 128, | 275 | .max_sectors = 128, |
277 | .this_id = NSP32_HOST_SCSIID, | 276 | .this_id = NSP32_HOST_SCSIID, |
278 | .use_clustering = DISABLE_CLUSTERING, | 277 | .use_clustering = DISABLE_CLUSTERING, |
279 | .eh_abort_handler = nsp32_eh_abort, | 278 | .eh_abort_handler = nsp32_eh_abort, |
280 | .eh_bus_reset_handler = nsp32_eh_bus_reset, | ||
281 | .eh_host_reset_handler = nsp32_eh_host_reset, | 279 | .eh_host_reset_handler = nsp32_eh_host_reset, |
282 | /* .highmem_io = 1, */ | 280 | /* .highmem_io = 1, */ |
283 | }; | 281 | }; |
@@ -2845,24 +2843,6 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt) | |||
2845 | return SUCCESS; | 2843 | return SUCCESS; |
2846 | } | 2844 | } |
2847 | 2845 | ||
2848 | static int nsp32_eh_bus_reset(struct scsi_cmnd *SCpnt) | ||
2849 | { | ||
2850 | nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; | ||
2851 | unsigned int base = SCpnt->device->host->io_port; | ||
2852 | |||
2853 | spin_lock_irq(SCpnt->device->host->host_lock); | ||
2854 | |||
2855 | nsp32_msg(KERN_INFO, "Bus Reset"); | ||
2856 | nsp32_dbg(NSP32_DEBUG_BUSRESET, "SCpnt=0x%x", SCpnt); | ||
2857 | |||
2858 | nsp32_write2(base, IRQ_CONTROL, IRQ_CONTROL_ALL_IRQ_MASK); | ||
2859 | nsp32_do_bus_reset(data); | ||
2860 | nsp32_write2(base, IRQ_CONTROL, 0); | ||
2861 | |||
2862 | spin_unlock_irq(SCpnt->device->host->host_lock); | ||
2863 | return SUCCESS; /* SCSI bus reset is succeeded at any time. */ | ||
2864 | } | ||
2865 | |||
2866 | static void nsp32_do_bus_reset(nsp32_hw_data *data) | 2846 | static void nsp32_do_bus_reset(nsp32_hw_data *data) |
2867 | { | 2847 | { |
2868 | unsigned int base = data->BaseAddress; | 2848 | unsigned int base = data->BaseAddress; |