Commit b0973f98 authored by James Bottomley's avatar James Bottomley

Merge raven.il.steeleye.com:/home/jejb/BK/scsi-aha152x-2.5

into raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5
parents 322bd920 015f2204
...@@ -221,11 +221,6 @@ ...@@ -221,11 +221,6 @@
**************************************************************************/ **************************************************************************/
#include <linux/module.h> #include <linux/module.h>
#if defined(PCMCIA)
#undef MODULE
#endif
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -244,14 +239,16 @@ ...@@ -244,14 +239,16 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/isapnp.h> #include <linux/isapnp.h>
#include <asm/semaphore.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/blk.h>
#include <asm/semaphore.h>
#include <asm/io.h>
#include <scsi/scsicam.h>
#include "scsi.h"
#include "aha152x.h" #include "aha152x.h"
#include <linux/stat.h>
#include <linux/workqueue.h>
#include <scsi/scsicam.h>
/* DEFINES */ /* DEFINES */
...@@ -338,11 +335,11 @@ enum { ...@@ -338,11 +335,11 @@ enum {
resetting = 0x0400, /* BUS DEVICE RESET is pending */ resetting = 0x0400, /* BUS DEVICE RESET is pending */
}; };
#if defined(MODULE)
MODULE_AUTHOR("Jürgen Fischer"); MODULE_AUTHOR("Jürgen Fischer");
MODULE_DESCRIPTION(AHA152X_REVID); MODULE_DESCRIPTION(AHA152X_REVID);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#if defined(MODULE) && !defined(PCMCIA)
MODULE_PARM(io, "1-2i"); MODULE_PARM(io, "1-2i");
MODULE_PARM_DESC(io,"base io address of controller"); MODULE_PARM_DESC(io,"base io address of controller");
static int io[] = {0, 0}; static int io[] = {0, 0};
...@@ -396,6 +393,7 @@ MODULE_PARM(aha152x1, "1-9i"); ...@@ -396,6 +393,7 @@ MODULE_PARM(aha152x1, "1-9i");
MODULE_PARM_DESC(aha152x1, "parameters for second controller"); MODULE_PARM_DESC(aha152x1, "parameters for second controller");
static int aha152x1[] = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT}; static int aha152x1[] = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT};
#endif /* !defined(AHA152X_DEBUG) */ #endif /* !defined(AHA152X_DEBUG) */
#endif /* MODULE && !PCMCIA */
#ifdef __ISAPNP__ #ifdef __ISAPNP__
static struct isapnp_device_id id_table[] __devinitdata = { static struct isapnp_device_id id_table[] __devinitdata = {
...@@ -404,7 +402,6 @@ static struct isapnp_device_id id_table[] __devinitdata = { ...@@ -404,7 +402,6 @@ static struct isapnp_device_id id_table[] __devinitdata = {
}; };
MODULE_DEVICE_TABLE(isapnp, id_table); MODULE_DEVICE_TABLE(isapnp, id_table);
#endif /* ISAPNP */ #endif /* ISAPNP */
#endif /* MODULE */
/* set by aha152x_setup according to the command line */ /* set by aha152x_setup according to the command line */
static int setup_count = 0; static int setup_count = 0;
...@@ -1040,7 +1037,7 @@ int aha152x_detect(Scsi_Host_Template * tpnt) ...@@ -1040,7 +1037,7 @@ int aha152x_detect(Scsi_Host_Template * tpnt)
} }
#endif #endif
#if defined(MODULE) #if defined(MODULE) && !defined(PCMCIA)
if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) { if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) {
if(aha152x[0]!=0) { if(aha152x[0]!=0) {
setup[setup_count].conf = ""; setup[setup_count].conf = "";
...@@ -3935,7 +3932,28 @@ int aha152x_proc_info(char *buffer, char **start, ...@@ -3935,7 +3932,28 @@ int aha152x_proc_info(char *buffer, char **start,
return thislength < length ? thislength : length; return thislength < length ? thislength : length;
} }
/* Eventually this will go into an include file, but this will be later */ Scsi_Host_Template aha152x_driver_template = {
static Scsi_Host_Template driver_template = AHA152X; .module = THIS_MODULE,
.name = AHA152X_REVID,
.proc_name = "aha152x",
.proc_info = aha152x_proc_info,
.detect = aha152x_detect,
.command = aha152x_command,
.queuecommand = aha152x_queue,
.eh_abort_handler = aha152x_abort,
.eh_device_reset_handler = aha152x_device_reset,
.eh_bus_reset_handler = aha152x_bus_reset,
.eh_host_reset_handler = aha152x_host_reset,
.release = aha152x_release,
.bios_param = aha152x_biosparam,
.can_queue = 1,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = 1,
.use_clustering = DISABLE_CLUSTERING,
};
#ifndef PCMCIA
#define driver_templace aha152x_driver_template
#include "scsi_module.c" #include "scsi_module.c"
#endif
...@@ -5,54 +5,12 @@ ...@@ -5,54 +5,12 @@
* $Id: aha152x.h,v 2.5 2002/04/14 11:24:12 fischer Exp $ * $Id: aha152x.h,v 2.5 2002/04/14 11:24:12 fischer Exp $
*/ */
#if defined(__KERNEL__)
#include <linux/blk.h>
#include "scsi.h"
#include <asm/io.h>
#include <linux/version.h>
int aha152x_detect(Scsi_Host_Template *);
int aha152x_command(Scsi_Cmnd *);
int aha152x_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int aha152x_abort(Scsi_Cmnd *);
int aha152x_release(struct Scsi_Host *shpnt);
int aha152x_device_reset(Scsi_Cmnd *);
int aha152x_bus_reset(Scsi_Cmnd *);
int aha152x_host_reset(Scsi_Cmnd *);
int aha152x_biosparam(struct scsi_device *, struct block_device *,
sector_t, int*);
int aha152x_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout);
/* number of queueable commands /* number of queueable commands
(unless we support more than 1 cmd_per_lun this should do) */ (unless we support more than 1 cmd_per_lun this should do) */
#define AHA152X_MAXQUEUE 7 #define AHA152X_MAXQUEUE 7
#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.5 $" #define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.5 $"
/* Initial value of Scsi_Host entry */
#define AHA152X { .proc_name = "aha152x", \
.proc_info = aha152x_proc_info, \
.name = AHA152X_REVID, \
.detect = aha152x_detect, \
.command = aha152x_command, \
.queuecommand = aha152x_queue, \
.eh_abort_handler = aha152x_abort, \
.eh_device_reset_handler = aha152x_device_reset, \
.eh_bus_reset_handler = aha152x_bus_reset, \
.eh_host_reset_handler = aha152x_host_reset, \
.release = aha152x_release, \
.bios_param = aha152x_biosparam, \
.can_queue = 1, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = 1, \
.present = 0, \
.unchecked_isa_dma = 0, \
.use_clustering = DISABLE_CLUSTERING }
#endif
/* port addresses */ /* port addresses */
#define SCSISEQ (HOSTIOPORT0+0x00) /* SCSI sequence control */ #define SCSISEQ (HOSTIOPORT0+0x00) /* SCSI sequence control */
#define SXFRCTL0 (HOSTIOPORT0+0x01) /* SCSI transfer control 0 */ #define SXFRCTL0 (HOSTIOPORT0+0x01) /* SCSI transfer control 0 */
......
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