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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [scsi/] [qlogicisp.h] - Blame information for rev 1772

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
/*
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: 2005-12-20 10:17:45 $
21
 * $Revision: 1.1 $
22
 *
23
 * $Log: not supported by cvs2svn $
24
 * Revision 1.1.1.1  2001/09/10 07:44:34  simons
25
 * Initial import
26
 *
27
 * Revision 1.1.1.1  2001/07/02 17:58:29  simons
28
 * Initial revision
29
 *
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 _QLOGICISP_H
50
#define _QLOGICISP_H
51
 
52
/*
53
 * With the qlogic interface, every queue slot can hold a SCSI
54
 * command with up to 4 scatter/gather entries.  If we need more
55
 * than 4 entries, continuation entries can be used that hold
56
 * another 7 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
#define QLOGICISP_REQ_QUEUE_LEN 63      /* must be power of two - 1 */
65
#define QLOGICISP_MAX_SG(ql)    (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
66
 
67
int isp1020_detect(Scsi_Host_Template *);
68
int isp1020_release(struct Scsi_Host *);
69
const char * isp1020_info(struct Scsi_Host *);
70
int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
71
int isp1020_abort(Scsi_Cmnd *);
72
int isp1020_reset(Scsi_Cmnd *, unsigned int);
73
int isp1020_biosparam(Disk *, kdev_t, int[]);
74
 
75
#ifndef NULL
76
#define NULL (0)
77
#endif
78
 
79
extern struct proc_dir_entry proc_scsi_isp1020;
80
 
81
#define QLOGICISP {                                                        \
82
        /* next */              NULL,                                      \
83
        /* usage_count */       NULL,                                      \
84
        /* proc dir */          NULL,                                      \
85
        /* procfs info */       NULL,                                      \
86
        /* name */              NULL,                                      \
87
        /* detect */            isp1020_detect,                            \
88
        /* release */           isp1020_release,                           \
89
        /* info */              isp1020_info,                              \
90
        /* command */           NULL,                                      \
91
        /* queuecommand */      isp1020_queuecommand,                      \
92
        /* abort */             isp1020_abort,                             \
93
        /* reset */             isp1020_reset,                             \
94
        /* slave_attach */      NULL,                                      \
95
        /* bios_param */        isp1020_biosparam,                         \
96
        /* can_queue */         QLOGICISP_REQ_QUEUE_LEN,                   \
97
        /* this_id */           -1,                                        \
98
        /* sg_tablesize */      QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
99
        /* cmd_per_lun */       1,                                         \
100
        /* present */           0,                                          \
101
        /* unchecked_isa_dma */ 0,                                          \
102
        /* use_clustering */    DISABLE_CLUSTERING                         \
103
}
104
 
105
#endif /* _QLOGICISP_H */

powered by: WebSVN 2.1.0

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