File: /usr/src/linux/drivers/scsi/ultrastor.h

1     /*
2      *	ultrastor.c	(C) 1991 David B. Gentzel
3      *	Low-level scsi driver for UltraStor 14F
4      *	by David B. Gentzel, Whitfield Software Services, Carnegie, PA
5      *	    (gentzel@nova.enet.dec.com)
6      *  scatter/gather added by Scott Taylor (n217cg@tamuts.tamu.edu)
7      *  24F support by John F. Carr (jfc@athena.mit.edu)
8      *    John's work modified by Caleb Epstein (cae@jpmorgan.com) and 
9      *    Eric Youngdale (eric@tantalus.nrl.navy.mil).
10      *	Thanks to UltraStor for providing the necessary documentation
11      */
12     
13     #ifndef _ULTRASTOR_H
14     #define _ULTRASTOR_H
15     #include <linux/kdev_t.h>
16     
17     int ultrastor_detect(Scsi_Host_Template *);
18     const char *ultrastor_info(struct Scsi_Host * shpnt);
19     int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
20     int ultrastor_abort(Scsi_Cmnd *);
21     int ultrastor_reset(Scsi_Cmnd *, unsigned int);
22     int ultrastor_biosparam(Disk *, kdev_t, int *);
23     
24     
25     #define ULTRASTOR_14F_MAX_SG 16
26     #define ULTRASTOR_24F_MAX_SG 33
27     
28     #define ULTRASTOR_MAX_CMDS_PER_LUN 5
29     #define ULTRASTOR_MAX_CMDS 16
30     
31     #define ULTRASTOR_24F_PORT 0xC80
32     
33     
34     #define ULTRASTOR_14F {   name:              "UltraStor 14F/24F/34F", 	\
35     			  detect:            ultrastor_detect, 		\
36     			  info:              ultrastor_info, 		\
37     			  queuecommand:      ultrastor_queuecommand,	\
38     			  abort:             ultrastor_abort, 		\
39     			  reset:             ultrastor_reset,		\
40     			  bios_param:        ultrastor_biosparam, 	\
41     			  can_queue:         ULTRASTOR_MAX_CMDS,	\
42     			  this_id:           0, 			\
43     			  sg_tablesize:      ULTRASTOR_14F_MAX_SG, 	\
44     			  cmd_per_lun:       ULTRASTOR_MAX_CMDS_PER_LUN,\
45     			  unchecked_isa_dma: 1, 			\
46     			  use_clustering:    ENABLE_CLUSTERING }
47     
48     
49     #ifdef ULTRASTOR_PRIVATE
50     
51     #define UD_ABORT	0x0001
52     #define UD_COMMAND	0x0002
53     #define UD_DETECT	0x0004
54     #define UD_INTERRUPT	0x0008
55     #define UD_RESET	0x0010
56     #define UD_MULTI_CMD	0x0020
57     #define UD_CSIR		0x0040
58     #define UD_ERROR	0x0080
59     
60     /* #define PORT_OVERRIDE 0x330 */
61     
62     /* Values for the PRODUCT_ID ports for the 14F */
63     #define US14F_PRODUCT_ID_0 0x56
64     #define US14F_PRODUCT_ID_1 0x40		/* NOTE: Only upper nibble is used */
65     
66     #define US24F_PRODUCT_ID_0 0x56
67     #define US24F_PRODUCT_ID_1 0x63
68     #define US24F_PRODUCT_ID_2 0x02
69     
70     /* Subversion values */
71     #define U14F 0
72     #define U34F 1
73     
74     /* MSCP field values */
75     
76     /* Opcode */
77     #define OP_HOST_ADAPTER 0x1
78     #define OP_SCSI 0x2
79     #define OP_RESET 0x4
80     
81     /* Date Transfer Direction */
82     #define DTD_SCSI 0x0
83     #define DTD_IN 0x1
84     #define DTD_OUT 0x2
85     #define DTD_NONE 0x3
86     
87     /* Host Adapter command subcodes */
88     #define HA_CMD_INQUIRY 0x1
89     #define HA_CMD_SELF_DIAG 0x2
90     #define HA_CMD_READ_BUFF 0x3
91     #define HA_CMD_WRITE_BUFF 0x4
92     
93     #endif
94     
95     #endif
96