vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / cdcm / cdcmLynxDefs.h
blob329f187445f742af9840814dc3ae3394d473c251
1 /**
2 * @file cdcmLynxDefs.h
4 * @brief Everything is comming from the LynxOS header files.
6 * @author Georgievskiy Yury, Alain Gagnaire. CERN AB/CO.
8 * @date Created on 01/06/2006
10 * Taken purely from the LynxOS.
11 * Many thanks to Julian Lewis and Nicolas de Metz-Noblat.
13 * @version $Id: cdcmLynxDefs.h,v 1.3 2009/01/09 10:26:03 ygeorgie Exp $
15 #ifndef _CDCM_LYNX_DEFINITIONS_H_INCLUDE_
16 #define _CDCM_LYNX_DEFINITIONS_H_INCLUDE_
18 /*------------------------ from LynxOS pci_resource.h -----------------------*/
21 * PCI bus layer ID
24 #define PCI_BUSLAYER 1
27 * PCI resource ID's
30 /* Resource ID to perform IO on specific pci register */
32 #define PCI_RESID_REGS 1
34 /* Resource ID to get pci bus_no, device_no or function number */
36 #define PCI_RESID_BUSNO 2
37 #define PCI_RESID_DEVNO 3
38 #define PCI_RESID_FUNCNO 4
40 /* Resource id to perform IO on some pci configuration space fields */
42 #define PCI_RESID_DEVID 5
43 #define PCI_RESID_VENDORID 6
44 #define PCI_RESID_CMDREG 7
45 #define PCI_RESID_REVID 8
46 #define PCI_RESID_STAT 9
47 #define PCI_RESID_CLASSCODE 16
48 #define PCI_RESID_SUBSYSID 17
49 #define PCI_RESID_SUBSYSVID 18
51 /* Resource ID's for PCI Base address registers (BAR) */
53 #define PCI_RESID_BAR0 10
54 #define PCI_RESID_BAR1 11
55 #define PCI_RESID_BAR2 12
56 #define PCI_RESID_BAR3 13
57 #define PCI_RESID_BAR4 14
58 #define PCI_RESID_BAR5 15
60 /* Geographic Property of a PCI devices */
61 struct pci_geoprop {
62 int device_no; /* Device number */
63 int func_no; /* Function Number */
65 /*------------------------ LynxOS pci_resource.h ends -----------------------*/
67 /*------------------------ from LynxOS drm_errno.h --------------------------*/
69 /* This is a status which indicates no error */
71 #define DRM_OK 0
72 #define DRM_ERRBASE 1000
74 /* All the errno definitions for DRM */
76 #define DRM_ENOMEM DRM_ERRBASE+1
77 #define DRM_ESYSCTLADD DRM_ERRBASE+2
78 #define DRM_ENOLAYERINIT DRM_ERRBASE+3
79 #define DRM_ENODETYPE DRM_ERRBASE+4
80 #define DRM_EFAULT DRM_ERRBASE+5
81 #define DRM_ENODEV DRM_ERRBASE+6
82 #define DRM_EINVALID DRM_ERRBASE+7
83 #define DRM_EBADSTATE DRM_ERRBASE+8
84 #define DRM_EBADTYPE DRM_ERRBASE+9
85 #define DRM_ENOTSUP DRM_ERRBASE+10
86 #define DRM_EBUSY DRM_ERRBASE+11
87 #define DRM_EEXIST DRM_ERRBASE+12
88 #define DRM_EMEMMAP DRM_ERRBASE+13
89 #define DRM_EMEMUNMAP DRM_ERRBASE+14
90 #define DRM_EIO DRM_ERRBASE+15
91 #define DRM_EMAXPCILEVEL DRM_ERRBASE+16
92 #define DRM_ECONFIG_PCIBUSNO DRM_ERRBASE+17
93 #define DRM_EALLOC_PCIBUSNO DRM_ERRBASE+18
94 #define DRM_EALLOC_PCIIO DRM_ERRBASE+19
95 #define DRM_EALLOC_PCIMEM DRM_ERRBASE+20
96 #define DRM_EALLOC_PCIMEM64 DRM_ERRBASE+21
97 #define DRM_EALLOC_PCIMEMPF DRM_ERRBASE+22
98 #define DRM_EBUSNO DRM_ERRBASE+23
99 /*------------------------ LynxOS drm_errno.h ends --------------------------*/
101 /*------------------------ form LynxOS kernel.h -----------------------------*/
102 /* System semaphore constants */
103 #define SEM_SIGIGNORE -1
104 #define SEM_SIGRETRY 0
105 #define SEM_SIGABORT 1
106 #define SEM_SIGFADA 17 /* Non-Posix constant for fast_ada support */
108 /* tswait return values */
109 #define TSWAIT_ABORTED -1
110 #define TSWAIT_OK 0
111 #define TSWAIT_TIMEDOUT 1
112 #define TSWAIT_NOTOUTS 2
113 /*------------------------ LynxOS kernel.h ends -----------------------------*/
114 #endif /* _CDCM_LYNX_DEFINITIONS_H_INCLUDE_ */