/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family * of PCI-SCSI IO processors. * * Copyright (C) 1999-2001 Gerard Roudier <[email protected]> * * This driver is derived from the Linux sym53c8xx driver. * Copyright (C) 1998-2000 Gerard Roudier * * The sym53c8xx driver is derived from the ncr53c8xx driver that had been * a port of the FreeBSD ncr driver to Linux-1.2.13. * * The original ncr driver has been written for 386bsd and FreeBSD by * Wolfgang Stanglmeier <[email protected]> * Stefan Esser <[email protected]> * Copyright (C) 1994 Wolfgang Stanglmeier * * Other major contributions: * * NVRAM detection and reading. * Copyright (C) 1997 Richard Waltham <[email protected]> * *----------------------------------------------------------------------------- */ #ifndef SYM53C8XX_H #define SYM53C8XX_H /* * DMA addressing mode. * * 0 : 32 bit addressing for all chips. * 1 : 40 bit addressing when supported by chip. * 2 : 64 bit addressing when supported by chip, * limited to 16 segments of 4 GB -> 64 GB max. */ #define SYM_CONF_DMA_ADDRESSING_MODE … /* * NVRAM support. */ #if 1 #define SYM_CONF_NVRAM_SUPPORT … #endif /* * These options are not tunable from 'make config' */ #if 1 #define SYM_LINUX_PROC_INFO_SUPPORT #define SYM_LINUX_USER_COMMAND_SUPPORT #define SYM_LINUX_USER_INFO_SUPPORT #define SYM_LINUX_DEBUG_CONTROL_SUPPORT #endif /* * Also handle old NCR chips if not (0). */ #define SYM_CONF_GENERIC_SUPPORT … /* * Allow tags from 2 to 256, default 8 */ #ifndef CONFIG_SCSI_SYM53C8XX_MAX_TAGS #define CONFIG_SCSI_SYM53C8XX_MAX_TAGS … #endif #if CONFIG_SCSI_SYM53C8XX_MAX_TAGS < 2 #define SYM_CONF_MAX_TAG … #elif CONFIG_SCSI_SYM53C8XX_MAX_TAGS > 256 #define SYM_CONF_MAX_TAG … #else #define SYM_CONF_MAX_TAG … #endif #ifndef CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS #define CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS … #endif /* * Anyway, we configure the driver for at least 64 tags per LUN. :) */ #if SYM_CONF_MAX_TAG <= 64 #define SYM_CONF_MAX_TAG_ORDER … #elif SYM_CONF_MAX_TAG <= 128 #define SYM_CONF_MAX_TAG_ORDER … #else #define SYM_CONF_MAX_TAG_ORDER … #endif /* * Max number of SG entries. */ #define SYM_CONF_MAX_SG … /* * Driver setup structure. * * This structure is initialized from linux config options. * It can be overridden at boot-up by the boot command line. */ struct sym_driver_setup { … }; #define SYM_SETUP_MAX_TAG … #define SYM_SETUP_BURST_ORDER … #define SYM_SETUP_SCSI_LED … #define SYM_SETUP_SCSI_DIFF … #define SYM_SETUP_IRQ_MODE … #define SYM_SETUP_SCSI_BUS_CHECK … #define SYM_SETUP_HOST_ID … #define boot_verbose … /* * Initial setup. * * Can be overriden at startup by a command line. */ #define SYM_LINUX_DRIVER_SETUP … extern struct sym_driver_setup sym_driver_setup; extern unsigned int sym_debug_flags; #define DEBUG_FLAGS … /* * Max number of targets. * Maximum is 16 and you are advised not to change this value. */ #ifndef SYM_CONF_MAX_TARGET #define SYM_CONF_MAX_TARGET … #endif /* * 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. */ #ifndef SYM_CONF_MAX_LUN #define SYM_CONF_MAX_LUN … #endif /* * 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 … #define SYM_CONF_SET_IARB_ON_ARB_LOST … /* * 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 … #endif /* SYM53C8XX_H */