|
|
1.1 root 1: /*
2: * QLogic ISP1020 Intelligent SCSI Processor Driver (PCI)
3: * Written by Erik H. Moe, [email protected]
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 <[email protected]> */
18:
19: /*
1.1.1.2 ! root 20: * $Date: 2007/03/27 21:04:30 $
! 21: * $Revision: 1.1.4.2 $
1.1 root 22: *
23: * Revision 0.5 1995/09/22 02:32:56 root
24: * do auto request sense
25: *
26: * Revision 0.4 1995/08/07 04:48:28 root
27: * supply firmware with driver.
28: * numerous bug fixes/general cleanup of code.
29: *
30: * Revision 0.3 1995/07/16 16:17:16 root
31: * added reset/abort code.
32: *
33: * Revision 0.2 1995/06/29 03:19:43 root
34: * fixed biosparam.
35: * added queue protocol.
36: *
37: * Revision 0.1 1995/06/25 01:56:13 root
38: * Initial release.
39: *
40: */
41:
42: #ifndef _QLOGICISP_H
43: #define _QLOGICISP_H
44:
45: /*
46: * With the qlogic interface, every queue slot can hold a SCSI
47: * command with up to 4 scatter/gather entries. If we need more
48: * than 4 entries, continuation entries can be used that hold
49: * another 7 entries each. Unlike for other drivers, this means
50: * that the maximum number of scatter/gather entries we can
51: * support at any given time is a function of the number of queue
52: * slots available. That is, host->can_queue and host->sg_tablesize
53: * are dynamic and _not_ independent. This all works fine because
54: * requests are queued serially and the scatter/gather limit is
55: * determined for each queue request anew.
56: */
57: #define QLOGICISP_REQ_QUEUE_LEN 63 /* must be power of two - 1 */
58: #define QLOGICISP_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
59:
60: int isp1020_detect(Scsi_Host_Template *);
61: int isp1020_release(struct Scsi_Host *);
62: const char * isp1020_info(struct Scsi_Host *);
63: int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
64: int isp1020_abort(Scsi_Cmnd *);
65: int isp1020_reset(Scsi_Cmnd *, unsigned int);
66: int isp1020_biosparam(Disk *, kdev_t, int[]);
67:
68: #ifndef NULL
69: #define NULL (0)
70: #endif
71:
1.1.1.2 ! root 72: static struct proc_dir_entry proc_scsi_isp1020;
1.1 root 73:
74: #define QLOGICISP { \
75: /* next */ NULL, \
76: /* usage_count */ NULL, \
77: /* proc dir */ NULL, \
78: /* procfs info */ NULL, \
79: /* name */ NULL, \
80: /* detect */ isp1020_detect, \
81: /* release */ isp1020_release, \
82: /* info */ isp1020_info, \
83: /* command */ NULL, \
84: /* queuecommand */ isp1020_queuecommand, \
85: /* abort */ isp1020_abort, \
86: /* reset */ isp1020_reset, \
87: /* slave_attach */ NULL, \
88: /* bios_param */ isp1020_biosparam, \
89: /* can_queue */ QLOGICISP_REQ_QUEUE_LEN, \
90: /* this_id */ -1, \
91: /* sg_tablesize */ QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
92: /* cmd_per_lun */ 1, \
93: /* present */ 0, \
94: /* unchecked_isa_dma */ 0, \
95: /* use_clustering */ DISABLE_CLUSTERING \
96: }
97:
98: #endif /* _QLOGICISP_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.