Annotation of Gnu-Mach/linux/src/drivers/scsi/dc390.h, revision 1.1.1.1

1.1       root        1: /***********************************************************************
                      2:  *     FILE NAME : DC390.H                                            *
                      3:  *          BY   : C.L. Huang                                         *
                      4:  *     Description: Device Driver for Tekram DC-390(T) PCI SCSI       *
                      5:  *                  Bus Master Host Adapter                           *
                      6:  ***********************************************************************/
                      7: 
                      8: /* Kernel version autodetection */
                      9: 
                     10: #include <linux/version.h>
                     11: /* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
                     12: #define ASC_LINUX_VERSION(V, P, S)     (((V) * 65536) + ((P) * 256) + (S))
                     13: 
                     14: #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,50)
                     15: #define VERSION_ELF_1_2_13
                     16: #elseif LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,95)
                     17: #define VERSION_1_3_85
                     18: #else
                     19: #define VERSION_2_0_0
                     20: #endif
                     21: 
                     22: /*
                     23:  * AMD 53C974 driver, header file
                     24:  */
                     25: 
                     26: #ifndef DC390_H
                     27: #define DC390_H
                     28: 
                     29: #if defined(HOSTS_C) || defined(MODULE)
                     30: 
                     31: #ifdef VERSION_2_0_0
                     32: #include <scsi/scsicam.h>
                     33: #else
                     34: #include <linux/scsicam.h>
                     35: #endif
                     36: 
                     37: extern int DC390_detect(Scsi_Host_Template *psht);
                     38: extern int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
                     39: extern int DC390_abort(Scsi_Cmnd *cmd);
                     40: 
                     41: #ifdef VERSION_2_0_0
                     42: extern int DC390_reset(Scsi_Cmnd *cmd, unsigned int resetFlags);
                     43: #else
                     44: extern int DC390_reset(Scsi_Cmnd *cmd);
                     45: #endif
                     46: 
                     47: #ifdef VERSION_ELF_1_2_13
                     48: extern int DC390_bios_param(Disk *disk, int devno, int geom[]);
                     49: #else
                     50: extern int DC390_bios_param(Disk *disk, kdev_t devno, int geom[]);
                     51: #endif
                     52: 
                     53: #ifdef MODULE
                     54: static int DC390_release(struct Scsi_Host *);
                     55: #else
                     56: #define DC390_release NULL
                     57: #endif
                     58: 
                     59: #ifndef VERSION_ELF_1_2_13
                     60: extern struct proc_dir_entry proc_scsi_tmscsim;
                     61: extern int tmscsim_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout);
                     62: #endif
                     63: 
                     64: #ifdef VERSION_2_0_0
                     65: 
                     66: #define DC390_T    {                   \
                     67:        NULL,   /* *next */             \
                     68:        NULL,   /* *usage_count */      \
                     69:        &proc_scsi_tmscsim,     /* *proc_dir */         \
                     70:        tmscsim_proc_info,      /* (*proc_info)() */    \
                     71:        "Tekram DC390(T) V1.11 Feb-05-1997",  /* *name */ \
                     72:        DC390_detect,                   \
                     73:        DC390_release,  /* (*release)() */      \
                     74:        NULL,   /* *(*info)() */        \
                     75:        NULL,   /* (*command)() */      \
                     76:        DC390_queue_command,    \
                     77:        DC390_abort,            \
                     78:        DC390_reset,            \
                     79:        NULL, /* slave attach */\
                     80:        DC390_bios_param,       \
                     81:        10,/* can queue(-1) */  \
                     82:        7, /* id(-1) */         \
                     83:        SG_ALL,                 \
                     84:        2, /* cmd per lun(2) */ \
                     85:        0, /* present */        \
                     86:        0, /* unchecked isa dma */ \
                     87:        DISABLE_CLUSTERING      \
                     88:        }
                     89: #endif
                     90: 
                     91: 
                     92: #ifdef VERSION_1_3_85
                     93: 
                     94: #define DC390_T    {                   \
                     95:        NULL,   /* *next */             \
                     96:        NULL,   /* *usage_count */      \
                     97:        &proc_scsi_tmscsim,     /* *proc_dir */         \
                     98:        tmscsim_proc_info,      /* (*proc_info)() */    \
                     99:        "Tekram DC390(T) V1.11 Feb-05-1997",  /* *name */ \
                    100:        DC390_detect,                   \
                    101:        DC390_release,  /* (*release)() */      \
                    102:        NULL,   /* *(*info)() */        \
                    103:        NULL,   /* (*command)() */      \
                    104:        DC390_queue_command,    \
                    105:        DC390_abort,            \
                    106:        DC390_reset,            \
                    107:        NULL, /* slave attach */\
                    108:        DC390_bios_param,       \
                    109:        10,/* can queue(-1) */  \
                    110:        7, /* id(-1) */         \
                    111:        SG_ALL,                 \
                    112:        2, /* cmd per lun(2) */ \
                    113:        0, /* present */        \
                    114:        0, /* unchecked isa dma */ \
                    115:        DISABLE_CLUSTERING      \
                    116:        }
                    117: #endif
                    118: 
                    119: 
                    120: #ifdef VERSION_ELF_1_2_13
                    121: 
                    122: #define DC390_T     {          \
                    123:        NULL,                   \
                    124:        NULL,                   \
                    125:        "Tekram DC390(T) V1.11 Feb-05-1997",\
                    126:        DC390_detect,           \
                    127:        DC390_release,                  \
                    128:        NULL, /* info */        \
                    129:        NULL, /* command, deprecated */ \
                    130:        DC390_queue_command,    \
                    131:        DC390_abort,            \
                    132:        DC390_reset,            \
                    133:        NULL, /* slave attach */\
                    134:        DC390_bios_param,       \
                    135:        10,/* can queue(-1) */  \
                    136:        7, /* id(-1) */         \
                    137:        16,/* old (SG_ALL) */   \
                    138:        2, /* cmd per lun(2) */ \
                    139:        0, /* present */        \
                    140:        0, /* unchecked isa dma */ \
                    141:        DISABLE_CLUSTERING      \
                    142:        }
                    143: #endif
                    144: 
                    145: #endif /* defined(HOSTS_C) || defined(MODULE) */
                    146: 
                    147: #endif /* DC390_H */

unix.superglobalmegacorp.com

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