patch-2.4.0-test11 linux/drivers/scsi/AM53C974.c
Next file: linux/drivers/scsi/AM53C974.h
Previous file: linux/drivers/scsi/53c7xx.c
Back to the patch index
Back to the overall index
- Lines: 172
- Date:
Sun Nov 12 20:40:42 2000
- Orig file:
v2.4.0-test10/linux/drivers/scsi/AM53C974.c
- Orig date:
Sun Oct 8 10:50:21 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/scsi/AM53C974.c linux/drivers/scsi/AM53C974.c
@@ -1,4 +1,3 @@
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/signal.h>
@@ -381,11 +380,11 @@
unsigned char statreg);
static void AM53C974_intr_bus_reset(struct Scsi_Host *instance);
-static struct Scsi_Host *first_instance = NULL;
-static Scsi_Host_Template *the_template = NULL;
-static struct Scsi_Host *first_host = NULL; /* Head of list of AMD boards */
-static volatile int main_running = 0;
-static int commandline_current = 0;
+static struct Scsi_Host *first_instance;
+static Scsi_Host_Template *the_template;
+static struct Scsi_Host *first_host; /* Head of list of AMD boards */
+static volatile int main_running;
+static int commandline_current;
override_t overrides[7] =
{
{-1, 0, 0, 0},}; /* LILO overrides */
@@ -571,19 +570,25 @@
restore_flags(flags);
}
+#ifndef MODULE
/**************************************************************************
-* Function : AM53C974_setup(char *str, int *ints)
+* Function : AM53C974_setup(char *str)
*
* Purpose : LILO command line initialization of the overrides array,
*
-* Inputs : str - unused, ints - array of integer parameters with ints[0]
-* equal to the number of ints.
+* Input : str - parameter string.
+*
+* Returns : 1.
*
* NOTE : this function needs to be declared as an external function
* in init/main.c and included there in the bootsetups list
***************************************************************************/
-void AM53C974_setup(char *str, int *ints)
+static int AM53C974_setup(char *str)
{
+ int ints[5];
+
+ get_options(str, ARRAY_SIZE(ints), ints);
+
if (ints[0] < 4)
printk("AM53C974_setup: wrong number of parameters;\n correct syntax is: AM53C974=host-scsi-id, target-scsi-id, max-rate, max-offset\n");
else {
@@ -604,9 +609,13 @@
} else
printk("AM53C974_setup: too many overrides\n");
}
+
+ return 1;
}
+__setup("AM53C974=", AM53C974_setup);
+
+#endif /* !MODULE */
-#if defined (CONFIG_PCI)
/**************************************************************************
* Function : int AM53C974_pci_detect(Scsi_Host_Template *tpnt)
*
@@ -616,7 +625,7 @@
*
* Returns : number of host adapters detected
**************************************************************************/
-static inline int AM53C974_pci_detect(Scsi_Host_Template * tpnt)
+static int __init AM53C974_pci_detect(Scsi_Host_Template * tpnt)
{
int count = 0; /* number of boards detected */
struct pci_dev *pdev = NULL;
@@ -639,29 +648,6 @@
}
return (count);
}
-#endif
-
-/**************************************************************************
-* Function : int AM53C974_detect(Scsi_Host_Template *tpnt)
-*
-* Purpose : detects and initializes AM53C974 SCSI chips
-*
-* Inputs : tpnt - host template
-*
-* Returns : number of host adapters detected
-**************************************************************************/
-int __init AM53C974_detect(Scsi_Host_Template * tpnt)
-{
- int count = 0; /* number of boards detected */
-
- tpnt->proc_name = "am53c974";
-
-#if defined (CONFIG_PCI)
- if (pci_present())
- count = AM53C974_pci_detect(tpnt);
-#endif
- return (count);
-}
/**************************************************************************
* Function : int AM53C974_init(Scsi_Host_Template *tpnt, struct pci_dev *pdev)
@@ -810,7 +796,7 @@
* *
* Returns : info string *
************************************************************************/
-const char *AM53C974_info(struct Scsi_Host *instance)
+static const char *AM53C974_info(struct Scsi_Host *instance)
{
static char info[100];
@@ -830,7 +816,7 @@
* *
* Returns :status, see hosts.h for details *
***************************************************************************/
-int AM53C974_command(Scsi_Cmnd * SCpnt)
+static int AM53C974_command(Scsi_Cmnd * SCpnt)
{
DEB(printk("AM53C974_command called\n"));
return 0;
@@ -903,7 +889,7 @@
* twiddling done to the host specific fields of cmd. If the
* main coroutine is not running, it is restarted.
**************************************************************************/
-int AM53C974_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int AM53C974_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
{
unsigned long flags;
struct Scsi_Host *instance = cmd->host;
@@ -2283,7 +2269,7 @@
*
* Returns : 0 - success, -1 on failure.
**************************************************************************/
-int AM53C974_abort(Scsi_Cmnd * cmd)
+static int AM53C974_abort(Scsi_Cmnd * cmd)
{
AM53C974_local_declare();
unsigned long flags;
@@ -2391,7 +2377,7 @@
*
* FIXME(eric) the reset_flags are ignored.
**************************************************************************/
-int AM53C974_reset(Scsi_Cmnd * cmd, unsigned int reset_flags)
+static int AM53C974_reset(Scsi_Cmnd * cmd, unsigned int reset_flags)
{
AM53C974_local_declare();
unsigned long flags;
@@ -2447,7 +2433,7 @@
*
* Release resources allocated for a single AM53C974 adapter.
*/
-int AM53C974_release(struct Scsi_Host *shp)
+static int AM53C974_release(struct Scsi_Host *shp)
{
free_irq(shp->irq, shp);
scsi_unregister(shp);
@@ -2455,11 +2441,9 @@
}
-#ifdef MODULE
/* You can specify overrides=a,b,c,d in the same format at AM53C974=a,b,c,d
on boot up */
MODULE_PARM(overrides, "1-32i");
-#endif
static Scsi_Host_Template driver_template = AM53C974;
#include "scsi_module.c"
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)