si.h (10707) | si.h (12174) |
---|---|
1/* 2 * Device driver for Specialix range (SLXOS) of serial line multiplexors. 3 * 'C' definitions for Specialix serial multiplex driver. 4 * 5 * Copyright (C) 1990, 1992 Specialix International, 6 * Copyright (C) 1993, Andy Rutter <andy@acronym.co.uk> 7 * Copyright (C) 1995, Peter Wemm <peter@haywire.dialix.com> 8 * --- 16 unchanged lines hidden (view full) --- 25 * International may be used to endorse or promote products derived from 26 * this software without specific prior written permission. 27 * 28 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 31 * NO EVENT SHALL THE AUTHORS BE LIABLE. 32 * | 1/* 2 * Device driver for Specialix range (SLXOS) of serial line multiplexors. 3 * 'C' definitions for Specialix serial multiplex driver. 4 * 5 * Copyright (C) 1990, 1992 Specialix International, 6 * Copyright (C) 1993, Andy Rutter <andy@acronym.co.uk> 7 * Copyright (C) 1995, Peter Wemm <peter@haywire.dialix.com> 8 * --- 16 unchanged lines hidden (view full) --- 25 * International may be used to endorse or promote products derived from 26 * this software without specific prior written permission. 27 * 28 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 31 * NO EVENT SHALL THE AUTHORS BE LIABLE. 32 * |
33 * $Id: si.h,v 1.3 1995/08/22 00:42:07 peter Exp $ | 33 * $Id: si.h,v 1.4 1995/09/13 08:39:28 peter Exp $ |
34 */ 35 36/* 37 * Macro to turn a device number into various parameters, and test for 38 * CONTROL device. 39 * max of 4 controllers with up to 32 ports per controller. 40 * minor device allocation is: 41 * adapter port --- 301 unchanged lines hidden (view full) --- 343 */ 344struct si_port { 345 volatile struct si_channel *sp_ccb; 346 struct tty *sp_tty; 347 int sp_pend; /* pending command */ 348 int sp_last_hi_ip; /* cached DCD */ 349 int sp_state; 350 int sp_active_out; /* callout is open */ | 34 */ 35 36/* 37 * Macro to turn a device number into various parameters, and test for 38 * CONTROL device. 39 * max of 4 controllers with up to 32 ports per controller. 40 * minor device allocation is: 41 * adapter port --- 301 unchanged lines hidden (view full) --- 343 */ 344struct si_port { 345 volatile struct si_channel *sp_ccb; 346 struct tty *sp_tty; 347 int sp_pend; /* pending command */ 348 int sp_last_hi_ip; /* cached DCD */ 349 int sp_state; 350 int sp_active_out; /* callout is open */ |
351 int sp_flags; | |
352 int sp_dtr_wait; /* DTR holddown in hz */ | 351 int sp_dtr_wait; /* DTR holddown in hz */ |
352 int sp_delta_overflows; |
|
353 u_int sp_wopeners; /* # procs waiting DCD */ 354 u_char sp_hotchar; /* ldisc specific ASAP char */ 355 /* Initial state. */ 356 struct termios sp_iin; 357 struct termios sp_iout; 358 /* Lock state. */ 359 struct termios sp_lin; 360 struct termios sp_lout; --- 15 unchanged lines hidden (view full) --- 376#define SS_LSTART 0x0100 /* lstart timeout pending */ 377#define SS_INLSTART 0x0200 /* running an lstart induced t_oproc */ 378#define SS_CLOSING 0x0400 /* in the middle of a siclose() */ 379/* 0x0800 -- */ 380#define SS_WAITWRITE 0x1000 381#define SS_BLOCKWRITE 0x2000 382#define SS_DTR_OFF 0x4000 /* DTR held off */ 383 | 353 u_int sp_wopeners; /* # procs waiting DCD */ 354 u_char sp_hotchar; /* ldisc specific ASAP char */ 355 /* Initial state. */ 356 struct termios sp_iin; 357 struct termios sp_iout; 358 /* Lock state. */ 359 struct termios sp_lin; 360 struct termios sp_lout; --- 15 unchanged lines hidden (view full) --- 376#define SS_LSTART 0x0100 /* lstart timeout pending */ 377#define SS_INLSTART 0x0200 /* running an lstart induced t_oproc */ 378#define SS_CLOSING 0x0400 /* in the middle of a siclose() */ 379/* 0x0800 -- */ 380#define SS_WAITWRITE 0x1000 381#define SS_BLOCKWRITE 0x2000 382#define SS_DTR_OFF 0x4000 /* DTR held off */ 383 |
384/* sp_flags */ 385#define SPF_COOKMODE 0x0003 386#define SPFC_WELL 0 387#define SPFC_MEDIUM 1 388#define SPFC_RAW 2 389#define spfc_clear(pp) (pp)->sp_flags &= ~SPF_COOKMODE 390#define SPF_COOK_WELL(pp) spfc_clear(pp) 391#define SPF_COOK_MEDIUM(pp) {spfc_clear(pp);(pp)->sp_flags|=SPFC_MEDIUM;} 392#define SPF_COOK_RAW(pp) {spfc_clear(pp);(pp)->sp_flags|=SPFC_RAW;} 393#define SPF_SETCOOK(pp, c) {spfc_clear(pp);(pp)->sp_flags|=(c);} 394#define SPF_ISCOOKWELL(pp) (((pp)->sp_flags & SPF_COOKMODE) == SPFC_WELL) 395#define SPF_ISCOOKMEDIUM(pp) (((pp)->sp_flags & SPF_COOKMODE) == SPFC_MEDIUM) 396#define SPF_ISCOOKRAW(pp) (((pp)->sp_flags & SPF_COOKMODE) == SPFC_RAW) 397#define SPF_COOKWELL_ALWAYS 0x0004 /* always use line disc */ 398/* 0x0008 */ 399#define SPF_IXANY 0x0020 /* IXANY enable/disable flag */ 400#define SPF_CTSOFLOW 0x0040 /* use CTS to handle o/p flow */ 401#define SPF_RTSIFLOW 0x0080 /* use RTS to handle i/p flow */ 402#define SPF_PPP 0x0100 /* special handling for upper 403 * level protocol code */ 404 | |
405/* 406 * Command post flags 407 */ 408#define SI_NOWAIT 0x00 /* Don't wait for command */ 409#define SI_WAIT 0x01 /* Wait for complete */ 410 411/* 412 * Extensive debugging stuff - manipulated using siconfig(8) --- 61 unchanged lines hidden (view full) --- 474#define TCSIDEBUG _IOW('S', 96, struct si_tcsi) /* Toggle debug */ 475#define TCSIRXIT _IOW('S', 97, struct si_tcsi) /* RX int throttle */ 476#define TCSIIT _IOW('S', 98, struct si_tcsi) /* TX int throttle */ 477 /* 99 defunct */ 478 /* 100 defunct */ 479 /* 101 defunct */ 480 /* 102 defunct */ 481 /* 103 defunct */ | 384/* 385 * Command post flags 386 */ 387#define SI_NOWAIT 0x00 /* Don't wait for command */ 388#define SI_WAIT 0x01 /* Wait for complete */ 389 390/* 391 * Extensive debugging stuff - manipulated using siconfig(8) --- 61 unchanged lines hidden (view full) --- 453#define TCSIDEBUG _IOW('S', 96, struct si_tcsi) /* Toggle debug */ 454#define TCSIRXIT _IOW('S', 97, struct si_tcsi) /* RX int throttle */ 455#define TCSIIT _IOW('S', 98, struct si_tcsi) /* TX int throttle */ 456 /* 99 defunct */ 457 /* 100 defunct */ 458 /* 101 defunct */ 459 /* 102 defunct */ 460 /* 103 defunct */ |
482#define TCSIIXANY _IOW('S', 103, struct si_tcsi) /* enable ixany */ | |
483 /* 104 defunct */ 484#define TCSISTATE _IOWR('S', 105, struct si_tcsi) /* get current state of RTS 485 DCD and DTR pins */ | 461 /* 104 defunct */ 462#define TCSISTATE _IOWR('S', 105, struct si_tcsi) /* get current state of RTS 463 DCD and DTR pins */ |
486 /* Set/reset/enquire cook mode, 1 = always use line disc 487 * -1 = enquire current setting */ 488#define TCSICOOKMODE _IOWR('S', 106, struct si_tcsi) | 464 /* 106 defunct */ |
489#define TCSIPORTS _IOR('S', 107, int) /* Number of ports found */ 490#define TCSISDBG_LEVEL _IOW('S', 108, struct si_tcsi) /* equivalent of TCSIDEBUG which sets a 491 * particular debug level (DBG_??? bit 492 * mask), default is 0xffff */ 493#define TCSIGDBG_LEVEL _IOWR('S', 109, struct si_tcsi) 494#define TCSIGRXIT _IOWR('S', 110, struct si_tcsi) 495#define TCSIGIT _IOWR('S', 111, struct si_tcsi) 496 /* 112 defunct */ 497 /* 113 defunct */ 498 /* 114 defunct */ 499 /* 115 defunct */ 500 /* 116 defunct */ | 465#define TCSIPORTS _IOR('S', 107, int) /* Number of ports found */ 466#define TCSISDBG_LEVEL _IOW('S', 108, struct si_tcsi) /* equivalent of TCSIDEBUG which sets a 467 * particular debug level (DBG_??? bit 468 * mask), default is 0xffff */ 469#define TCSIGDBG_LEVEL _IOWR('S', 109, struct si_tcsi) 470#define TCSIGRXIT _IOWR('S', 110, struct si_tcsi) 471#define TCSIGIT _IOWR('S', 111, struct si_tcsi) 472 /* 112 defunct */ 473 /* 113 defunct */ 474 /* 114 defunct */ 475 /* 115 defunct */ 476 /* 116 defunct */ |
501#define TCSIMODEM _IOWR('S', 117, struct si_tcsi) /* set/clear/query the modem bit */ | 477 /* 117 defunct */ |
502 503#define TCSISDBG_ALL _IOW('S', 118, int) /* set global debug level */ 504#define TCSIGDBG_ALL _IOR('S', 119, int) /* get global debug level */ 505 | 478 479#define TCSISDBG_ALL _IOW('S', 118, int) /* set global debug level */ 480#define TCSIGDBG_ALL _IOR('S', 119, int) /* get global debug level */ 481 |
506#define TCSIFLOW _IOWR('S', 120, struct si_tcsi) /* set/get h/w flow state */ | 482 /* 120 defunct */ |
507 /* 121 defunct */ 508 /* 122 defunct */ | 483 /* 121 defunct */ 484 /* 122 defunct */ |
509 510 511#define TCSIPPP _IOWR('S', 123, struct si_tcsi) /* set/get PPP flag bit */ | 485 /* 123 defunct */ |
512#define TCSIMODULES _IOR('S', 124, int) /* Number of modules found */ 513 514/* Various stats and monitoring hooks per tty device */ 515#define TCSI_PORT _IOWR('S', 125, struct si_pstat) /* get si_port */ 516#define TCSI_CCB _IOWR('S', 126, struct si_pstat) /* get si_ccb */ 517#define TCSI_TTY _IOWR('S', 127, struct si_pstat) /* get tty struct */ 518 519#define IOCTL_MAX 127 520 521#define IS_SI_IOCTL(cmd) ((u_int)((cmd)&0xff00) == ('S'<<8) && \ 522 (u_int)((cmd)&0xff) >= IOCTL_MIN && \ 523 (u_int)((cmd)&0xff) <= IOCTL_MAX) 524 525#define CONTROLDEV "/dev/si_control" | 486#define TCSIMODULES _IOR('S', 124, int) /* Number of modules found */ 487 488/* Various stats and monitoring hooks per tty device */ 489#define TCSI_PORT _IOWR('S', 125, struct si_pstat) /* get si_port */ 490#define TCSI_CCB _IOWR('S', 126, struct si_pstat) /* get si_ccb */ 491#define TCSI_TTY _IOWR('S', 127, struct si_pstat) /* get tty struct */ 492 493#define IOCTL_MAX 127 494 495#define IS_SI_IOCTL(cmd) ((u_int)((cmd)&0xff00) == ('S'<<8) && \ 496 (u_int)((cmd)&0xff) >= IOCTL_MIN && \ 497 (u_int)((cmd)&0xff) <= IOCTL_MAX) 498 499#define CONTROLDEV "/dev/si_control" |