1 |
1275 |
phoenix |
/******************************************************************************
|
2 |
|
|
** High Performance device driver for the Symbios 53C896 controller.
|
3 |
|
|
**
|
4 |
|
|
** Copyright (C) 1998-2001 Gerard Roudier <groudier@free.fr>
|
5 |
|
|
**
|
6 |
|
|
** This driver also supports all the Symbios 53C8XX controller family,
|
7 |
|
|
** except 53C810 revisions < 16, 53C825 revisions < 16 and all
|
8 |
|
|
** revisions of 53C815 controllers.
|
9 |
|
|
**
|
10 |
|
|
** This driver is based on the Linux port of the FreeBSD ncr driver.
|
11 |
|
|
**
|
12 |
|
|
** Copyright (C) 1994 Wolfgang Stanglmeier
|
13 |
|
|
**
|
14 |
|
|
**-----------------------------------------------------------------------------
|
15 |
|
|
**
|
16 |
|
|
** This program is free software; you can redistribute it and/or modify
|
17 |
|
|
** it under the terms of the GNU General Public License as published by
|
18 |
|
|
** the Free Software Foundation; either version 2 of the License, or
|
19 |
|
|
** (at your option) any later version.
|
20 |
|
|
**
|
21 |
|
|
** This program is distributed in the hope that it will be useful,
|
22 |
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
|
|
** GNU General Public License for more details.
|
25 |
|
|
**
|
26 |
|
|
** You should have received a copy of the GNU General Public License
|
27 |
|
|
** along with this program; if not, write to the Free Software
|
28 |
|
|
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
29 |
|
|
**
|
30 |
|
|
**-----------------------------------------------------------------------------
|
31 |
|
|
**
|
32 |
|
|
** The Linux port of the FreeBSD ncr driver has been achieved in
|
33 |
|
|
** november 1995 by:
|
34 |
|
|
**
|
35 |
|
|
** Gerard Roudier <groudier@free.fr>
|
36 |
|
|
**
|
37 |
|
|
** Being given that this driver originates from the FreeBSD version, and
|
38 |
|
|
** in order to keep synergy on both, any suggested enhancements and corrections
|
39 |
|
|
** received on Linux are automatically a potential candidate for the FreeBSD
|
40 |
|
|
** version.
|
41 |
|
|
**
|
42 |
|
|
** The original driver has been written for 386bsd and FreeBSD by
|
43 |
|
|
** Wolfgang Stanglmeier <wolf@cologne.de>
|
44 |
|
|
** Stefan Esser <se@mi.Uni-Koeln.de>
|
45 |
|
|
**
|
46 |
|
|
**-----------------------------------------------------------------------------
|
47 |
|
|
**
|
48 |
|
|
** Major contributions:
|
49 |
|
|
** --------------------
|
50 |
|
|
**
|
51 |
|
|
** NVRAM detection and reading.
|
52 |
|
|
** Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
|
53 |
|
|
**
|
54 |
|
|
*******************************************************************************
|
55 |
|
|
*/
|
56 |
|
|
|
57 |
|
|
#ifndef SYM53C8XX_H
|
58 |
|
|
#define SYM53C8XX_H
|
59 |
|
|
|
60 |
|
|
#include "sym53c8xx_defs.h"
|
61 |
|
|
|
62 |
|
|
/*
|
63 |
|
|
** Define Scsi_Host_Template parameters
|
64 |
|
|
**
|
65 |
|
|
** Used by hosts.c and sym53c8xx.c with module configuration.
|
66 |
|
|
*/
|
67 |
|
|
|
68 |
|
|
#if (LINUX_VERSION_CODE >= 0x020400) || defined(HOSTS_C) || defined(MODULE)
|
69 |
|
|
|
70 |
|
|
#include <scsi/scsicam.h>
|
71 |
|
|
|
72 |
|
|
int sym53c8xx_abort(Scsi_Cmnd *);
|
73 |
|
|
int sym53c8xx_detect(Scsi_Host_Template *tpnt);
|
74 |
|
|
const char *sym53c8xx_info(struct Scsi_Host *host);
|
75 |
|
|
int sym53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
|
76 |
|
|
int sym53c8xx_reset(Scsi_Cmnd *, unsigned int);
|
77 |
|
|
|
78 |
|
|
#ifdef MODULE
|
79 |
|
|
int sym53c8xx_release(struct Scsi_Host *);
|
80 |
|
|
#else
|
81 |
|
|
#define sym53c8xx_release NULL
|
82 |
|
|
#endif
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
|
86 |
|
|
|
87 |
|
|
#define SYM53C8XX { name: "", \
|
88 |
|
|
detect: sym53c8xx_detect, \
|
89 |
|
|
release: sym53c8xx_release, \
|
90 |
|
|
info: sym53c8xx_info, \
|
91 |
|
|
queuecommand: sym53c8xx_queue_command,\
|
92 |
|
|
abort: sym53c8xx_abort, \
|
93 |
|
|
reset: sym53c8xx_reset, \
|
94 |
|
|
bios_param: scsicam_bios_param, \
|
95 |
|
|
can_queue: SCSI_NCR_CAN_QUEUE, \
|
96 |
|
|
this_id: 7, \
|
97 |
|
|
sg_tablesize: SCSI_NCR_SG_TABLESIZE, \
|
98 |
|
|
cmd_per_lun: SCSI_NCR_CMD_PER_LUN, \
|
99 |
|
|
max_sectors: MAX_SEGMENTS*8, \
|
100 |
|
|
use_clustering: DISABLE_CLUSTERING, \
|
101 |
|
|
highmem_io: 1}
|
102 |
|
|
|
103 |
|
|
#else
|
104 |
|
|
|
105 |
|
|
#define SYM53C8XX { NULL, NULL, NULL, NULL, \
|
106 |
|
|
NULL, sym53c8xx_detect, \
|
107 |
|
|
sym53c8xx_release, sym53c8xx_info, NULL, \
|
108 |
|
|
sym53c8xx_queue_command,sym53c8xx_abort, \
|
109 |
|
|
sym53c8xx_reset, NULL, scsicam_bios_param, \
|
110 |
|
|
SCSI_NCR_CAN_QUEUE, 7, \
|
111 |
|
|
SCSI_NCR_SG_TABLESIZE, SCSI_NCR_CMD_PER_LUN, \
|
112 |
|
|
0, 0, DISABLE_CLUSTERING}
|
113 |
|
|
|
114 |
|
|
#endif /* LINUX_VERSION_CODE */
|
115 |
|
|
|
116 |
|
|
#endif /* defined(HOSTS_C) || defined(MODULE) */
|
117 |
|
|
|
118 |
|
|
#endif /* SYM53C8XX_H */
|