ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / scsi / advansys.h
1 /*
2  * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters
3  * 
4  * Copyright (c) 1995-2000 Advanced System Products, Inc.
5  * Copyright (c) 2000-2001 ConnectCom Solutions, Inc.
6  * All Rights Reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that redistributions of source
10  * code retain the above copyright notice and this comment without
11  * modification.
12  *
13  * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys)
14  * changed its name to ConnectCom Solutions, Inc.
15  *
16  * There is an AdvanSys Linux WWW page at:
17  *  http://www.connectcom.net/downloads/software/os/linux.html
18  *  http://www.advansys.com/linux.html
19  *
20  * The latest released version of the AdvanSys driver is available at:
21  *  ftp://ftp.advansys.com/pub/linux/linux.tgz
22  *  ftp://ftp.connectcom.net/pub/linux/linux.tgz
23  *
24  * Please send questions, comments, bug reports to:
25  *  linux@connectcom.net or bfrey@turbolinux.com.cn
26  */
27
28 #ifndef _ADVANSYS_H
29 #define _ADVANSYS_H
30
31 #include <linux/config.h>
32 #ifndef LINUX_VERSION_CODE
33 #include <linux/version.h>
34 #endif /* LINUX_VERSION_CODE */
35
36 /* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
37 #define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))
38 /* Driver supported only in version 2.2 and version >= 2.4. */
39 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \
40     (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \
41      LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
42 #error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels."
43 #endif
44 #define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
45 #define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0))
46
47 /*
48  * Scsi_Host_Template function prototypes.
49  */
50 int advansys_detect(Scsi_Host_Template *);
51 int advansys_release(struct Scsi_Host *);
52 const char *advansys_info(struct Scsi_Host *);
53 int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
54 int advansys_reset(Scsi_Cmnd *);
55 int advansys_biosparam(struct scsi_device *, struct block_device *,
56                 sector_t, int[]);
57 static int advansys_slave_configure(Scsi_Device *);
58
59 /* init/main.c setup function */
60 void advansys_setup(char *, int *);
61
62 #endif /* _ADVANSYS_H */