aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-01-03 16:05:12 +1100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-01-06 21:42:54 -0500
commit3be1b3ea6de93b6b58c37dc3fafcf3ec228880ed (patch)
treed5e934bed7e63af87fef8e8a5897c3bfc7923972 /drivers/scsi/NCR5380.c
parentatari_NCR5380: Remove RESET_BOOT, CONFIG_ATARI_SCSI_TOSHIBA_DELAY and CONFIG_ATARI_SCSI_RESET_BOOT (diff)
downloadlinux-dev-3be1b3ea6de93b6b58c37dc3fafcf3ec228880ed.tar.xz
linux-dev-3be1b3ea6de93b6b58c37dc3fafcf3ec228880ed.zip
ncr5380: Simplify bus reset handlers
Make use of do_reset() in the bus reset handler in atari_NCR5380.c. The version in NCR5380.c already does so. Keep them in sync. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r--drivers/scsi/NCR5380.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 7ccf2e37b6ad..b9755000b48f 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -668,7 +668,7 @@ static void prepare_info(struct Scsi_Host *instance)
* Locks: called functions disable irqs
*/
-static void NCR5380_print_status(struct Scsi_Host *instance)
+static void __maybe_unused NCR5380_print_status(struct Scsi_Host *instance)
{
NCR5380_dprint(NDEBUG_ANY, instance);
NCR5380_dprint_phase(NDEBUG_ANY, instance);
@@ -2693,24 +2693,26 @@ static int NCR5380_abort(struct scsi_cmnd *cmd)
}
-/*
- * Function : int NCR5380_bus_reset (struct scsi_cmnd *cmd)
- *
- * Purpose : reset the SCSI bus.
- *
- * Returns : SUCCESS
+/**
+ * NCR5380_bus_reset - reset the SCSI bus
+ * @cmd: SCSI command undergoing EH
*
- * Locks: host lock taken by caller
+ * Returns SUCCESS
*/
static int NCR5380_bus_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance = cmd->device->host;
+ spin_lock_irq(instance->host_lock);
+
+#if (NDEBUG & NDEBUG_ANY)
+ scmd_printk(KERN_INFO, cmd, "performing bus reset\n");
NCR5380_print_status(instance);
+#endif
- spin_lock_irq(instance->host_lock);
do_reset(instance);
+
spin_unlock_irq(instance->host_lock);
return SUCCESS;