0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _ORADAX_H
0011 #define _ORADAX_H
0012
0013 #include <linux/types.h>
0014
0015 #define CCB_KILL 0
0016 #define CCB_INFO 1
0017 #define CCB_DEQUEUE 2
0018
0019 struct dax_command {
0020 __u16 command;
0021 __u16 ca_offset;
0022 };
0023
0024 struct ccb_kill_result {
0025 __u16 action;
0026 };
0027
0028 struct ccb_info_result {
0029 __u16 state;
0030 __u16 inst_num;
0031 __u16 q_num;
0032 __u16 q_pos;
0033 };
0034
0035 struct ccb_exec_result {
0036 __u64 status_data;
0037 __u32 status;
0038 };
0039
0040 union ccb_result {
0041 struct ccb_exec_result exec;
0042 struct ccb_info_result info;
0043 struct ccb_kill_result kill;
0044 };
0045
0046 #define DAX_MMAP_LEN (16 * 1024)
0047 #define DAX_MAX_CCBS 15
0048 #define DAX_CCB_BUF_MAXLEN (DAX_MAX_CCBS * 64)
0049 #define DAX_NAME "oradax"
0050
0051
0052 #define DAX_SUBMIT_OK 0
0053 #define DAX_SUBMIT_ERR_RETRY 1
0054 #define DAX_SUBMIT_ERR_WOULDBLOCK 2
0055 #define DAX_SUBMIT_ERR_BUSY 3
0056 #define DAX_SUBMIT_ERR_THR_INIT 4
0057 #define DAX_SUBMIT_ERR_ARG_INVAL 5
0058 #define DAX_SUBMIT_ERR_CCB_INVAL 6
0059 #define DAX_SUBMIT_ERR_NO_CA_AVAIL 7
0060 #define DAX_SUBMIT_ERR_CCB_ARR_MMU_MISS 8
0061 #define DAX_SUBMIT_ERR_NOMAP 9
0062 #define DAX_SUBMIT_ERR_NOACCESS 10
0063 #define DAX_SUBMIT_ERR_TOOMANY 11
0064 #define DAX_SUBMIT_ERR_UNAVAIL 12
0065 #define DAX_SUBMIT_ERR_INTERNAL 13
0066
0067
0068 #define DAX_CCB_COMPLETED 0
0069 #define DAX_CCB_ENQUEUED 1
0070 #define DAX_CCB_INPROGRESS 2
0071 #define DAX_CCB_NOTFOUND 3
0072
0073
0074 #define DAX_KILL_COMPLETED 0
0075 #define DAX_KILL_DEQUEUED 1
0076 #define DAX_KILL_KILLED 2
0077 #define DAX_KILL_NOTFOUND 3
0078
0079 #endif