MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / scsi / qlogicisp.h
blobd3b263b75863e61f809e3b5fd78cc0a6705b40c4
1 /*
2 * QLogic ISP1020 Intelligent SCSI Processor Driver (PCI)
3 * Written by Erik H. Moe, ehm@cris.com
4 * Copyright 1995, Erik H. Moe
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.
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.
17 /* Renamed and updated to 1.3.x by Michael Griffith <grif@cs.ucr.edu> */
20 * $Date: 1995/09/22 02:32:56 $
21 * $Revision: 0.5 $
23 * $Log: isp1020.h,v $
24 * Revision 0.5 1995/09/22 02:32:56 root
25 * do auto request sense
27 * Revision 0.4 1995/08/07 04:48:28 root
28 * supply firmware with driver.
29 * numerous bug fixes/general cleanup of code.
31 * Revision 0.3 1995/07/16 16:17:16 root
32 * added reset/abort code.
34 * Revision 0.2 1995/06/29 03:19:43 root
35 * fixed biosparam.
36 * added queue protocol.
38 * Revision 0.1 1995/06/25 01:56:13 root
39 * Initial release.
43 #ifndef _QLOGICISP_H
44 #define _QLOGICISP_H
47 * With the qlogic interface, every queue slot can hold a SCSI
48 * command with up to 4 scatter/gather entries. If we need more
49 * than 4 entries, continuation entries can be used that hold
50 * another 7 entries each. Unlike for other drivers, this means
51 * that the maximum number of scatter/gather entries we can
52 * support at any given time is a function of the number of queue
53 * slots available. That is, host->can_queue and host->sg_tablesize
54 * are dynamic and _not_ independent. This all works fine because
55 * requests are queued serially and the scatter/gather limit is
56 * determined for each queue request anew.
58 #define QLOGICISP_REQ_QUEUE_LEN 63 /* must be power of two - 1 */
59 #define QLOGICISP_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
61 int isp1020_detect(Scsi_Host_Template *);
62 int isp1020_release(struct Scsi_Host *);
63 const char * isp1020_info(struct Scsi_Host *);
64 int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
65 int isp1020_abort(Scsi_Cmnd *);
66 int isp1020_reset(Scsi_Cmnd *, unsigned int);
67 int isp1020_biosparam(struct scsi_device *, struct block_device *,
68 sector_t, int[]);
69 #endif /* _QLOGICISP_H */