Commit 2d407c8b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] finish updating sym53c416

parent 57e34bbb
......@@ -715,7 +715,6 @@ int __init sym53c416_detect(Scsi_Host_Template *tpnt)
if(shpnt==NULL)
continue;
spin_lock_irqsave(&sym53c416_lock, flags);
/* FIXME: Request_irq with CLI is not safe */
/* Request for specified IRQ */
if(request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, shpnt))
{
......@@ -800,12 +799,20 @@ static int sym53c416_command(Scsi_Cmnd *SCpnt)
static int sym53c416_abort(Scsi_Cmnd *SCpnt)
{
/* printk("sym53c416_abort\n"); */
/* We don't know how to abort for the moment */
return SCSI_ABORT_SNOOZE;
return FAILED;
}
static int sym53c416_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
static int sym53c416_bus_reset(Scsi_Cmnd *SCpnt)
{
return FAILED;
}
static int sym53c416_device_reset(Scsi_Cmnd *SCpnt)
{
return FAILED;
}
static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
{
int base;
int scsi_id = -1;
......@@ -813,7 +820,7 @@ static int sym53c416_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
/* printk("sym53c416_reset\n"); */
base = SCpnt->host->io_port;
/* search scsi_id */
/* search scsi_id - fixme, we shouldnt need to iterate for this! */
for(i = 0; i < host_index && scsi_id != -1; i++)
if(hosts[i].base == base)
scsi_id = hosts[i].scsi_id;
......@@ -821,7 +828,16 @@ static int sym53c416_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
outb(NOOP | PIO_MODE, base + COMMAND_REG);
outb(RESET_SCSI_BUS, base + COMMAND_REG);
sym53c416_init(base, scsi_id);
return SCSI_RESET_PENDING;
return SUCCESS;
}
static int sym53c416_release(struct Scsi_Host *shost)
{
if (shost->irq)
free_irq(shost->irq, shost);
if (shost->io_port && shost->n_io_port)
release_region(shost->io_port, shost->n_io_port);
return 0;
}
static int sym53c416_bios_param(Disk *disk, struct block_device *dev, int *ip)
......
......@@ -32,28 +32,34 @@
static int sym53c416_detect(Scsi_Host_Template *);
static const char *sym53c416_info(struct Scsi_Host *);
static int sym53c416_release(struct Scsi_Host *);
static int sym53c416_command(Scsi_Cmnd *);
static int sym53c416_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int sym53c416_abort(Scsi_Cmnd *);
static int sym53c416_reset(Scsi_Cmnd *, unsigned int);
static int sym53c416_host_reset(Scsi_Cmnd *);
static int sym53c416_bus_reset(Scsi_Cmnd *);
static int sym53c416_device_reset(Scsi_Cmnd *);
static int sym53c416_bios_param(Disk *, struct block_device *, int *);
static void sym53c416_setup(char *str, int *ints);
#define SYM53C416 { \
proc_name: "sym53c416", \
name: "Symbios Logic 53c416", \
detect: sym53c416_detect, \
info: sym53c416_info, \
command: sym53c416_command, \
queuecommand: sym53c416_queuecommand, \
abort: sym53c416_abort, \
reset: sym53c416_reset, \
bios_param: sym53c416_bios_param, \
can_queue: 1, \
this_id: SYM53C416_SCSI_ID, \
sg_tablesize: 32, \
cmd_per_lun: 1, \
unchecked_isa_dma: 1, \
use_clustering: ENABLE_CLUSTERING \
}
#define SYM53C416 { \
.proc_name = "sym53c416", \
.name = "Symbios Logic 53c416", \
.detect = sym53c416_detect, \
.info = sym53c416_info, \
.command = sym53c416_command, \
.queuecommand = sym53c416_queuecommand, \
.eh_abort_handler = sym53c416_abort, \
.eh_host_reset_handler =sym53c416_host_reset, \
.eh_bus_reset_handler = sym53c416_bus_reset, \
.eh_device_reset_handler =sym53c416_device_reset,\
.release = sym53c416_release, \
.bios_param = sym53c416_bios_param, \
.can_queue = 1, \
.this_id = SYM53C416_SCSI_ID, \
.sg_tablesize = 32, \
.cmd_per_lun = 1, \
.unchecked_isa_dma = 1, \
.use_clustering = ENABLE_CLUSTERING \
}
#endif
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