ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / scsi / sym53c8xx_2 / sym_conf.h
1 /*
2  * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family 
3  * of PCI-SCSI IO processors.
4  *
5  * Copyright (C) 1999-2001  Gerard Roudier <groudier@free.fr>
6  *
7  * This driver is derived from the Linux sym53c8xx driver.
8  * Copyright (C) 1998-2000  Gerard Roudier
9  *
10  * The sym53c8xx driver is derived from the ncr53c8xx driver that had been 
11  * a port of the FreeBSD ncr driver to Linux-1.2.13.
12  *
13  * The original ncr driver has been written for 386bsd and FreeBSD by
14  *         Wolfgang Stanglmeier        <wolf@cologne.de>
15  *         Stefan Esser                <se@mi.Uni-Koeln.de>
16  * Copyright (C) 1994  Wolfgang Stanglmeier
17  *
18  * Other major contributions:
19  *
20  * NVRAM detection and reading.
21  * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
22  *
23  *-----------------------------------------------------------------------------
24  *
25  * Redistribution and use in source and binary forms, with or without
26  * modification, are permitted provided that the following conditions
27  * are met:
28  * 1. Redistributions of source code must retain the above copyright
29  *    notice, this list of conditions and the following disclaimer.
30  * 2. The name of the author may not be used to endorse or promote products
31  *    derived from this software without specific prior written permission.
32  *
33  * Where this Software is combined with software released under the terms of 
34  * the GNU Public License ("GPL") and the terms of the GPL would require the 
35  * combined work to also be released under the terms of the GPL, the terms
36  * and conditions of this License will apply in addition to those of the
37  * GPL with the exception of any terms or conditions of this License that
38  * conflict with, or are expressly prohibited by, the GPL.
39  *
40  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
41  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
44  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50  * SUCH DAMAGE.
51  */
52
53 #ifndef SYM_CONF_H
54 #define SYM_CONF_H
55
56 #include "sym53c8xx.h"
57
58 /*
59  *  Max number of targets.
60  *  Maximum is 16 and you are advised not to change this value.
61  */
62 #ifndef SYM_CONF_MAX_TARGET
63 #define SYM_CONF_MAX_TARGET     (16)
64 #endif
65
66 /*
67  *  Max number of logical units.
68  *  SPI-2 allows up to 64 logical units, but in real life, target
69  *  that implements more that 7 logical units are pretty rare.
70  *  Anyway, the cost of accepting up to 64 logical unit is low in 
71  *  this driver, thus going with the maximum is acceptable.
72  */
73 #ifndef SYM_CONF_MAX_LUN
74 #define SYM_CONF_MAX_LUN        (64)
75 #endif
76
77 /*
78  *  Max number of IO control blocks queued to the controller.
79  *  Each entry needs 8 bytes and the queues are allocated contiguously.
80  *  Since we donnot want to allocate more than a page, the theorical 
81  *  maximum is PAGE_SIZE/8. For safety, we announce a bit less to the 
82  *  access method. :)
83  *  When not supplied, as it is suggested, the driver compute some 
84  *  good value for this parameter.
85  */
86 /* #define SYM_CONF_MAX_START   (PAGE_SIZE/8 - 16) */
87
88 /*
89  *  Support for Immediate Arbitration.
90  *  Not advised.
91  */
92 /* #define SYM_CONF_IARB_SUPPORT */
93
94 /*
95  *  Number of lists for the optimization of the IO timeout handling.
96  *  Not used under FreeBSD and Linux.
97  */
98 #ifndef SYM_CONF_TIMEOUT_ORDER_MAX
99 #define SYM_CONF_TIMEOUT_ORDER_MAX      (8)
100 #endif
101
102 /*
103  *  Only relevant if IARB support configured.
104  *  - Max number of successive settings of IARB hints.
105  *  - Set IARB on arbitration lost.
106  */
107 #define SYM_CONF_IARB_MAX 3
108 #define SYM_CONF_SET_IARB_ON_ARB_LOST 1
109
110 /*
111  *  Returning wrong residuals may make problems.
112  *  When zero, this define tells the driver to 
113  *  always return 0 as transfer residual.
114  *  Btw, all my testings of residuals have succeeded.
115  */
116 #define SYM_SETUP_RESIDUAL_SUPPORT 1
117
118 /*
119  *  Supported maximum number of LUNs to announce to 
120  *  the access method.
121  *  The driver supports up to 64 LUNs per target as 
122  *  required by SPI-2/SPI-3. However some SCSI devices  
123  *  designed prior to these specifications or not being  
124  *  conformant may be highly confused when they are 
125  *  asked about a LUN > 7.
126  */
127 #ifndef SYM_SETUP_MAX_LUN
128 #define SYM_SETUP_MAX_LUN       (8)
129 #endif
130
131 #endif /* SYM_CONF_H */