diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 18:27:39 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 18:27:39 -0500 |
| commit | 2fb585a10e421b4eeae066eb99080bd7e4512079 (patch) | |
| tree | b8ca32933de26e9198490acfb5a4df093fdd8ef9 /include/linux | |
| parent | 31aeb6c815549948571eec988ad9728c27d7a68d (diff) | |
| parent | 69f52adb2d534afc41fcc658f155e01f0b322f9e (diff) | |
Merge branch 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6
* 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6: (28 commits)
mISDN: Add HFC USB driver
mISDN: Add layer1 prim MPH_INFORMATION_REQ
mISDN: Fix kernel crash when doing hardware conference with more than two members
mISDN: Added missing create_l1() call
mISDN: Add MODULE_DEVICE_TABLE() to hfcpci
mISDN: Minor cleanups
mISDN: Create /sys/class/mISDN
mISDN: Add missing release functions
mISDN: Add different different timer settings for hfc-pci
mISDN: Minor fixes
mISDN: Correct busy device detection
mISDN: Fix deactivation, if peer IP is removed from l1oip instance.
mISDN: Add ISDN_P_TE_UP0 / ISDN_P_NT_UP0
mISDN: Fix irq detection
mISDN: Add ISDN sample clock API to mISDN core
mISDN: Return error on E-channel access
mISDN: Add E-Channel logging features
mISDN: Use protocol to detect D-channel
mISDN: Fixed more indexing bugs
mISDN: Make debug output a little bit more verbose
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mISDNhw.h | 26 | ||||
| -rw-r--r-- | include/linux/mISDNif.h | 89 |
2 files changed, 89 insertions, 26 deletions
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index e794dfb87504..97ffdc1d3442 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
| @@ -57,20 +57,21 @@ | |||
| 57 | #define FLG_L2DATA 14 /* channel use L2 DATA primitivs */ | 57 | #define FLG_L2DATA 14 /* channel use L2 DATA primitivs */ |
| 58 | #define FLG_ORIGIN 15 /* channel is on origin site */ | 58 | #define FLG_ORIGIN 15 /* channel is on origin site */ |
| 59 | /* channel specific stuff */ | 59 | /* channel specific stuff */ |
| 60 | #define FLG_FILLEMPTY 16 /* fill fifo on first frame (empty) */ | ||
| 60 | /* arcofi specific */ | 61 | /* arcofi specific */ |
| 61 | #define FLG_ARCOFI_TIMER 16 | 62 | #define FLG_ARCOFI_TIMER 17 |
| 62 | #define FLG_ARCOFI_ERROR 17 | 63 | #define FLG_ARCOFI_ERROR 18 |
| 63 | /* isar specific */ | 64 | /* isar specific */ |
| 64 | #define FLG_INITIALIZED 16 | 65 | #define FLG_INITIALIZED 17 |
| 65 | #define FLG_DLEETX 17 | 66 | #define FLG_DLEETX 18 |
| 66 | #define FLG_LASTDLE 18 | 67 | #define FLG_LASTDLE 19 |
| 67 | #define FLG_FIRST 19 | 68 | #define FLG_FIRST 20 |
| 68 | #define FLG_LASTDATA 20 | 69 | #define FLG_LASTDATA 21 |
| 69 | #define FLG_NMD_DATA 21 | 70 | #define FLG_NMD_DATA 22 |
| 70 | #define FLG_FTI_RUN 22 | 71 | #define FLG_FTI_RUN 23 |
| 71 | #define FLG_LL_OK 23 | 72 | #define FLG_LL_OK 24 |
| 72 | #define FLG_LL_CONN 24 | 73 | #define FLG_LL_CONN 25 |
| 73 | #define FLG_DTMFSEND 25 | 74 | #define FLG_DTMFSEND 26 |
| 74 | 75 | ||
| 75 | /* workq events */ | 76 | /* workq events */ |
| 76 | #define FLG_RECVQUEUE 30 | 77 | #define FLG_RECVQUEUE 30 |
| @@ -183,6 +184,7 @@ extern void queue_ch_frame(struct mISDNchannel *, u_int, | |||
| 183 | extern int dchannel_senddata(struct dchannel *, struct sk_buff *); | 184 | extern int dchannel_senddata(struct dchannel *, struct sk_buff *); |
| 184 | extern int bchannel_senddata(struct bchannel *, struct sk_buff *); | 185 | extern int bchannel_senddata(struct bchannel *, struct sk_buff *); |
| 185 | extern void recv_Dchannel(struct dchannel *); | 186 | extern void recv_Dchannel(struct dchannel *); |
| 187 | extern void recv_Echannel(struct dchannel *, struct dchannel *); | ||
| 186 | extern void recv_Bchannel(struct bchannel *); | 188 | extern void recv_Bchannel(struct bchannel *); |
| 187 | extern void recv_Dchannel_skb(struct dchannel *, struct sk_buff *); | 189 | extern void recv_Dchannel_skb(struct dchannel *, struct sk_buff *); |
| 188 | extern void recv_Bchannel_skb(struct bchannel *, struct sk_buff *); | 190 | extern void recv_Bchannel_skb(struct bchannel *, struct sk_buff *); |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 8f2d60da04e7..557477ac3d5b 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
| @@ -36,8 +36,8 @@ | |||
| 36 | * - should be incremented on every checkin | 36 | * - should be incremented on every checkin |
| 37 | */ | 37 | */ |
| 38 | #define MISDN_MAJOR_VERSION 1 | 38 | #define MISDN_MAJOR_VERSION 1 |
| 39 | #define MISDN_MINOR_VERSION 0 | 39 | #define MISDN_MINOR_VERSION 1 |
| 40 | #define MISDN_RELEASE 19 | 40 | #define MISDN_RELEASE 20 |
| 41 | 41 | ||
| 42 | /* primitives for information exchange | 42 | /* primitives for information exchange |
| 43 | * generell format | 43 | * generell format |
| @@ -80,6 +80,7 @@ | |||
| 80 | #define PH_DEACTIVATE_IND 0x0202 | 80 | #define PH_DEACTIVATE_IND 0x0202 |
| 81 | #define PH_DEACTIVATE_CNF 0x4202 | 81 | #define PH_DEACTIVATE_CNF 0x4202 |
| 82 | #define PH_DATA_IND 0x2002 | 82 | #define PH_DATA_IND 0x2002 |
| 83 | #define PH_DATA_E_IND 0x3002 | ||
| 83 | #define MPH_ACTIVATE_IND 0x0502 | 84 | #define MPH_ACTIVATE_IND 0x0502 |
| 84 | #define MPH_DEACTIVATE_IND 0x0602 | 85 | #define MPH_DEACTIVATE_IND 0x0602 |
| 85 | #define MPH_INFORMATION_IND 0x0702 | 86 | #define MPH_INFORMATION_IND 0x0702 |
| @@ -199,6 +200,18 @@ | |||
| 199 | #define ISDN_P_NT_S0 0x02 | 200 | #define ISDN_P_NT_S0 0x02 |
| 200 | #define ISDN_P_TE_E1 0x03 | 201 | #define ISDN_P_TE_E1 0x03 |
| 201 | #define ISDN_P_NT_E1 0x04 | 202 | #define ISDN_P_NT_E1 0x04 |
| 203 | #define ISDN_P_TE_UP0 0x05 | ||
| 204 | #define ISDN_P_NT_UP0 0x06 | ||
| 205 | |||
| 206 | #define IS_ISDN_P_TE(p) ((p == ISDN_P_TE_S0) || (p == ISDN_P_TE_E1) || \ | ||
| 207 | (p == ISDN_P_TE_UP0) || (p == ISDN_P_LAPD_TE)) | ||
| 208 | #define IS_ISDN_P_NT(p) ((p == ISDN_P_NT_S0) || (p == ISDN_P_NT_E1) || \ | ||
| 209 | (p == ISDN_P_NT_UP0) || (p == ISDN_P_LAPD_NT)) | ||
| 210 | #define IS_ISDN_P_S0(p) ((p == ISDN_P_TE_S0) || (p == ISDN_P_NT_S0)) | ||
| 211 | #define IS_ISDN_P_E1(p) ((p == ISDN_P_TE_E1) || (p == ISDN_P_NT_E1)) | ||
| 212 | #define IS_ISDN_P_UP0(p) ((p == ISDN_P_TE_UP0) || (p == ISDN_P_NT_UP0)) | ||
| 213 | |||
| 214 | |||
| 202 | #define ISDN_P_LAPD_TE 0x10 | 215 | #define ISDN_P_LAPD_TE 0x10 |
| 203 | #define ISDN_P_LAPD_NT 0x11 | 216 | #define ISDN_P_LAPD_NT 0x11 |
| 204 | 217 | ||
| @@ -255,16 +268,6 @@ struct sockaddr_mISDN { | |||
| 255 | unsigned char tei; | 268 | unsigned char tei; |
| 256 | }; | 269 | }; |
| 257 | 270 | ||
| 258 | /* timer device ioctl */ | ||
| 259 | #define IMADDTIMER _IOR('I', 64, int) | ||
| 260 | #define IMDELTIMER _IOR('I', 65, int) | ||
| 261 | /* socket ioctls */ | ||
| 262 | #define IMGETVERSION _IOR('I', 66, int) | ||
| 263 | #define IMGETCOUNT _IOR('I', 67, int) | ||
| 264 | #define IMGETDEVINFO _IOR('I', 68, int) | ||
| 265 | #define IMCTRLREQ _IOR('I', 69, int) | ||
| 266 | #define IMCLEAR_L2 _IOR('I', 70, int) | ||
| 267 | |||
| 268 | struct mISDNversion { | 271 | struct mISDNversion { |
| 269 | unsigned char major; | 272 | unsigned char major; |
| 270 | unsigned char minor; | 273 | unsigned char minor; |
| @@ -281,6 +284,40 @@ struct mISDN_devinfo { | |||
| 281 | char name[MISDN_MAX_IDLEN]; | 284 | char name[MISDN_MAX_IDLEN]; |
| 282 | }; | 285 | }; |
| 283 | 286 | ||
| 287 | struct mISDN_devrename { | ||
| 288 | u_int id; | ||
| 289 | char name[MISDN_MAX_IDLEN]; /* new name */ | ||
| 290 | }; | ||
| 291 | |||
| 292 | /* MPH_INFORMATION_REQ payload */ | ||
| 293 | struct ph_info_ch { | ||
| 294 | __u32 protocol; | ||
| 295 | __u64 Flags; | ||
| 296 | }; | ||
| 297 | |||
| 298 | struct ph_info_dch { | ||
| 299 | struct ph_info_ch ch; | ||
| 300 | __u16 state; | ||
| 301 | __u16 num_bch; | ||
| 302 | }; | ||
| 303 | |||
| 304 | struct ph_info { | ||
| 305 | struct ph_info_dch dch; | ||
| 306 | struct ph_info_ch bch[]; | ||
| 307 | }; | ||
| 308 | |||
| 309 | /* timer device ioctl */ | ||
| 310 | #define IMADDTIMER _IOR('I', 64, int) | ||
| 311 | #define IMDELTIMER _IOR('I', 65, int) | ||
| 312 | |||
| 313 | /* socket ioctls */ | ||
| 314 | #define IMGETVERSION _IOR('I', 66, int) | ||
| 315 | #define IMGETCOUNT _IOR('I', 67, int) | ||
| 316 | #define IMGETDEVINFO _IOR('I', 68, int) | ||
| 317 | #define IMCTRLREQ _IOR('I', 69, int) | ||
| 318 | #define IMCLEAR_L2 _IOR('I', 70, int) | ||
| 319 | #define IMSETDEVNAME _IOR('I', 71, struct mISDN_devrename) | ||
| 320 | |||
| 284 | static inline int | 321 | static inline int |
| 285 | test_channelmap(u_int nr, u_char *map) | 322 | test_channelmap(u_int nr, u_char *map) |
| 286 | { | 323 | { |
| @@ -312,6 +349,8 @@ clear_channelmap(u_int nr, u_char *map) | |||
| 312 | #define MISDN_CTRL_SETPEER 0x0040 | 349 | #define MISDN_CTRL_SETPEER 0x0040 |
| 313 | #define MISDN_CTRL_UNSETPEER 0x0080 | 350 | #define MISDN_CTRL_UNSETPEER 0x0080 |
| 314 | #define MISDN_CTRL_RX_OFF 0x0100 | 351 | #define MISDN_CTRL_RX_OFF 0x0100 |
| 352 | #define MISDN_CTRL_FILL_EMPTY 0x0200 | ||
| 353 | #define MISDN_CTRL_GETPEER 0x0400 | ||
| 315 | #define MISDN_CTRL_HW_FEATURES_OP 0x2000 | 354 | #define MISDN_CTRL_HW_FEATURES_OP 0x2000 |
| 316 | #define MISDN_CTRL_HW_FEATURES 0x2001 | 355 | #define MISDN_CTRL_HW_FEATURES 0x2001 |
| 317 | #define MISDN_CTRL_HFC_OP 0x4000 | 356 | #define MISDN_CTRL_HFC_OP 0x4000 |
| @@ -362,6 +401,7 @@ struct mISDN_ctrl_req { | |||
| 362 | #define DEBUG_L2_TEI 0x00100000 | 401 | #define DEBUG_L2_TEI 0x00100000 |
| 363 | #define DEBUG_L2_TEIFSM 0x00200000 | 402 | #define DEBUG_L2_TEIFSM 0x00200000 |
| 364 | #define DEBUG_TIMER 0x01000000 | 403 | #define DEBUG_TIMER 0x01000000 |
| 404 | #define DEBUG_CLOCK 0x02000000 | ||
| 365 | 405 | ||
| 366 | #define mISDN_HEAD_P(s) ((struct mISDNhead *)&s->cb[0]) | 406 | #define mISDN_HEAD_P(s) ((struct mISDNhead *)&s->cb[0]) |
| 367 | #define mISDN_HEAD_PRIM(s) (((struct mISDNhead *)&s->cb[0])->prim) | 407 | #define mISDN_HEAD_PRIM(s) (((struct mISDNhead *)&s->cb[0])->prim) |
| @@ -375,6 +415,7 @@ struct mISDN_ctrl_req { | |||
| 375 | struct mISDNchannel; | 415 | struct mISDNchannel; |
| 376 | struct mISDNdevice; | 416 | struct mISDNdevice; |
| 377 | struct mISDNstack; | 417 | struct mISDNstack; |
| 418 | struct mISDNclock; | ||
| 378 | 419 | ||
| 379 | struct channel_req { | 420 | struct channel_req { |
| 380 | u_int protocol; | 421 | u_int protocol; |
| @@ -423,7 +464,6 @@ struct mISDN_sock { | |||
| 423 | struct mISDNdevice { | 464 | struct mISDNdevice { |
| 424 | struct mISDNchannel D; | 465 | struct mISDNchannel D; |
| 425 | u_int id; | 466 | u_int id; |
| 426 | char name[MISDN_MAX_IDLEN]; | ||
| 427 | u_int Dprotocols; | 467 | u_int Dprotocols; |
| 428 | u_int Bprotocols; | 468 | u_int Bprotocols; |
| 429 | u_int nrbchan; | 469 | u_int nrbchan; |
| @@ -452,6 +492,16 @@ struct mISDNstack { | |||
| 452 | #endif | 492 | #endif |
| 453 | }; | 493 | }; |
| 454 | 494 | ||
| 495 | typedef int (clockctl_func_t)(void *, int); | ||
| 496 | |||
| 497 | struct mISDNclock { | ||
| 498 | struct list_head list; | ||
| 499 | char name[64]; | ||
| 500 | int pri; | ||
| 501 | clockctl_func_t *ctl; | ||
| 502 | void *priv; | ||
| 503 | }; | ||
| 504 | |||
| 455 | /* global alloc/queue functions */ | 505 | /* global alloc/queue functions */ |
| 456 | 506 | ||
| 457 | static inline struct sk_buff * | 507 | static inline struct sk_buff * |
| @@ -498,12 +548,23 @@ _queue_data(struct mISDNchannel *ch, u_int prim, | |||
| 498 | 548 | ||
| 499 | /* global register/unregister functions */ | 549 | /* global register/unregister functions */ |
| 500 | 550 | ||
| 501 | extern int mISDN_register_device(struct mISDNdevice *, char *name); | 551 | extern int mISDN_register_device(struct mISDNdevice *, |
| 552 | struct device *parent, char *name); | ||
| 502 | extern void mISDN_unregister_device(struct mISDNdevice *); | 553 | extern void mISDN_unregister_device(struct mISDNdevice *); |
| 503 | extern int mISDN_register_Bprotocol(struct Bprotocol *); | 554 | extern int mISDN_register_Bprotocol(struct Bprotocol *); |
| 504 | extern void mISDN_unregister_Bprotocol(struct Bprotocol *); | 555 | extern void mISDN_unregister_Bprotocol(struct Bprotocol *); |
| 556 | extern struct mISDNclock *mISDN_register_clock(char *, int, clockctl_func_t *, | ||
| 557 | void *); | ||
| 558 | extern void mISDN_unregister_clock(struct mISDNclock *); | ||
| 559 | |||
| 560 | static inline struct mISDNdevice *dev_to_mISDN(struct device *dev) | ||
| 561 | { | ||
| 562 | return dev_get_drvdata(dev); | ||
| 563 | } | ||
| 505 | 564 | ||
| 506 | extern void set_channel_address(struct mISDNchannel *, u_int, u_int); | 565 | extern void set_channel_address(struct mISDNchannel *, u_int, u_int); |
| 566 | extern void mISDN_clock_update(struct mISDNclock *, int, struct timeval *); | ||
| 567 | extern unsigned short mISDN_clock_get(void); | ||
| 507 | 568 | ||
| 508 | #endif /* __KERNEL__ */ | 569 | #endif /* __KERNEL__ */ |
| 509 | #endif /* mISDNIF_H */ | 570 | #endif /* mISDNIF_H */ |
