OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [scsi/] [qlogicfc.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.