X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fsym53c8xx_2%2Fsym53c8xx.h;h=7519728dfc382d2a20140679c26c03bdb7534683;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=fc81e413eb7028f3bcf83bf45739dd9ca91fc4b9;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h index fc81e413e..7519728df 100644 --- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h +++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h @@ -22,42 +22,24 @@ * *----------------------------------------------------------------------------- * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Where this Software is combined with software released under the terms of - * the GNU Public License ("GPL") and the terms of the GPL would require the - * combined work to also be released under the terms of the GPL, the terms - * and conditions of this License will apply in addition to those of the - * GPL with the exception of any terms or conditions of this License that - * conflict with, or are expressly prohibited by, the GPL. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef SYM53C8XX_H #define SYM53C8XX_H -#include - -#ifdef CONFIG_SCSI_SYM53C8XX_IOMAPPED -#define SYM_CONF_IOMAPPED -#endif /* * DMA addressing mode. @@ -81,7 +63,6 @@ */ #if 1 #define SYM_LINUX_PROC_INFO_SUPPORT -#define SYM_LINUX_BOOT_COMMAND_LINE_SUPPORT #define SYM_LINUX_USER_COMMAND_SUPPORT #define SYM_LINUX_USER_INFO_SUPPORT #define SYM_LINUX_DEBUG_CONTROL_SUPPORT @@ -142,9 +123,7 @@ struct sym_driver_setup { u_char scsi_bus_check; u_char host_id; - u_char reverse_probe; u_char verbose; - u_short debug; u_char settle_delay; u_char use_nvram; u_long excludes[8]; @@ -158,10 +137,7 @@ struct sym_driver_setup { #define SYM_SETUP_IRQ_MODE sym_driver_setup.irq_mode #define SYM_SETUP_SCSI_BUS_CHECK sym_driver_setup.scsi_bus_check #define SYM_SETUP_HOST_ID sym_driver_setup.host_id - -/* Always enable parity. */ -#define SYM_SETUP_PCI_PARITY 1 -#define SYM_SETUP_SCSI_PARITY 1 +#define boot_verbose sym_driver_setup.verbose /* * Initial setup. @@ -176,54 +152,65 @@ struct sym_driver_setup { .irq_mode = 0, \ .scsi_bus_check = 1, \ .host_id = 7, \ - .reverse_probe = 0, \ .verbose = 0, \ - .debug = 0, \ .settle_delay = 3, \ .use_nvram = 1, \ } +extern struct sym_driver_setup sym_driver_setup; +extern unsigned int sym_debug_flags; +#define DEBUG_FLAGS sym_debug_flags + /* - * Boot fail safe setup. - * - * Override initial setup from boot command line: - * sym53c8xx=safe:y + * Max number of targets. + * Maximum is 16 and you are advised not to change this value. */ -#define SYM_LINUX_DRIVER_SAFE_SETUP { \ - .max_tag = 0, \ - .burst_order = 0, \ - .scsi_led = 0, \ - .scsi_diff = 1, \ - .irq_mode = 0, \ - .scsi_bus_check = 2, \ - .host_id = 7, \ - .reverse_probe = 0, \ - .verbose = 2, \ - .debug = 0, \ - .settle_delay = 10, \ - .use_nvram = 1, \ -} +#ifndef SYM_CONF_MAX_TARGET +#define SYM_CONF_MAX_TARGET (16) +#endif /* - * This structure is initialized from linux config options. - * It can be overridden at boot-up by the boot command line. + * Max number of logical units. + * SPI-2 allows up to 64 logical units, but in real life, target + * that implements more that 7 logical units are pretty rare. + * Anyway, the cost of accepting up to 64 logical unit is low in + * this driver, thus going with the maximum is acceptable. */ -#ifdef SYM_GLUE_C -struct sym_driver_setup - sym_driver_setup = SYM_LINUX_DRIVER_SETUP; -#ifdef SYM_LINUX_DEBUG_CONTROL_SUPPORT -u_int sym_debug_flags = 0; +#ifndef SYM_CONF_MAX_LUN +#define SYM_CONF_MAX_LUN (64) #endif -#else -extern struct sym_driver_setup sym_driver_setup; -#ifdef SYM_LINUX_DEBUG_CONTROL_SUPPORT -extern u_int sym_debug_flags; -#endif -#endif /* SYM_GLUE_C */ -#ifdef SYM_LINUX_DEBUG_CONTROL_SUPPORT -#define DEBUG_FLAGS sym_debug_flags -#endif -#define boot_verbose sym_driver_setup.verbose +/* + * Max number of IO control blocks queued to the controller. + * Each entry needs 8 bytes and the queues are allocated contiguously. + * Since we donnot want to allocate more than a page, the theorical + * maximum is PAGE_SIZE/8. For safety, we announce a bit less to the + * access method. :) + * When not supplied, as it is suggested, the driver compute some + * good value for this parameter. + */ +/* #define SYM_CONF_MAX_START (PAGE_SIZE/8 - 16) */ + +/* + * Support for Immediate Arbitration. + * Not advised. + */ +/* #define SYM_CONF_IARB_SUPPORT */ + +/* + * Only relevant if IARB support configured. + * - Max number of successive settings of IARB hints. + * - Set IARB on arbitration lost. + */ +#define SYM_CONF_IARB_MAX 3 +#define SYM_CONF_SET_IARB_ON_ARB_LOST 1 + +/* + * Returning wrong residuals may make problems. + * When zero, this define tells the driver to + * always return 0 as transfer residual. + * Btw, all my testings of residuals have succeeded. + */ +#define SYM_SETUP_RESIDUAL_SUPPORT 1 #endif /* SYM53C8XX_H */