1
2
3
4
5
6
7
8
9 #ifndef _ULTRASTOR_H
10 #define _ULTRASTOR_H
11
12
13 #ifndef TRUE
14 # define TRUE 1
15 #endif
16 #ifndef FALSE
17 # define FALSE 0
18 #endif
19
20
21
22
23
24 int ultrastor_14f_detect(int);
25 const char *ultrastor_14f_info(void);
26 int ultrastor_14f_queuecommand(unsigned char target, const void *cmnd,
27 void *buff, int bufflen,
28 void (*done)(int, int));
29 #ifdef NO_QUEUEING
30 int ultrastor_14f_command(unsigned char target, const void *cmnd,
31 void *buff, int bufflen);
32 #endif
33 int ultrastor_14f_abort(int);
34 int ultrastor_14f_reset(void);
35
36 #ifndef NO_QUEUEING
37 #define ULTRASTOR_14F \
38 { "UltraStor 14F", ultrastor_14f_detect, ultrastor_14f_info, 0, \
39 ultrastor_14f_queuecommand, ultrastor_14f_abort, ultrastor_14f_reset, \
40 1, 0, 0 }
41
42 #else
43 #define ULTRASTOR_14F \
44 { "UltraStor 14F", ultrastor_14f_detect, ultrastor_14f_info, \
45 ultrastor_14f_command, 0, ultrastor_14f_abort, ultrastor_14f_reset, \
46 0, 0, 0 }
47 #endif
48
49 #define UD_ABORT 0x0001
50 #define UD_COMMAND 0x0002
51 #define UD_DETECT 0x0004
52 #define UD_INTERRUPT 0x0008
53 #define UD_RESET 0x0010
54
55 #ifdef ULTRASTOR_PRIVATE
56
57
58
59
60 #define LCL_DOORBELL_MASK(port) ((port) + 0x0)
61 #define LCL_DOORBELL_INTR(port) ((port) + 0x1)
62 #define SYS_DOORBELL_MASK(port) ((port) + 0x2)
63 #define SYS_DOORBELL_INTR(port) ((port) + 0x3)
64 #define PRODUCT_ID(port) ((port) + 0x4)
65 #define CONFIG(port) ((port) + 0x6)
66 #define OGM_DATA_PTR(port) ((port) + 0x8)
67 #define ICM_DATA_PTR(port) ((port) + 0xC)
68
69
70 #define US14F_PRODUCT_ID_0 0x56
71 #define US14F_PRODUCT_ID_1 0x40
72
73
74
75
76 #define OP_HOST_ADAPTER 0x1
77 #define OP_SCSI 0x2
78 #define OP_RESET 0x4
79
80
81 #define DTD_SCSI 0x0
82 #define DTD_IN 0x1
83 #define DTD_OUT 0x2
84 #define DTD_NONE 0x3
85
86
87 #define HA_CMD_INQUIRY 0x1
88 #define HA_CMD_SELF_DIAG 0x2
89 #define HA_CMD_READ_BUFF 0x3
90 #define HA_CMD_WRITE_BUFF 0x4
91
92 #endif
93
94 #endif