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

Commit 3471c288 authored by Jeff Garzik 's avatar Jeff Garzik
Browse files

[SCSI] Remove no-op implementations of SCSI EH hooks



Drivers need not implement a hook that returns FAILED, and does nothing
else, since the SCSI midlayer code will do that for us.

Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e3df7155
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -170,7 +170,6 @@ MODULE_LICENSE("GPL");
STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt);
STATIC int NCR_700_dev_reset(struct scsi_cmnd * SCpnt);
STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt);
STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
@@ -330,7 +329,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
	/* Fill in the missing routines from the host template */
	tpnt->queuecommand = NCR_700_queuecommand;
	tpnt->eh_abort_handler = NCR_700_abort;
	tpnt->eh_device_reset_handler = NCR_700_dev_reset;
	tpnt->eh_bus_reset_handler = NCR_700_bus_reset;
	tpnt->eh_host_reset_handler = NCR_700_host_reset;
	tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
@@ -1979,16 +1977,6 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp)
	return SUCCESS;
}

STATIC int
NCR_700_dev_reset(struct scsi_cmnd * SCp)
{
	printk(KERN_INFO "scsi%d (%d:%d) New error handler wants device reset\n\t",
	       SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
	scsi_print_command(SCp);
	
	return FAILED;
}

STATIC int
NCR_700_host_reset(struct scsi_cmnd * SCp)
{
+0 −28
Original line number Diff line number Diff line
@@ -2833,31 +2833,3 @@ static int NCR5380_bus_reset(Scsi_Cmnd * cmd) {
	do_reset(cmd->device->host);
	return SUCCESS;
}

/* 
 * Function : int NCR5380_device_reset (Scsi_Cmnd *cmd)
 * 
 * Purpose : reset a SCSI device
 *
 * Returns : FAILED
 *
 * Locks: io_request_lock held by caller
 */

static int NCR5380_device_reset(Scsi_Cmnd * cmd) {
	return FAILED;
}

/* 
 * Function : int NCR5380_host_reset (Scsi_Cmnd *cmd)
 * 
 * Purpose : reset a SCSI device
 *
 * Returns : FAILED
 *
 * Locks: io_request_lock held by caller
 */

static int NCR5380_host_reset(Scsi_Cmnd * cmd) {
	return FAILED;
}
+0 −2
Original line number Diff line number Diff line
@@ -306,8 +306,6 @@ static void NCR5380_print(struct Scsi_Host *instance);
#endif
static int NCR5380_abort(Scsi_Cmnd * cmd);
static int NCR5380_bus_reset(Scsi_Cmnd * cmd);
static int NCR5380_host_reset(Scsi_Cmnd * cmd);
static int NCR5380_device_reset(Scsi_Cmnd * cmd);
static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
static int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
off_t offset, int length, int inout);
+0 −19
Original line number Diff line number Diff line
@@ -722,12 +722,6 @@ static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
	return 0;
}

static int NCR53c406a_abort(Scsi_Cmnd * SCpnt)
{
	DEB(printk("NCR53c406a_abort called\n"));
	return FAILED;		/* Don't know how to abort */
}

static int NCR53c406a_host_reset(Scsi_Cmnd * SCpnt)
{
	DEB(printk("NCR53c406a_reset called\n"));
@@ -741,16 +735,6 @@ static int NCR53c406a_host_reset(Scsi_Cmnd * SCpnt)
	return SUCCESS;
}

static int NCR53c406a_device_reset(Scsi_Cmnd * SCpnt)
{
	return FAILED;
}

static int NCR53c406a_bus_reset(Scsi_Cmnd * SCpnt)
{
	return FAILED;
}

static int NCR53c406a_biosparm(struct scsi_device *disk,
                               struct block_device *dev,
			       sector_t capacity, int *info_array)
@@ -1075,9 +1059,6 @@ static Scsi_Host_Template driver_template =
     .release            	= NCR53c406a_release,
     .info              	= NCR53c406a_info		/* info */,             
     .queuecommand      	= NCR53c406a_queue	/* queuecommand */,     
     .eh_abort_handler  	= NCR53c406a_abort	/* abort */,            
     .eh_bus_reset_handler      = NCR53c406a_bus_reset	/* reset */,            
     .eh_device_reset_handler   = NCR53c406a_device_reset	/* reset */,            
     .eh_host_reset_handler     = NCR53c406a_host_reset	/* reset */,            
     .bios_param        	= NCR53c406a_biosparm	/* biosparm */,         
     .can_queue         	= 1			/* can_queue */,        
+0 −9
Original line number Diff line number Diff line
@@ -366,14 +366,6 @@ static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg)
	return aac_do_ioctl(dev, cmd, arg);
}

/*
 * XXX: does aac really need no error handling??
 */
static int aac_eh_abort(struct scsi_cmnd *cmd)
{
	return FAILED;
}

/*
 *	aac_eh_reset	- Reset command handling
 *	@scsi_cmd:	SCSI command block causing the reset
@@ -683,7 +675,6 @@ static struct scsi_host_template aac_driver_template = {
	.bios_param     		= aac_biosparm,	
	.shost_attrs			= aac_attrs,
	.slave_configure		= aac_slave_configure,
	.eh_abort_handler		= aac_eh_abort,
	.eh_host_reset_handler		= aac_eh_reset,
	.can_queue      		= AAC_NUM_IO_FIB,	
	.this_id        		= 16,
Loading