patch-2.4.2 linux/drivers/acorn/scsi/eesox.c
Next file: linux/drivers/acorn/scsi/eesox.h
Previous file: linux/drivers/acorn/scsi/ecoscsi.h
Back to the patch index
Back to the overall index
- Lines: 90
- Date:
Thu Feb 8 16:32:44 2001
- Orig file:
v2.4.1/linux/drivers/acorn/scsi/eesox.c
- Orig date:
Mon Sep 18 15:15:22 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/acorn/scsi/eesox.c linux/drivers/acorn/scsi/eesox.c
@@ -33,6 +33,7 @@
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/pci.h>
+#include <linux/init.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -42,7 +43,9 @@
#include "../../scsi/sd.h"
#include "../../scsi/hosts.h"
-#include "eesox.h"
+#include "fas216.h"
+
+#include <scsi/scsicam.h>
/* Configuration */
#define EESOX_XTALFREQ 40
@@ -87,6 +90,22 @@
*/
int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+#define NR_SG 256
+
+struct control {
+ unsigned int io_port;
+ unsigned int control;
+};
+
+typedef struct {
+ FAS216_Info info;
+
+ struct control control;
+
+ unsigned int dmaarea; /* Pseudo DMA area */
+ struct scatterlist sg[NR_SG]; /* Scatter DMA list */
+} EESOXScsi_Info;
+
/* Prototype: void eesoxscsi_irqenable(ec, irqnr)
* Purpose : Enable interrupts on EESOX SCSI card
* Params : ec - expansion card structure
@@ -543,8 +562,43 @@
return pos;
}
-#ifdef MODULE
-Scsi_Host_Template driver_template = EESOXSCSI;
+static Scsi_Host_Template eesox_template = {
+ module: THIS_MODULE,
+ proc_info: eesoxscsi_proc_info,
+ name: "EESOX SCSI",
+ detect: eesoxscsi_detect,
+ release: eesoxscsi_release,
+ info: eesoxscsi_info,
+ bios_param: scsicam_bios_param,
+ can_queue: 1,
+ this_id: 7,
+ sg_tablesize: SG_ALL,
+ cmd_per_lun: 1,
+ use_clustering: DISABLE_CLUSTERING,
+ command: fas216_command,
+ queuecommand: fas216_queue_command,
+ eh_host_reset_handler: fas216_eh_host_reset,
+ eh_bus_reset_handler: fas216_eh_bus_reset,
+ eh_device_reset_handler: fas216_eh_device_reset,
+ eh_abort_handler: fas216_eh_abort,
+ use_new_eh_code: 1
+};
+
+static int __init eesox_init(void)
+{
+ scsi_register_module(MODULE_SCSI_HA, &eesox_template);
+ if (eesox_template.present)
+ return 0;
+
+ scsi_unregister_module(MODULE_SCSI_HA, &eesox_template);
+ return -ENODEV;
+}
+
+static void __exit eesox_exit(void)
+{
+ scsi_unregister_module(MODULE_SCSI_HA, &eesox_template);
+}
+
+module_init(eesox_init);
+module_exit(eesox_exit);
-#include "../../scsi/scsi_module.c"
-#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)