Deleted Added
full compact
si.c (13469) si.c (13630)
1/*
2 * Device driver for Specialix range (SI/XIO) of serial line multiplexors.
3 *
4 * Copyright (C) 1990, 1992 Specialix International,
5 * Copyright (C) 1993, Andy Rutter <andy@acronym.co.uk>
6 * Copyright (C) 1995, Peter Wemm <peter@haywire.dialix.com>
7 *
8 * Originally derived from: SunOS 4.x version

--- 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 (SI/XIO) of serial line multiplexors.
3 *
4 * Copyright (C) 1990, 1992 Specialix International,
5 * Copyright (C) 1993, Andy Rutter <andy@acronym.co.uk>
6 * Copyright (C) 1995, Peter Wemm <peter@haywire.dialix.com>
7 *
8 * Originally derived from: SunOS 4.x version

--- 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.c,v 1.34 1996/01/09 03:01:45 peter Exp $
33 * $Id: si.c,v 1.35 1996/01/16 18:13:18 phk Exp $
34 */
35
36#ifndef lint
37static char si_copyright1[] = "@(#) (C) Specialix International, 1990,1992",
38 si_copyright2[] = "@(#) (C) Andy Rutter 1993",
39 si_copyright3[] = "@(#) (C) Peter Wemm 1995";
40#endif /* not lint */
41

--- 41 unchanged lines hidden (view full) ---

83
84#define POLL /* turn on poller to generate buffer empty interrupt */
85#undef FASTPOLL /* turn on 100Hz poller, (XXX: NOTYET!) */
86#define SI_DEF_HWFLOW /* turn on default CRTSCTS flow control */
87#define SI_I_HIGH_WATER (TTYHOG - 2 * SI_BUFFERSIZE)
88
89enum si_mctl { GET, SET, BIS, BIC };
90
34 */
35
36#ifndef lint
37static char si_copyright1[] = "@(#) (C) Specialix International, 1990,1992",
38 si_copyright2[] = "@(#) (C) Andy Rutter 1993",
39 si_copyright3[] = "@(#) (C) Peter Wemm 1995";
40#endif /* not lint */
41

--- 41 unchanged lines hidden (view full) ---

83
84#define POLL /* turn on poller to generate buffer empty interrupt */
85#undef FASTPOLL /* turn on 100Hz poller, (XXX: NOTYET!) */
86#define SI_DEF_HWFLOW /* turn on default CRTSCTS flow control */
87#define SI_I_HIGH_WATER (TTYHOG - 2 * SI_BUFFERSIZE)
88
89enum si_mctl { GET, SET, BIS, BIC };
90
91static const char devchar[] = "ABCDEFGHIJK";
92static const char portchar[] = "0123456789abcdefghijklmnopqrstuvwxyz";
93
94
95static void si_command __P((struct si_port *, int, int));
96static int si_modem __P((struct si_port *, enum si_mctl, int));
97static void si_write_enable __P((struct si_port *, int));
98static int si_Sioctl __P((dev_t, int, caddr_t, int, struct proc *));
99static void si_start __P((struct tty *));
100static void si_lstart __P((struct si_port *));
101static void si_disc_optim __P((struct tty *tp, struct termios *t,
102 struct si_port *pp));

--- 593 unchanged lines hidden (view full) ---

696 }
697 done_chartimes = 1;
698 }
699
700#ifdef DEVFS
701/* path name devsw minor type uid gid perm*/
702 for ( x = 0; x < sc->sc_nport; x++ ) {
703 y = x + 1; /* For sync with the manuals that start at 1 */
91static void si_command __P((struct si_port *, int, int));
92static int si_modem __P((struct si_port *, enum si_mctl, int));
93static void si_write_enable __P((struct si_port *, int));
94static int si_Sioctl __P((dev_t, int, caddr_t, int, struct proc *));
95static void si_start __P((struct tty *));
96static void si_lstart __P((struct si_port *));
97static void si_disc_optim __P((struct tty *tp, struct termios *t,
98 struct si_port *pp));

--- 593 unchanged lines hidden (view full) ---

692 }
693 done_chartimes = 1;
694 }
695
696#ifdef DEVFS
697/* path name devsw minor type uid gid perm*/
698 for ( x = 0; x < sc->sc_nport; x++ ) {
699 y = x + 1; /* For sync with the manuals that start at 1 */
704 sprintf(name,"ttyA%02d", y);
705 sc->devfs_token[x].ttyd = devfs_add_devsw(
706 "/", name, &si_cdevsw, x,
707 DV_CHR, 0, 0, 0600);
708 sprintf(name,"cuaA%02d", y);
709 sc->devfs_token[x].cuaa = devfs_add_devsw(
710 "/", name, &si_cdevsw, x + 128,
711 DV_CHR, 0, 0, 0600);
712 sprintf(name,"ttyiA%02d", y);
713 sc->devfs_token[x].ttyi = devfs_add_devsw(
714 "/", name, &si_cdevsw, x + 0x10000,
715 DV_CHR, 0, 0, 0600);
716 sprintf(name,"ttylA%02d", y);
717 sc->devfs_token[x].ttyl = devfs_add_devsw(
718 "/", name, &si_cdevsw, x + 0x20000,
719 DV_CHR, 0, 0, 0600);
700 sc->devfs_token[x].ttyd = devfs_add_devswf(
701 &si_cdevsw, x,
702 DV_CHR, 0, 0, 0600, "ttyA%02d", y);
703 sc->devfs_token[x].cuaa = devfs_add_devswf(
704 &si_cdevsw, x + 128,
705 DV_CHR, 0, 0, 0600, "cuaA%02d", y);
706 sc->devfs_token[x].ttyi = devfs_add_devswf(
707 &si_cdevsw, x + 0x10000,
708 DV_CHR, 0, 0, 0600, "ttyiA%02d", y);
709 sc->devfs_token[x].ttyl = devfs_add_devswf(
710 &si_cdevsw, x + 0x20000,
711 DV_CHR, 0, 0, 0600, "ttylA%02d", y);
720 }
721 sc->control_token = devfs_add_devsw("/", "si_control",
722 &si_cdevsw, 0x40000,
723 DV_CHR, 0, 0, 0600);
724#endif
725 return (1);
726}
727

--- 1606 unchanged lines hidden (view full) ---

2334#else
2335si_dprintf(pp, flags, fmt, va_alist)
2336 struct si_port *pp;
2337 int flags;
2338 char *fmt;
2339#endif
2340{
2341 va_list ap;
712 }
713 sc->control_token = devfs_add_devsw("/", "si_control",
714 &si_cdevsw, 0x40000,
715 DV_CHR, 0, 0, 0600);
716#endif
717 return (1);
718}
719

--- 1606 unchanged lines hidden (view full) ---

2326#else
2327si_dprintf(pp, flags, fmt, va_alist)
2328 struct si_port *pp;
2329 int flags;
2330 char *fmt;
2331#endif
2332{
2333 va_list ap;
2334
2342 if ((pp == NULL && (si_debug&flags)) ||
2343 (pp != NULL && ((pp->sp_debug&flags) || (si_debug&flags)))) {
2335 if ((pp == NULL && (si_debug&flags)) ||
2336 (pp != NULL && ((pp->sp_debug&flags) || (si_debug&flags)))) {
2344 va_start(ap, fmt);
2345 if (pp != NULL)
2346 printf("%ci%d(%d): ", 's',
2347 (int)SI_CARD(pp->sp_tty->t_dev),
2348 (int)SI_PORT(pp->sp_tty->t_dev));
2337 if (pp != NULL)
2338 printf("%ci%d(%d): ", 's',
2339 (int)SI_CARD(pp->sp_tty->t_dev),
2340 (int)SI_PORT(pp->sp_tty->t_dev));
2349 printf("%r", fmt, ap);
2341 va_start(ap, fmt);
2342 vprintf(fmt, ap);
2350 va_end(ap);
2351 }
2352}
2353
2354static char *
2355si_mctl2str(cmd)
2356 enum si_mctl cmd;
2357{

--- 28 unchanged lines hidden ---
2343 va_end(ap);
2344 }
2345}
2346
2347static char *
2348si_mctl2str(cmd)
2349 enum si_mctl cmd;
2350{

--- 28 unchanged lines hidden ---