Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 997acab7 authored by Finn Thain's avatar Finn Thain Committed by Christoph Hellwig
Browse files

ncr5380: Remove redundant AUTOSENSE macro



Every NCR5380 driver sets AUTOSENSE so it need not be optional (and the
mid-layer expects it). Remove this redundant macro to improve readability.

Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 76f13b93
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -627,9 +627,6 @@ NCR5380_print_options(struct Scsi_Host *instance)
#ifdef AUTOPROBE_IRQ
	       " AUTOPROBE_IRQ"
#endif
#ifdef AUTOSENSE
	       " AUTOSENSE"
#endif
#ifdef DIFFERENTIAL
	       " DIFFERENTIAL"
#endif
@@ -857,12 +854,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
	hostdata->host = instance;
	hostdata->time_expires = 0;

#ifndef AUTOSENSE
	if ((instance->cmd_per_lun > 1) || instance->can_queue > 1)
		    printk(KERN_WARNING "scsi%d : WARNING : support for multiple outstanding commands enabled\n" "         without AUTOSENSE option, contingent allegiance conditions may\n"
		    	   "         be incorrectly cleared.\n", instance->host_no);
#endif				/* def AUTOSENSE */

	NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
	NCR5380_write(MODE_REG, MR_BASE);
	NCR5380_write(TARGET_COMMAND_REG, 0);
@@ -2260,7 +2251,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
					else if (status_byte(cmd->SCp.Status) != GOOD)
						cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16);

#ifdef AUTOSENSE
					if ((cmd->cmnd[0] == REQUEST_SENSE) &&
						hostdata->ses.cmd_len) {
						scsi_eh_restore_cmnd(cmd, &hostdata->ses);
@@ -2277,9 +2267,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
						    hostdata->issue_queue;
						hostdata->issue_queue = (Scsi_Cmnd *) cmd;
						dprintk(NDEBUG_QUEUES, "scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no);
					} else
#endif				/* def AUTOSENSE */
					{
					} else {
						collect_stats(hostdata, cmd);
						cmd->scsi_done(cmd);
					}
+0 −5
Original line number Diff line number Diff line
@@ -25,10 +25,7 @@
#define NCR5380_H

#include <linux/interrupt.h>

#ifdef AUTOSENSE
#include <scsi/scsi_eh.h>
#endif

#define NCR5380_PUBLIC_RELEASE 7
#define NCR53C400_PUBLIC_RELEASE 2
@@ -281,9 +278,7 @@ struct NCR5380_hostdata {
	unsigned pendingr;
	unsigned pendingw;
#endif
#ifdef AUTOSENSE
	struct scsi_eh_save ses;
#endif
};

#ifdef __KERNEL__
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

#include <scsi/scsicam.h>

#define AUTOSENSE
#define PSEUDO_DMA

#define CUMANASCSI_PUBLIC_RELEASE 1
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include "../scsi.h"
#include <scsi/scsi_host.h>

#define AUTOSENSE
/*#define PSEUDO_DMA*/

#define OAKSCSI_PUBLIC_RELEASE 1
+1 −14
Original line number Diff line number Diff line
@@ -683,9 +683,6 @@ static inline void NCR5380_all_init(void)
static void __init NCR5380_print_options(struct Scsi_Host *instance)
{
	printk(" generic options"
#ifdef AUTOSENSE
	       " AUTOSENSE"
#endif
#ifdef REAL_DMA
	       " REAL DMA"
#endif
@@ -842,13 +839,6 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
		first_instance = instance;
	}

#ifndef AUTOSENSE
	if ((instance->cmd_per_lun > 1) || (instance->can_queue > 1))
		printk("scsi%d: WARNING : support for multiple outstanding commands enabled\n"
		       "        without AUTOSENSE option, contingent allegiance conditions may\n"
		       "        be incorrectly cleared.\n", HOSTNO);
#endif /* def AUTOSENSE */

	NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
	NCR5380_write(MODE_REG, MR_BASE);
	NCR5380_write(TARGET_COMMAND_REG, 0);
@@ -2199,7 +2189,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
					else if (status_byte(cmd->SCp.Status) != GOOD)
						cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16);

#ifdef AUTOSENSE
					if ((cmd->cmnd[0] == REQUEST_SENSE) &&
						hostdata->ses.cmd_len) {
						scsi_eh_restore_cmnd(cmd, &hostdata->ses);
@@ -2219,9 +2208,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
						local_irq_restore(flags);
						dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of "
							  "issue queue\n", H_NO(cmd));
					} else
#endif /* def AUTOSENSE */
					{
					} else {
#ifdef NCR5380_STATS
						collect_stats(hostdata, cmd);
#endif
Loading