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
......@@ -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)
{
......
......@@ -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;
}
......@@ -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);
......
......@@ -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 */,
......
......@@ -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,
......
......@@ -1348,20 +1348,6 @@ static int aha1542_restart(struct Scsi_Host *shost)
return 0;
}
static int aha1542_abort(Scsi_Cmnd * SCpnt)
{
/*
* The abort command does not leave the device in a clean state where
* it is available to be used again. Until this gets worked out, we
* will leave it commented out.
*/
printk(KERN_ERR "aha1542.c: Unable to abort command for target %d\n",
SCpnt->device->id);
return FAILED;
}
/*
* This is a device reset. This is handled by sending a special command
* to the device.
......@@ -1817,7 +1803,6 @@ static Scsi_Host_Template driver_template = {
.detect = aha1542_detect,
.release = aha1542_release,
.queuecommand = aha1542_queuecommand,
.eh_abort_handler = aha1542_abort,
.eh_device_reset_handler= aha1542_dev_reset,
.eh_bus_reset_handler = aha1542_bus_reset,
.eh_host_reset_handler = aha1542_host_reset,
......
......@@ -133,7 +133,6 @@ struct ccb { /* Command Control Block 5.3 */
static int aha1542_detect(Scsi_Host_Template *);
static int aha1542_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int aha1542_abort(Scsi_Cmnd * SCpnt);
static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);
static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);
static int aha1542_host_reset(Scsi_Cmnd * SCpnt);
......
......@@ -244,9 +244,7 @@ static Scsi_Host_Template cumanascsi_template = {
.info = cumanascsi_info,
.queuecommand = cumanascsi_queue_command,
.eh_abort_handler = NCR5380_abort,
.eh_device_reset_handler= NCR5380_device_reset,
.eh_bus_reset_handler = NCR5380_bus_reset,
.eh_host_reset_handler = NCR5380_host_reset,
.can_queue = 16,
.this_id = 7,
.sg_tablesize = SG_ALL,
......
......@@ -162,9 +162,7 @@ static Scsi_Host_Template ecoscsi_template = {
.info = ecoscsi_info,
.queuecommand = ecoscsi_queue_command,
.eh_abort_handler = NCR5380_abort,
.eh_device_reset_handler= NCR5380_device_reset,
.eh_bus_reset_handler = NCR5380_bus_reset,
.eh_host_reset_handler = NCR5380_host_reset,
.can_queue = 16,
.this_id = 7,
.sg_tablesize = SG_ALL,
......
......@@ -118,9 +118,7 @@ static Scsi_Host_Template oakscsi_template = {
.info = oakscsi_info,
.queuecommand = oakscsi_queue_command,
.eh_abort_handler = NCR5380_abort,
.eh_device_reset_handler= NCR5380_device_reset,
.eh_bus_reset_handler = NCR5380_bus_reset,
.eh_host_reset_handler = NCR5380_host_reset,
.can_queue = 16,
.this_id = 7,
.sg_tablesize = SG_ALL,
......
......@@ -61,8 +61,6 @@ static struct scsi_host_template dmx3191d_driver_template = {
.queuecommand = NCR5380_queue_command,
.eh_abort_handler = NCR5380_abort,
.eh_bus_reset_handler = NCR5380_bus_reset,
.eh_device_reset_handler= NCR5380_device_reset,
.eh_host_reset_handler = NCR5380_host_reset,
.can_queue = 32,
.this_id = 7,
.sg_tablesize = SG_ALL,
......
......@@ -482,8 +482,6 @@ static Scsi_Host_Template driver_template = {
.queuecommand = dtc_queue_command,
.eh_abort_handler = dtc_abort,
.eh_bus_reset_handler = dtc_bus_reset,
.eh_device_reset_handler = dtc_device_reset,
.eh_host_reset_handler = dtc_host_reset,
.bios_param = dtc_biosparam,
.can_queue = CAN_QUEUE,
.this_id = 7,
......
......@@ -34,8 +34,6 @@ static int dtc_biosparam(struct scsi_device *, struct block_device *,
static int dtc_detect(Scsi_Host_Template *);
static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int dtc_bus_reset(Scsi_Cmnd *);
static int dtc_device_reset(Scsi_Cmnd *);
static int dtc_host_reset(Scsi_Cmnd *);
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
......@@ -86,8 +84,6 @@ static int dtc_host_reset(Scsi_Cmnd *);
#define NCR5380_queue_command dtc_queue_command
#define NCR5380_abort dtc_abort
#define NCR5380_bus_reset dtc_bus_reset
#define NCR5380_device_reset dtc_device_reset
#define NCR5380_host_reset dtc_host_reset
#define NCR5380_proc_info dtc_proc_info
/* 15 12 11 10
......
......@@ -518,8 +518,6 @@ static struct scsi_host_template driver_template = {
.release = eata2x_release,
.queuecommand = eata2x_queuecommand,
.eh_abort_handler = eata2x_eh_abort,
.eh_device_reset_handler = NULL,
.eh_bus_reset_handler = NULL,
.eh_host_reset_handler = eata2x_eh_host_reset,
.bios_param = eata2x_bios_param,
.slave_configure = eata2x_slave_configure,
......
......@@ -311,7 +311,6 @@ static Scsi_Host_Template driver_template = {
.use_clustering = ENABLE_CLUSTERING,
.eh_abort_handler = fcp_scsi_abort,
.eh_device_reset_handler = fcp_scsi_dev_reset,
.eh_bus_reset_handler = fcp_scsi_bus_reset,
.eh_host_reset_handler = fcp_scsi_host_reset,
};
#include "scsi_module.c"
......
......@@ -1241,16 +1241,6 @@ static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
return SUCCESS;
}
static int fd_mcs_host_reset(Scsi_Cmnd * SCpnt)
{
return FAILED;
}
static int fd_mcs_device_reset(Scsi_Cmnd * SCpnt)
{
return FAILED;
}
static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
struct Scsi_Host *shpnt = SCpnt->device->host;
......@@ -1357,8 +1347,6 @@ static Scsi_Host_Template driver_template = {
.queuecommand = fd_mcs_queue,
.eh_abort_handler = fd_mcs_abort,
.eh_bus_reset_handler = fd_mcs_bus_reset,
.eh_host_reset_handler = fd_mcs_host_reset,
.eh_device_reset_handler = fd_mcs_device_reset,
.bios_param = fd_mcs_biosparam,
.can_queue = 1,
.this_id = 7,
......
......@@ -908,8 +908,6 @@ static Scsi_Host_Template driver_template = {
.queuecommand = generic_NCR5380_queue_command,
.eh_abort_handler = generic_NCR5380_abort,
.eh_bus_reset_handler = generic_NCR5380_bus_reset,
.eh_device_reset_handler = generic_NCR5380_device_reset,
.eh_host_reset_handler = generic_NCR5380_host_reset,
.bios_param = NCR5380_BIOSPARAM,
.can_queue = CAN_QUEUE,
.this_id = 7,
......
......@@ -49,8 +49,6 @@ static int generic_NCR5380_detect(Scsi_Host_Template *);
static int generic_NCR5380_release_resources(struct Scsi_Host *);
static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int generic_NCR5380_bus_reset(Scsi_Cmnd *);
static int generic_NCR5380_host_reset(Scsi_Cmnd *);
static int generic_NCR5380_device_reset(Scsi_Cmnd *);
static const char* generic_NCR5380_info(struct Scsi_Host *);
#ifndef CMD_PER_LUN
......@@ -114,8 +112,6 @@ static const char* generic_NCR5380_info(struct Scsi_Host *);
#define NCR5380_queue_command generic_NCR5380_queue_command
#define NCR5380_abort generic_NCR5380_abort
#define NCR5380_bus_reset generic_NCR5380_bus_reset
#define NCR5380_device_reset generic_NCR5380_device_reset
#define NCR5380_host_reset generic_NCR5380_host_reset
#define NCR5380_pread generic_NCR5380_pread
#define NCR5380_pwrite generic_NCR5380_pwrite
#define NCR5380_proc_info notyet_generic_proc_info
......
......@@ -4703,19 +4703,6 @@ static const char *gdth_info(struct Scsi_Host *shp)
return ((const char *)ha->binfo.type_string);
}
/* new error handling */
static int gdth_eh_abort(Scsi_Cmnd *scp)
{
TRACE2(("gdth_eh_abort()\n"));
return FAILED;
}
static int gdth_eh_device_reset(Scsi_Cmnd *scp)
{
TRACE2(("gdth_eh_device_reset()\n"));
return FAILED;
}
static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
{
int i, hanum;
......@@ -4770,13 +4757,6 @@ static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
return SUCCESS;
}
static int gdth_eh_host_reset(Scsi_Cmnd *scp)
{
TRACE2(("gdth_eh_host_reset()\n"));
return FAILED;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip)
#else
......@@ -5713,10 +5693,7 @@ static Scsi_Host_Template driver_template = {
.release = gdth_release,
.info = gdth_info,
.queuecommand = gdth_queuecommand,
.eh_abort_handler = gdth_eh_abort,
.eh_device_reset_handler = gdth_eh_device_reset,
.eh_bus_reset_handler = gdth_eh_bus_reset,
.eh_host_reset_handler = gdth_eh_host_reset,
.bios_param = gdth_bios_param,
.can_queue = GDTH_MAXCMDS,
.this_id = -1,
......
......@@ -1671,17 +1671,6 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
static int in2000_host_reset(Scsi_Cmnd * cmd)
{
return FAILED;
}
static int in2000_device_reset(Scsi_Cmnd * cmd)
{
return FAILED;
}
static int in2000_abort(Scsi_Cmnd * cmd)
{
struct Scsi_Host *instance;
......@@ -2311,8 +2300,6 @@ static Scsi_Host_Template driver_template = {
.queuecommand = in2000_queuecommand,
.eh_abort_handler = in2000_abort,
.eh_bus_reset_handler = in2000_bus_reset,
.eh_device_reset_handler = in2000_device_reset,
.eh_host_reset_handler = in2000_host_reset,
.bios_param = in2000_biosparam,
.can_queue = IN2000_CAN_Q,
.this_id = IN2000_HOST_ID,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment