Annotation of Gnu-Mach/linux/src/drivers/scsi/qlogicisp.h, revision 1.1

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: /*
        !            20:  * $Date: 1999/04/26 05:54:53 $
        !            21:  * $Revision: 1.1 $
        !            22:  *
        !            23:  * $Log: qlogicisp.h,v $
        !            24:  * Revision 1.1  1999/04/26 05:54:53  tb
        !            25:  * 1998-11-30  OKUJI Yoshinori  <[email protected]>
        !            26:  *
        !            27:  *     Clean up linux emulation code to make it architecture-independent
        !            28:  *     as much as possible.
        !            29:  *
        !            30:  *     * linux: Renamed from linuxdev.
        !            31:  *     * Makefile.in (objfiles): Add linux.o instead of linuxdev.o.
        !            32:  *     (MAKE): New variable. Used for the linux.o target.
        !            33:  *     * configure.in: Add AC_CHECK_TOOL(MAKE, make).
        !            34:  *     * i386/i386/spl.h: Include <i386/ipl.h>, for compatibility with
        !            35:  *     OSF Mach 3.0. Suggested by Elgin Lee <[email protected]>.
        !            36:  *     * linux/src: Renamed from linux/linux.
        !            37:  *     * linux/dev: Renamed from linux/mach.
        !            38:  *     * linux/Drivers.in (AC_INIT): Use dev/include/linux/autoconf.h,
        !            39:  *     instead of mach/include/linux/autoconf.h.
        !            40:  *     * Makefile.in (all): Target ../linux.o instead of ../linuxdev.o.
        !            41:  *     * linux/dev/drivers/block/genhd.c: Include <machine/spl.h> instead
        !            42:  *     of <i386/ipl.h>.
        !            43:  *     * linux/dev/drivers/net/auto_irq.c: Remove unneeded header files,
        !            44:  *     <i386/ipl.h> and <i386/pic.h>.
        !            45:  *     * linux/dev/init/main.c: Many i386-dependent codes moved to ...
        !            46:  *     * linux/dev/arch/i386/irq.c: ... here.
        !            47:  *     * linux/dev/arch/i386/setup.c: New file.
        !            48:  *     * linux/dev/arch/i386/linux_emul.h: Likewise.
        !            49:  *     * linux/dev/arch/i386/glue/timer.c: Merged into sched.c.
        !            50:  *     * linux/dev/arch/i386/glue/sched.c: Include <machine/spl.h> instead
        !            51:  *     of <i386/ipl.h>, and moved to ...
        !            52:  *     * linux/dev/kernel/sched.c: ... here.
        !            53:  *     * linux/dev/arch/i386/glue/block.c: Include <machine/spl.h> and
        !            54:  *     <linux_emul.h>, instead of i386-dependent header files, and
        !            55:  *     moved to ...
        !            56:  *     * linux/dev/glue/blocl.c: ... here.
        !            57:  *     * linux/dev/arch/i386/glue/net.c: Include <machine/spl.h> and
        !            58:  *     <linux_emul.h>, instead of i386-dependent header files, and
        !            59:  *     moved to ...
        !            60:  *     * linux/dev/glue/net.c: ... here.
        !            61:  *     * linux/dev/arch/i386/glue/misc.c: Remove `x86' and moved to ...
        !            62:  *     * linux/dev/glue/misc.c: ... here.
        !            63:  *     * linux/dev/arch/i386/glue/kmem.c: Moved to ...
        !            64:  *     * linux/dev/glue/kmem.c: ... here.
        !            65:  *
        !            66:  * Revision 0.5  1995/09/22  02:32:56  root
        !            67:  * do auto request sense
        !            68:  *
        !            69:  * Revision 0.4  1995/08/07  04:48:28  root
        !            70:  * supply firmware with driver.
        !            71:  * numerous bug fixes/general cleanup of code.
        !            72:  *
        !            73:  * Revision 0.3  1995/07/16  16:17:16  root
        !            74:  * added reset/abort code.
        !            75:  *
        !            76:  * Revision 0.2  1995/06/29  03:19:43  root
        !            77:  * fixed biosparam.
        !            78:  * added queue protocol.
        !            79:  *
        !            80:  * Revision 0.1  1995/06/25  01:56:13  root
        !            81:  * Initial release.
        !            82:  *
        !            83:  */
        !            84: 
        !            85: #ifndef _QLOGICISP_H
        !            86: #define _QLOGICISP_H
        !            87: 
        !            88: /*
        !            89:  * With the qlogic interface, every queue slot can hold a SCSI
        !            90:  * command with up to 4 scatter/gather entries.  If we need more
        !            91:  * than 4 entries, continuation entries can be used that hold
        !            92:  * another 7 entries each.  Unlike for other drivers, this means
        !            93:  * that the maximum number of scatter/gather entries we can
        !            94:  * support at any given time is a function of the number of queue
        !            95:  * slots available.  That is, host->can_queue and host->sg_tablesize
        !            96:  * are dynamic and _not_ independent.  This all works fine because
        !            97:  * requests are queued serially and the scatter/gather limit is
        !            98:  * determined for each queue request anew.
        !            99:  */
        !           100: #define QLOGICISP_REQ_QUEUE_LEN        63      /* must be power of two - 1 */
        !           101: #define QLOGICISP_MAX_SG(ql)   (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
        !           102: 
        !           103: int isp1020_detect(Scsi_Host_Template *);
        !           104: int isp1020_release(struct Scsi_Host *);
        !           105: const char * isp1020_info(struct Scsi_Host *);
        !           106: int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
        !           107: int isp1020_abort(Scsi_Cmnd *);
        !           108: int isp1020_reset(Scsi_Cmnd *, unsigned int);
        !           109: int isp1020_biosparam(Disk *, kdev_t, int[]);
        !           110: 
        !           111: #ifndef NULL
        !           112: #define NULL (0)
        !           113: #endif
        !           114: 
        !           115: extern struct proc_dir_entry proc_scsi_isp1020;
        !           116: 
        !           117: #define QLOGICISP {                                                       \
        !           118:        /* next */              NULL,                                      \
        !           119:        /* usage_count */       NULL,                                      \
        !           120:        /* proc dir */          NULL,                                      \
        !           121:        /* procfs info */       NULL,                                      \
        !           122:        /* name */              NULL,                                      \
        !           123:        /* detect */            isp1020_detect,                            \
        !           124:        /* release */           isp1020_release,                           \
        !           125:        /* info */              isp1020_info,                              \
        !           126:        /* command */           NULL,                                      \
        !           127:        /* queuecommand */      isp1020_queuecommand,                      \
        !           128:        /* abort */             isp1020_abort,                             \
        !           129:        /* reset */             isp1020_reset,                             \
        !           130:        /* slave_attach */      NULL,                                      \
        !           131:        /* bios_param */        isp1020_biosparam,                         \
        !           132:        /* can_queue */         QLOGICISP_REQ_QUEUE_LEN,                   \
        !           133:        /* this_id */           -1,                                        \
        !           134:        /* sg_tablesize */      QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
        !           135:        /* cmd_per_lun */       1,                                         \
        !           136:        /* present */           0,                                         \
        !           137:        /* unchecked_isa_dma */ 0,                                         \
        !           138:        /* use_clustering */    DISABLE_CLUSTERING                         \
        !           139: }
        !           140: 
        !           141: #endif /* _QLOGICISP_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.