Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]

Diff markup

Differences between /linux/include/linux/kernelcapi.h (Version 2.6.31.13) and /linux/include/linux/kernelcapi.h (Version 2.6.11.8)


  1 /*                                                  1 /*
  2  * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:3      2  * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
  3  *                                                  3  * 
  4  * Kernel CAPI 2.0 Interface for Linux              4  * Kernel CAPI 2.0 Interface for Linux
  5  *                                                  5  * 
  6  * (c) Copyright 1997 by Carsten Paeth (calle@      6  * (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
  7  *                                                  7  * 
  8  */                                                 8  */
  9                                                     9 
 10 #ifndef __KERNELCAPI_H__                           10 #ifndef __KERNELCAPI_H__
 11 #define __KERNELCAPI_H__                           11 #define __KERNELCAPI_H__
 12                                                    12 
 13 #define CAPI_MAXAPPL    240     /* maximum num     13 #define CAPI_MAXAPPL    240     /* maximum number of applications  */
 14 #define CAPI_MAXCONTR   32      /* maximum num     14 #define CAPI_MAXCONTR   32      /* maximum number of controller    */
 15 #define CAPI_MAXDATAWINDOW      8                  15 #define CAPI_MAXDATAWINDOW      8
 16                                                    16 
 17                                                    17 
 18 typedef struct kcapi_flagdef {                     18 typedef struct kcapi_flagdef {
 19         int contr;                                 19         int contr;
 20         int flag;                                  20         int flag;
 21 } kcapi_flagdef;                                   21 } kcapi_flagdef;
 22                                                    22 
 23 typedef struct kcapi_carddef {                     23 typedef struct kcapi_carddef {
 24         char            driver[32];                24         char            driver[32];
 25         unsigned int    port;                      25         unsigned int    port;
 26         unsigned        irq;                       26         unsigned        irq;
 27         unsigned int    membase;                   27         unsigned int    membase;
 28         int             cardnr;                    28         int             cardnr;
 29 } kcapi_carddef;                                   29 } kcapi_carddef;
 30                                                    30 
 31 /* new ioctls >= 10 */                             31 /* new ioctls >= 10 */
 32 #define KCAPI_CMD_TRACE         10                 32 #define KCAPI_CMD_TRACE         10
 33 #define KCAPI_CMD_ADDCARD       11      /* OBS     33 #define KCAPI_CMD_ADDCARD       11      /* OBSOLETE */
 34                                                    34 
 35 /*                                                 35 /* 
 36  * flag > 2 => trace also data                     36  * flag > 2 => trace also data
 37  * flag & 1 => show trace                          37  * flag & 1 => show trace
 38  */                                                38  */
 39 #define KCAPI_TRACE_OFF                 0          39 #define KCAPI_TRACE_OFF                 0
 40 #define KCAPI_TRACE_SHORT_NO_DATA       1          40 #define KCAPI_TRACE_SHORT_NO_DATA       1
 41 #define KCAPI_TRACE_FULL_NO_DATA        2          41 #define KCAPI_TRACE_FULL_NO_DATA        2
 42 #define KCAPI_TRACE_SHORT               3          42 #define KCAPI_TRACE_SHORT               3
 43 #define KCAPI_TRACE_FULL                4          43 #define KCAPI_TRACE_FULL                4
 44                                                    44 
 45                                                    45 
 46 #ifdef __KERNEL__                                  46 #ifdef __KERNEL__
 47                                                    47 
 48 #include <linux/list.h>                            48 #include <linux/list.h>
 49 #include <linux/skbuff.h>                          49 #include <linux/skbuff.h>
 50 #include <linux/workqueue.h>                   << 
 51                                                    50 
 52 #define KCI_CONTRUP     0       /* arg: struct     51 #define KCI_CONTRUP     0       /* arg: struct capi_profile */
 53 #define KCI_CONTRDOWN   1       /* arg: NULL *     52 #define KCI_CONTRDOWN   1       /* arg: NULL */
 54                                                    53 
 55 struct capi20_appl {                               54 struct capi20_appl {
 56         u16 applid;                                55         u16 applid;
 57         capi_register_params rparam;               56         capi_register_params rparam;
 58         void (*recv_message)(struct capi20_app     57         void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb);
 59         void *private;                             58         void *private;
 60                                                    59 
 61         /* internal to kernelcapi.o */             60         /* internal to kernelcapi.o */
 62         unsigned long nrecvctlpkt;                 61         unsigned long nrecvctlpkt;
 63         unsigned long nrecvdatapkt;                62         unsigned long nrecvdatapkt;
 64         unsigned long nsentctlpkt;                 63         unsigned long nsentctlpkt;
 65         unsigned long nsentdatapkt;                64         unsigned long nsentdatapkt;
 66         struct mutex recv_mtx;                 !!  65         struct semaphore recv_sem;
 67         struct sk_buff_head recv_queue;            66         struct sk_buff_head recv_queue;
 68         struct work_struct recv_work;              67         struct work_struct recv_work;
 69         int release_in_progress;                   68         int release_in_progress;
 70                                                    69 
 71         /* ugly hack to allow for notification     70         /* ugly hack to allow for notification of added/removed
 72          * controllers. The Right Way (tm) is      71          * controllers. The Right Way (tm) is known. XXX
 73          */                                        72          */
 74         void (*callback) (unsigned int cmd, __     73         void (*callback) (unsigned int cmd, __u32 contr, void *data);
 75 };                                                 74 };
 76                                                    75 
 77 u16 capi20_isinstalled(void);                      76 u16 capi20_isinstalled(void);
 78 u16 capi20_register(struct capi20_appl *ap);       77 u16 capi20_register(struct capi20_appl *ap);
 79 u16 capi20_release(struct capi20_appl *ap);        78 u16 capi20_release(struct capi20_appl *ap);
 80 u16 capi20_put_message(struct capi20_appl *ap,     79 u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
 81 u16 capi20_get_manufacturer(u32 contr, u8 buf[     80 u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
 82 u16 capi20_get_version(u32 contr, struct capi_     81 u16 capi20_get_version(u32 contr, struct capi_version *verp);
 83 u16 capi20_get_serial(u32 contr, u8 serial[CAP     82 u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
 84 u16 capi20_get_profile(u32 contr, struct capi_     83 u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
 85 int capi20_manufacturer(unsigned int cmd, void     84 int capi20_manufacturer(unsigned int cmd, void __user *data);
 86                                                    85 
 87 /* temporary hack XXX */                           86 /* temporary hack XXX */
 88 void capi20_set_callback(struct capi20_appl *a     87 void capi20_set_callback(struct capi20_appl *ap, 
 89                          void (*callback) (uns     88                          void (*callback) (unsigned int cmd, __u32 contr, void *data));
 90                                                    89 
 91                                                    90 
 92                                                    91 
 93 #define CAPI_NOERROR                      0x00     92 #define CAPI_NOERROR                      0x0000
 94                                                    93 
 95 #define CAPI_TOOMANYAPPLS                 0x10     94 #define CAPI_TOOMANYAPPLS                 0x1001
 96 #define CAPI_LOGBLKSIZETOSMALL            0x10     95 #define CAPI_LOGBLKSIZETOSMALL            0x1002
 97 #define CAPI_BUFFEXECEEDS64K              0x10     96 #define CAPI_BUFFEXECEEDS64K              0x1003
 98 #define CAPI_MSGBUFSIZETOOSMALL           0x10     97 #define CAPI_MSGBUFSIZETOOSMALL           0x1004
 99 #define CAPI_ANZLOGCONNNOTSUPPORTED       0x10     98 #define CAPI_ANZLOGCONNNOTSUPPORTED       0x1005
100 #define CAPI_REGRESERVED                  0x10     99 #define CAPI_REGRESERVED                  0x1006
101 #define CAPI_REGBUSY                      0x10    100 #define CAPI_REGBUSY                      0x1007
102 #define CAPI_REGOSRESOURCEERR             0x10    101 #define CAPI_REGOSRESOURCEERR             0x1008
103 #define CAPI_REGNOTINSTALLED              0x10    102 #define CAPI_REGNOTINSTALLED              0x1009
104 #define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP  0x10    103 #define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP  0x100a
105 #define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x10    104 #define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x100b
106                                                   105 
107 #define CAPI_ILLAPPNR                     0x11    106 #define CAPI_ILLAPPNR                     0x1101
108 #define CAPI_ILLCMDORSUBCMDORMSGTOSMALL   0x11    107 #define CAPI_ILLCMDORSUBCMDORMSGTOSMALL   0x1102
109 #define CAPI_SENDQUEUEFULL                0x11    108 #define CAPI_SENDQUEUEFULL                0x1103
110 #define CAPI_RECEIVEQUEUEEMPTY            0x11    109 #define CAPI_RECEIVEQUEUEEMPTY            0x1104
111 #define CAPI_RECEIVEOVERFLOW              0x11    110 #define CAPI_RECEIVEOVERFLOW              0x1105
112 #define CAPI_UNKNOWNNOTPAR                0x11    111 #define CAPI_UNKNOWNNOTPAR                0x1106
113 #define CAPI_MSGBUSY                      0x11    112 #define CAPI_MSGBUSY                      0x1107
114 #define CAPI_MSGOSRESOURCEERR             0x11    113 #define CAPI_MSGOSRESOURCEERR             0x1108
115 #define CAPI_MSGNOTINSTALLED              0x11    114 #define CAPI_MSGNOTINSTALLED              0x1109
116 #define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP  0x11    115 #define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP  0x110a
117 #define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x11    116 #define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b
118                                                   117 
119 typedef enum {                                    118 typedef enum {
120         CapiMessageNotSupportedInCurrentState     119         CapiMessageNotSupportedInCurrentState = 0x2001,
121         CapiIllContrPlciNcci                      120         CapiIllContrPlciNcci                  = 0x2002,
122         CapiNoPlciAvailable                       121         CapiNoPlciAvailable                   = 0x2003,
123         CapiNoNcciAvailable                       122         CapiNoNcciAvailable                   = 0x2004,
124         CapiNoListenResourcesAvailable            123         CapiNoListenResourcesAvailable        = 0x2005,
125         CapiNoFaxResourcesAvailable               124         CapiNoFaxResourcesAvailable           = 0x2006,
126         CapiIllMessageParmCoding                  125         CapiIllMessageParmCoding              = 0x2007,
127 } RESOURCE_CODING_PROBLEM;                        126 } RESOURCE_CODING_PROBLEM;
128                                                   127 
129 typedef enum {                                    128 typedef enum {
130         CapiB1ProtocolNotSupported                129         CapiB1ProtocolNotSupported                      = 0x3001,
131         CapiB2ProtocolNotSupported                130         CapiB2ProtocolNotSupported                      = 0x3002,
132         CapiB3ProtocolNotSupported                131         CapiB3ProtocolNotSupported                      = 0x3003,
133         CapiB1ProtocolParameterNotSupported       132         CapiB1ProtocolParameterNotSupported             = 0x3004,
134         CapiB2ProtocolParameterNotSupported       133         CapiB2ProtocolParameterNotSupported             = 0x3005,
135         CapiB3ProtocolParameterNotSupported       134         CapiB3ProtocolParameterNotSupported             = 0x3006,
136         CapiBProtocolCombinationNotSupported      135         CapiBProtocolCombinationNotSupported            = 0x3007,
137         CapiNcpiNotSupported                      136         CapiNcpiNotSupported                            = 0x3008,
138         CapiCipValueUnknown                       137         CapiCipValueUnknown                             = 0x3009,
139         CapiFlagsNotSupported                     138         CapiFlagsNotSupported                           = 0x300a,
140         CapiFacilityNotSupported                  139         CapiFacilityNotSupported                        = 0x300b,
141         CapiDataLengthNotSupportedByCurrentPro    140         CapiDataLengthNotSupportedByCurrentProtocol     = 0x300c,
142         CapiResetProcedureNotSupportedByCurren    141         CapiResetProcedureNotSupportedByCurrentProtocol = 0x300d,
143         CapiTeiAssignmentFailed                   142         CapiTeiAssignmentFailed                         = 0x300e,
144 } REQUESTED_SERVICES_PROBLEM;                     143 } REQUESTED_SERVICES_PROBLEM;
145                                                   144 
146 typedef enum {                                    145 typedef enum {
147         CapiSuccess                               146         CapiSuccess                                     = 0x0000,
148         CapiSupplementaryServiceNotSupported      147         CapiSupplementaryServiceNotSupported            = 0x300e,
149         CapiRequestNotAllowedInThisState          148         CapiRequestNotAllowedInThisState                = 0x3010,
150 } SUPPLEMENTARY_SERVICE_INFO;                     149 } SUPPLEMENTARY_SERVICE_INFO;
151                                                   150 
152 typedef enum {                                    151 typedef enum {
153         CapiProtocolErrorLayer1                   152         CapiProtocolErrorLayer1                         = 0x3301,
154         CapiProtocolErrorLayer2                   153         CapiProtocolErrorLayer2                         = 0x3302,
155         CapiProtocolErrorLayer3                   154         CapiProtocolErrorLayer3                         = 0x3303,
156         CapiTimeOut                               155         CapiTimeOut                                     = 0x3303, // SuppServiceReason
157         CapiCallGivenToOtherApplication           156         CapiCallGivenToOtherApplication                 = 0x3304,
158 } CAPI_REASON;                                    157 } CAPI_REASON;
159                                                   158 
160 #endif                          /* __KERNEL__     159 #endif                          /* __KERNEL__ */
161                                                   160 
162 #endif                          /* __KERNELCAP    161 #endif                          /* __KERNELCAPI_H__ */
163                                                   162 
  This page was automatically generated by the LXR engine.