Commit 98fb18b1 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] NCR5380 port to 2.5 first pass

There is still more work to do, the driver sucks in 2.4 and 2.5 but 2.5 has a
lot more of what is needed to make it work nicely. Basically NCR5380_main
probably has to become a thread in the next generation of the code.

This however seems to get it up and crawling
parent 99916cf4
This diff is collapsed.
......@@ -304,10 +304,18 @@ static void NCR5380_print(struct Scsi_Host *instance);
static
#endif
int NCR5380_abort(Scsi_Cmnd * cmd);
#ifndef NCR5380_reset
#ifndef NCR5380_bus_reset
static
#endif
int NCR5380_reset(Scsi_Cmnd * cmd, unsigned int reset_flags);
int NCR5380_bus_reset(Scsi_Cmnd * cmd);
#ifndef NCR5380_host_reset
static
#endif
int NCR5380_host_reset(Scsi_Cmnd * cmd);
#ifndef NCR5380_device_reset
static
#endif
int NCR5380_device_reset(Scsi_Cmnd * cmd);
#ifndef NCR5380_queue_command
static
#endif
......
......@@ -779,15 +779,15 @@ int generic_NCR5380_proc_info(char *buffer, char **start, off_t offset, int leng
Scsi_Device *dev;
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
#endif
save_flags(flags);
cli();
/* For now this is constant so we may walk it */
for (scsi_ptr = first_instance; scsi_ptr; scsi_ptr = scsi_ptr->next)
if (scsi_ptr->host_no == hostno)
break;
NCR5380_setup(scsi_ptr);
hostdata = (struct NCR5380_hostdata *) scsi_ptr->hostdata;
spin_lock_irqsave(scsi_ptr->host_lock, flags);
PRINTP("SCSI host number %d : %s\n" ANDP scsi_ptr->host_no ANDP scsi_ptr->hostt->name);
PRINTP("Generic NCR5380 driver version %d\n" ANDP GENERIC_NCR5380_PUBLIC_RELEASE);
PRINTP("NCR5380 core version %d\n" ANDP NCR5380_PUBLIC_RELEASE);
......@@ -874,7 +874,7 @@ int generic_NCR5380_proc_info(char *buffer, char **start, off_t offset, int leng
len -= offset;
if (len > length)
len = length;
restore_flags(flags);
spin_unlock_irqrestore(scsi_ptr->host_lock, flags);
return len;
}
......
......@@ -48,7 +48,9 @@ int generic_NCR5380_abort(Scsi_Cmnd *);
int generic_NCR5380_detect(Scsi_Host_Template *);
int generic_NCR5380_release_resources(struct Scsi_Host *);
int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int generic_NCR5380_reset(Scsi_Cmnd *, unsigned int);
int generic_NCR5380_bus_reset(Scsi_Cmnd *);
int generic_NCR5380_host_reset(Scsi_Cmnd *);
int generic_NCR5380_device_reset(Scsi_Cmnd *);
int notyet_generic_proc_info (char *buffer ,char **start, off_t offset,
int length, int hostno, int inout);
const char* generic_NCR5380_info(struct Scsi_Host *);
......@@ -77,8 +79,10 @@ int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int leng
release: generic_NCR5380_release_resources, \
info: (void *)generic_NCR5380_info, \
queuecommand: generic_NCR5380_queue_command, \
abort: generic_NCR5380_abort, \
reset: generic_NCR5380_reset, \
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, \
......@@ -154,7 +158,9 @@ int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int leng
#define do_NCR5380_intr do_generic_NCR5380_intr
#define NCR5380_queue_command generic_NCR5380_queue_command
#define NCR5380_abort generic_NCR5380_abort
#define NCR5380_reset generic_NCR5380_reset
#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
......
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