1/*-
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Slawa Olhovchenkov
4 * John Prince <johnp@knight-trosoft.com>
5 * Eric Hernes
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/digi/digi.c 130344 2004-06-11 11:16:26Z phk $
30 */
31
32/*-
33 * TODO:
34 * Figure out what the con bios stuff is supposed to do
35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem.
36 */
37
--- 1029 unchanged lines hidden (view full) ---
1067
1068static int
1069digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
1070{
1071 int unit, pnum, mynor, error, s;
1072 struct digi_softc *sc;
1073 struct digi_p *port;
1074 struct tty *tp;
1075#if defined(COMPAT_43)
1076 int oldcmd;
1077 struct termios term;
1078#endif
1079
1080 mynor = minor(dev);
1081 unit = MINOR_TO_UNIT(mynor);
1082 pnum = MINOR_TO_PORT(mynor);
1083
--- 137 unchanged lines hidden (view full) ---
1221 port->cd = sc->csigs->cd;
1222 port->dsr = sc->csigs->dsr;
1223 }
1224 }
1225 return (0);
1226 }
1227
1228 tp = port->tp;
1229#if defined(COMPAT_43)
1230 term = tp->t_termios;
1231 oldcmd = cmd;
1232 error = ttsetcompat(tp, &cmd, data, &term);
1233 if (error != 0)
1234 return (error);
1235 if (cmd != oldcmd)
1236 data = (caddr_t) & term;
1237#endif
--- 693 unchanged lines hidden ---
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Slawa Olhovchenkov
4 * John Prince <johnp@knight-trosoft.com>
5 * Eric Hernes
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/digi/digi.c 130344 2004-06-11 11:16:26Z phk $
30 */
31
32/*-
33 * TODO:
34 * Figure out what the con bios stuff is supposed to do
35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem.
36 */
37
--- 1029 unchanged lines hidden (view full) ---
1067
1068static int
1069digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
1070{
1071 int unit, pnum, mynor, error, s;
1072 struct digi_softc *sc;
1073 struct digi_p *port;
1074 struct tty *tp;
1075#if defined(COMPAT_43)
1076 int oldcmd;
1077 struct termios term;
1078#endif
1079
1080 mynor = minor(dev);
1081 unit = MINOR_TO_UNIT(mynor);
1082 pnum = MINOR_TO_PORT(mynor);
1083
--- 137 unchanged lines hidden (view full) ---
1221 port->cd = sc->csigs->cd;
1222 port->dsr = sc->csigs->dsr;
1223 }
1224 }
1225 return (0);
1226 }
1227
1228 tp = port->tp;
1229#if defined(COMPAT_43)
1230 term = tp->t_termios;
1231 oldcmd = cmd;
1232 error = ttsetcompat(tp, &cmd, data, &term);
1233 if (error != 0)
1234 return (error);
1235 if (cmd != oldcmd)
1236 data = (caddr_t) & term;
1237#endif
--- 693 unchanged lines hidden ---