aboutsummaryrefslogtreecommitdiffstats
path: root/lib
ModeNameSize
d---------arm_atsam / packs32logstatsplain
m---------lib/chibios @ 587968d0logstats
m---------lib/chibios-contrib @ ede48340logstats
m---------lib/googletest @ ec44c6c0logstats
d---------lufa365logstatsplain
m---------lib/ugfx @ 3e97b740logstats
>44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
/*
 * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family 
 * of PCI-SCSI IO processors.
 *
 * Copyright (C) 1999-2001  Gerard Roudier <groudier@free.fr>
 *
 * 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        <wolf@cologne.de>
 *         Stefan Esser                <se@mi.Uni-Koeln.de>
 * Copyright (C) 1994  Wolfgang Stanglmeier
 *
 * Other major contributions:
 *
 * NVRAM detection and reading.
 * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
 *
 *-----------------------------------------------------------------------------
 *
 * 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.
 *
 * 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 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.
 */

#ifndef SYM53C8XX_H
#define SYM53C8XX_H

#if !defined(LINUX_VERSION_CODE)
#include <xen/version.h>
#endif
#include <xen/config.h>

/*
 *  Compatibility with ncr53c8xx and sym53c8xx configuration options.
 */
#ifndef	CONFIG_SCSI_SYM53C8XX_IOMAPPED
#ifdef	CONFIG_SCSI_NCR53C8XX_IOMAPPED
#define	CONFIG_SCSI_SYM53C8XX_IOMAPPED		CONFIG_SCSI_NCR53C8XX_IOMAPPED
#endif
#endif

#ifndef	CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS
#ifdef	CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
#define	CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS	CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
#endif
#endif

#ifndef	CONFIG_SCSI_SYM53C8XX_MAX_TAGS
#ifdef	CONFIG_SCSI_NCR53C8XX_MAX_TAGS
#define	CONFIG_SCSI_SYM53C8XX_MAX_TAGS		CONFIG_SCSI_NCR53C8XX_MAX_TAGS
#endif
#endif

int sym53c8xx_detect(Scsi_Host_Template *tpnt);
const char *sym53c8xx_info(struct Scsi_Host *host);

int sym53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));

int sym53c8xx_eh_abort_handler(Scsi_Cmnd *);
int sym53c8xx_eh_device_reset_handler(Scsi_Cmnd *);
int sym53c8xx_eh_bus_reset_handler(Scsi_Cmnd *);
int sym53c8xx_eh_host_reset_handler(Scsi_Cmnd *);

#ifdef MODULE
int sym53c8xx_release(struct Scsi_Host *);
#else
#define sym53c8xx_release NULL
#endif


/*
 *  Host template defintion
 */
#if (LINUX_VERSION_CODE >= 0x020400) || defined(HOSTS_C) || defined(MODULE)

#include <scsi/scsicam.h>

#define SYM53C8XX {							\
	name:			"sym53c8xx",				\
	detect:			sym53c8xx_detect,			\
	release:		sym53c8xx_release,			\
	info:			sym53c8xx_info, 			\
	queuecommand:		sym53c8xx_queue_command,		\
	use_new_eh_code:	1,					\
	eh_abort_handler:	sym53c8xx_eh_abort_handler,		\
	eh_device_reset_handler:sym53c8xx_eh_device_reset_handler,	\
	eh_bus_reset_handler:	sym53c8xx_eh_bus_reset_handler,		\
	eh_host_reset_handler:	sym53c8xx_eh_host_reset_handler,	\
	bios_param:		scsicam_bios_param,			\
	can_queue:		0,					\
	this_id:		7,					\
	sg_tablesize:		0,					\
	cmd_per_lun:		0,					\
	use_clustering:		DISABLE_CLUSTERING,			\
	}
/* SAE */
#ifdef XEN_KILLED
	highmem_io:		1}
#endif

#endif /* defined(HOSTS_C) || defined(MODULE) */ 

/*
 *  Translate kernel configuration parameters
 *  into corresponding driver parameters.
 */
#if !defined(HOSTS_C)

/*
 *  Use normal IO if configured.
 *  Normal IO forced for alpha.
 *  Forced to MMIO for sparc.
 */
#if defined(__alpha__)
#define	SYM_CONF_IOMAPPED
#elif defined(__sparc__)
#undef SYM_CONF_IOMAPPED
/* #elif defined(__powerpc__) */
/* #define	SYM_CONF_IOMAPPED */
/* #define SYM_OPT_NO_BUS_MEMORY_MAPPING */
#elif defined(CONFIG_SCSI_SYM53C8XX_IOMAPPED)
#define	SYM_CONF_IOMAPPED
#endif

/*
 *  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.
 */
#ifdef	CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
#define	SYM_CONF_DMA_ADDRESSING_MODE CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
#endif

/*
 *  NCR PQS/PDS special device support.
 */
#if 1
#define SYM_CONF_PQS_PDS_SUPPORT
#endif

/*
 *  NVRAM support.
 */
#if 1
#define SYM_CONF_NVRAM_SUPPORT		(1)
#define SYM_SETUP_SYMBIOS_NVRAM		(1)
#define SYM_SETUP_TEKRAM_NVRAM		(1)
#endif

/*
 *  These options are not tunable from 'make config'