1 |
199 |
simons |
/*
|
2 |
|
|
* QLogic ISP1020 Intelligent SCSI Processor Driver (PCI)
|
3 |
|
|
* Written by Erik H. Moe, ehm@cris.com
|
4 |
|
|
* Copyright 1995, Erik H. Moe
|
5 |
|
|
*
|
6 |
|
|
* This program is free software; you can redistribute it and/or modify it
|
7 |
|
|
* under the terms of the GNU General Public License as published by the
|
8 |
|
|
* Free Software Foundation; either version 2, or (at your option) any
|
9 |
|
|
* later version.
|
10 |
|
|
*
|
11 |
|
|
* This program is distributed in the hope that it will be useful, but
|
12 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 |
|
|
* General Public License for more details.
|
15 |
|
|
*/
|
16 |
|
|
|
17 |
|
|
/* Renamed and updated to 1.3.x by Michael Griffith <grif@cs.ucr.edu> */
|
18 |
|
|
|
19 |
|
|
/*
|
20 |
|
|
* $Date: 2001-09-10 07:44:34 $
|
21 |
|
|
* $Revision: 1.1.1.1 $
|
22 |
|
|
*
|
23 |
|
|
* $Log: not supported by cvs2svn $
|
24 |
|
|
* Revision 1.1.1.1 2001/07/02 17:58:29 simons
|
25 |
|
|
* Initial revision
|
26 |
|
|
*
|
27 |
|
|
* Revision 0.5 1995/09/22 02:32:56 root
|
28 |
|
|
* do auto request sense
|
29 |
|
|
*
|
30 |
|
|
* Revision 0.4 1995/08/07 04:48:28 root
|
31 |
|
|
* supply firmware with driver.
|
32 |
|
|
* numerous bug fixes/general cleanup of code.
|
33 |
|
|
*
|
34 |
|
|
* Revision 0.3 1995/07/16 16:17:16 root
|
35 |
|
|
* added reset/abort code.
|
36 |
|
|
*
|
37 |
|
|
* Revision 0.2 1995/06/29 03:19:43 root
|
38 |
|
|
* fixed biosparam.
|
39 |
|
|
* added queue protocol.
|
40 |
|
|
*
|
41 |
|
|
* Revision 0.1 1995/06/25 01:56:13 root
|
42 |
|
|
* Initial release.
|
43 |
|
|
*
|
44 |
|
|
*/
|
45 |
|
|
|
46 |
|
|
#ifndef _QLOGICISP_H
|
47 |
|
|
#define _QLOGICISP_H
|
48 |
|
|
|
49 |
|
|
/*
|
50 |
|
|
* With the qlogic interface, every queue slot can hold a SCSI
|
51 |
|
|
* command with up to 4 scatter/gather entries. If we need more
|
52 |
|
|
* than 4 entries, continuation entries can be used that hold
|
53 |
|
|
* another 7 entries each. Unlike for other drivers, this means
|
54 |
|
|
* that the maximum number of scatter/gather entries we can
|
55 |
|
|
* support at any given time is a function of the number of queue
|
56 |
|
|
* slots available. That is, host->can_queue and host->sg_tablesize
|
57 |
|
|
* are dynamic and _not_ independent. This all works fine because
|
58 |
|
|
* requests are queued serially and the scatter/gather limit is
|
59 |
|
|
* determined for each queue request anew.
|
60 |
|
|
*/
|
61 |
|
|
#define QLOGICISP_REQ_QUEUE_LEN 63 /* must be power of two - 1 */
|
62 |
|
|
#define QLOGICISP_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
|
63 |
|
|
|
64 |
|
|
int isp1020_detect(Scsi_Host_Template *);
|
65 |
|
|
int isp1020_release(struct Scsi_Host *);
|
66 |
|
|
const char * isp1020_info(struct Scsi_Host *);
|
67 |
|
|
int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
|
68 |
|
|
int isp1020_abort(Scsi_Cmnd *);
|
69 |
|
|
int isp1020_reset(Scsi_Cmnd *, unsigned int);
|
70 |
|
|
int isp1020_biosparam(Disk *, kdev_t, int[]);
|
71 |
|
|
|
72 |
|
|
#ifndef NULL
|
73 |
|
|
#define NULL (0)
|
74 |
|
|
#endif
|
75 |
|
|
|
76 |
|
|
extern struct proc_dir_entry proc_scsi_isp1020;
|
77 |
|
|
|
78 |
|
|
#define QLOGICISP { \
|
79 |
|
|
/* next */ NULL, \
|
80 |
|
|
/* usage_count */ NULL, \
|
81 |
|
|
/* proc dir */ NULL, \
|
82 |
|
|
/* procfs info */ NULL, \
|
83 |
|
|
/* name */ NULL, \
|
84 |
|
|
/* detect */ isp1020_detect, \
|
85 |
|
|
/* release */ isp1020_release, \
|
86 |
|
|
/* info */ isp1020_info, \
|
87 |
|
|
/* command */ NULL, \
|
88 |
|
|
/* queuecommand */ isp1020_queuecommand, \
|
89 |
|
|
/* abort */ isp1020_abort, \
|
90 |
|
|
/* reset */ isp1020_reset, \
|
91 |
|
|
/* slave_attach */ NULL, \
|
92 |
|
|
/* bios_param */ isp1020_biosparam, \
|
93 |
|
|
/* can_queue */ QLOGICISP_REQ_QUEUE_LEN, \
|
94 |
|
|
/* this_id */ -1, \
|
95 |
|
|
/* sg_tablesize */ QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
|
96 |
|
|
/* cmd_per_lun */ 1, \
|
97 |
|
|
/* present */ 0, \
|
98 |
|
|
/* unchecked_isa_dma */ 0, \
|
99 |
|
|
/* use_clustering */ DISABLE_CLUSTERING \
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
#endif /* _QLOGICISP_H */
|