1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 #ifndef _ORADAX_H
  11 #define _ORADAX_H
  12 
  13 #include <linux/types.h>
  14 
  15 #define CCB_KILL 0
  16 #define CCB_INFO 1
  17 #define CCB_DEQUEUE 2
  18 
  19 struct dax_command {
  20         __u16 command;          
  21         __u16 ca_offset;        
  22 };
  23 
  24 struct ccb_kill_result {
  25         __u16 action;           
  26 };
  27 
  28 struct ccb_info_result {
  29         __u16 state;            
  30         __u16 inst_num;         
  31         __u16 q_num;            
  32         __u16 q_pos;            
  33 };
  34 
  35 struct ccb_exec_result {
  36         __u64   status_data;    
  37         __u32   status;         
  38 };
  39 
  40 union ccb_result {
  41         struct ccb_exec_result exec;
  42         struct ccb_info_result info;
  43         struct ccb_kill_result kill;
  44 };
  45 
  46 #define DAX_MMAP_LEN            (16 * 1024)
  47 #define DAX_MAX_CCBS            15
  48 #define DAX_CCB_BUF_MAXLEN      (DAX_MAX_CCBS * 64)
  49 #define DAX_NAME                "oradax"
  50 
  51 
  52 #define DAX_SUBMIT_OK                   0
  53 #define DAX_SUBMIT_ERR_RETRY            1
  54 #define DAX_SUBMIT_ERR_WOULDBLOCK       2
  55 #define DAX_SUBMIT_ERR_BUSY             3
  56 #define DAX_SUBMIT_ERR_THR_INIT         4
  57 #define DAX_SUBMIT_ERR_ARG_INVAL        5
  58 #define DAX_SUBMIT_ERR_CCB_INVAL        6
  59 #define DAX_SUBMIT_ERR_NO_CA_AVAIL      7
  60 #define DAX_SUBMIT_ERR_CCB_ARR_MMU_MISS 8
  61 #define DAX_SUBMIT_ERR_NOMAP            9
  62 #define DAX_SUBMIT_ERR_NOACCESS         10
  63 #define DAX_SUBMIT_ERR_TOOMANY          11
  64 #define DAX_SUBMIT_ERR_UNAVAIL          12
  65 #define DAX_SUBMIT_ERR_INTERNAL         13
  66 
  67 
  68 #define DAX_CCB_COMPLETED       0
  69 #define DAX_CCB_ENQUEUED        1
  70 #define DAX_CCB_INPROGRESS      2
  71 #define DAX_CCB_NOTFOUND        3
  72 
  73 
  74 #define DAX_KILL_COMPLETED      0
  75 #define DAX_KILL_DEQUEUED       1
  76 #define DAX_KILL_KILLED         2
  77 #define DAX_KILL_NOTFOUND       3
  78 
  79 #endif