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