GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / scsi / sym53c8xx_2 / sym53c8xx.h
blobbe17348e3f094470a98b199741e67ca8d69bc041
1 /*
2 * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family
3 * of PCI-SCSI IO processors.
5 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr>
7 * This driver is derived from the Linux sym53c8xx driver.
8 * Copyright (C) 1998-2000 Gerard Roudier
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.
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
18 * Other major contributions:
20 * NVRAM detection and reading.
21 * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
23 *-----------------------------------------------------------------------------
25 * This program is free software; you can redistribute it and/or modify
26 * it under the terms of the GNU General Public License as published by
27 * the Free Software Foundation; either version 2 of the License, or
28 * (at your option) any later version.
30 * This program is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
35 * You should have received a copy of the GNU General Public License
36 * along with this program; if not, write to the Free Software
37 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
40 #ifndef SYM53C8XX_H
41 #define SYM53C8XX_H
45 * DMA addressing mode.
47 * 0 : 32 bit addressing for all chips.
48 * 1 : 40 bit addressing when supported by chip.
49 * 2 : 64 bit addressing when supported by chip,
50 * limited to 16 segments of 4 GB -> 64 GB max.
52 #define SYM_CONF_DMA_ADDRESSING_MODE CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
55 * NVRAM support.
57 #define SYM_CONF_NVRAM_SUPPORT (1)
60 * These options are not tunable from 'make config'
62 #define SYM_LINUX_PROC_INFO_SUPPORT
63 #define SYM_LINUX_USER_COMMAND_SUPPORT
64 #define SYM_LINUX_USER_INFO_SUPPORT
65 #define SYM_LINUX_DEBUG_CONTROL_SUPPORT
68 * Also handle old NCR chips if not (0).
70 #define SYM_CONF_GENERIC_SUPPORT (1)
73 * Allow tags from 2 to 256, default 8
75 #ifndef CONFIG_SCSI_SYM53C8XX_MAX_TAGS
76 #define CONFIG_SCSI_SYM53C8XX_MAX_TAGS (8)
77 #endif
79 #if CONFIG_SCSI_SYM53C8XX_MAX_TAGS < 2
80 #define SYM_CONF_MAX_TAG (2)
81 #elif CONFIG_SCSI_SYM53C8XX_MAX_TAGS > 256
82 #define SYM_CONF_MAX_TAG (256)
83 #else
84 #define SYM_CONF_MAX_TAG CONFIG_SCSI_SYM53C8XX_MAX_TAGS
85 #endif
87 #ifndef CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS
88 #define CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS SYM_CONF_MAX_TAG
89 #endif
92 * Anyway, we configure the driver for at least 64 tags per LUN. :)
94 #if SYM_CONF_MAX_TAG <= 64
95 #define SYM_CONF_MAX_TAG_ORDER (6)
96 #elif SYM_CONF_MAX_TAG <= 128
97 #define SYM_CONF_MAX_TAG_ORDER (7)
98 #else
99 #define SYM_CONF_MAX_TAG_ORDER (8)
100 #endif
103 * Max number of SG entries.
105 #define SYM_CONF_MAX_SG (96)
108 * Driver setup structure.
110 * This structure is initialized from linux config options.
111 * It can be overridden at boot-up by the boot command line.
113 struct sym_driver_setup {
114 u_short max_tag;
115 u_char burst_order;
116 u_char scsi_led;
117 u_char scsi_diff;
118 u_char irq_mode;
119 u_char scsi_bus_check;
120 u_char host_id;
122 u_char verbose;
123 u_char settle_delay;
124 u_char use_nvram;
125 u_long excludes[8];
128 #define SYM_SETUP_MAX_TAG sym_driver_setup.max_tag
129 #define SYM_SETUP_BURST_ORDER sym_driver_setup.burst_order
130 #define SYM_SETUP_SCSI_LED sym_driver_setup.scsi_led
131 #define SYM_SETUP_SCSI_DIFF sym_driver_setup.scsi_diff
132 #define SYM_SETUP_IRQ_MODE sym_driver_setup.irq_mode
133 #define SYM_SETUP_SCSI_BUS_CHECK sym_driver_setup.scsi_bus_check
134 #define SYM_SETUP_HOST_ID sym_driver_setup.host_id
135 #define boot_verbose sym_driver_setup.verbose
138 * Initial setup.
140 * Can be overriden at startup by a command line.
142 #define SYM_LINUX_DRIVER_SETUP { \
143 .max_tag = CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS, \
144 .burst_order = 7, \
145 .scsi_led = 1, \
146 .scsi_diff = 1, \
147 .irq_mode = 0, \
148 .scsi_bus_check = 1, \
149 .host_id = 7, \
150 .verbose = 0, \
151 .settle_delay = 3, \
152 .use_nvram = 1, \
155 extern struct sym_driver_setup sym_driver_setup;
156 extern unsigned int sym_debug_flags;
157 #define DEBUG_FLAGS sym_debug_flags
160 * Max number of targets.
161 * Maximum is 16 and you are advised not to change this value.
163 #ifndef SYM_CONF_MAX_TARGET
164 #define SYM_CONF_MAX_TARGET (16)
165 #endif
168 * Max number of logical units.
169 * SPI-2 allows up to 64 logical units, but in real life, target
170 * that implements more that 7 logical units are pretty rare.
171 * Anyway, the cost of accepting up to 64 logical unit is low in
172 * this driver, thus going with the maximum is acceptable.
174 #ifndef SYM_CONF_MAX_LUN
175 #define SYM_CONF_MAX_LUN (64)
176 #endif
179 * Max number of IO control blocks queued to the controller.
180 * Each entry needs 8 bytes and the queues are allocated contiguously.
181 * Since we donnot want to allocate more than a page, the theorical
182 * maximum is PAGE_SIZE/8. For safety, we announce a bit less to the
183 * access method. :)
184 * When not supplied, as it is suggested, the driver compute some
185 * good value for this parameter.
187 /* #define SYM_CONF_MAX_START (PAGE_SIZE/8 - 16) */
190 * Support for Immediate Arbitration.
191 * Not advised.
193 /* #define SYM_CONF_IARB_SUPPORT */
196 * Only relevant if IARB support configured.
197 * - Max number of successive settings of IARB hints.
198 * - Set IARB on arbitration lost.
200 #define SYM_CONF_IARB_MAX 3
201 #define SYM_CONF_SET_IARB_ON_ARB_LOST 1
204 * Returning wrong residuals may make problems.
205 * When zero, this define tells the driver to
206 * always return 0 as transfer residual.
207 * Btw, all my testings of residuals have succeeded.
209 #define SYM_SETUP_RESIDUAL_SUPPORT 1
211 #endif /* SYM53C8XX_H */