Deleted Added
full compact
sio.c (104067) sio.c (104094)
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/sio/sio.c 104067 2002-09-27 22:00:23Z phk $
33 * $FreeBSD: head/sys/dev/sio/sio.c 104094 2002-09-28 17:15:38Z phk $
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
35 * from: i386/isa sio.c,v 1.234
36 */
37
38#include "opt_comconsole.h"
39#include "opt_compat.h"
40#include "opt_ddb.h"
41#include "opt_sio.h"

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

1630 * so enable RTS if it is now disabled and there is room in the
1631 * high-level buffer.
1632 */
1633 if ((com->state & CS_RTS_IFLOW) && !(com->mcr_image & MCR_RTS) &&
1634 !(tp->t_state & TS_TBLOCK))
1635 outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
1636}
1637
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
35 * from: i386/isa sio.c,v 1.234
36 */
37
38#include "opt_comconsole.h"
39#include "opt_compat.h"
40#include "opt_ddb.h"
41#include "opt_sio.h"

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

1630 * so enable RTS if it is now disabled and there is room in the
1631 * high-level buffer.
1632 */
1633 if ((com->state & CS_RTS_IFLOW) && !(com->mcr_image & MCR_RTS) &&
1634 !(tp->t_state & TS_TBLOCK))
1635 outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
1636}
1637
1638void
1638static void
1639siointr(arg)
1640 void *arg;
1641{
1642 struct com_s *com;
1643
1644#ifndef COM_MULTIPORT
1645 com = (struct com_s *)arg;
1646

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

3144 else
3145 c = -1;
3146 siocnclose(&sp, iobase);
3147 splx(s);
3148 return (c);
3149}
3150
3151
1639siointr(arg)
1640 void *arg;
1641{
1642 struct com_s *com;
1643
1644#ifndef COM_MULTIPORT
1645 com = (struct com_s *)arg;
1646

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

3144 else
3145 c = -1;
3146 siocnclose(&sp, iobase);
3147 splx(s);
3148 return (c);
3149}
3150
3151
3152int
3152static int
3153siocngetc(dev)
3154 dev_t dev;
3155{
3156 int c;
3157 Port_t iobase;
3158 int s;
3159 struct siocnstate sp;
3160 speed_t speed;

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

3171 while (!(inb(iobase + com_lsr) & LSR_RXRDY))
3172 ;
3173 c = inb(iobase + com_data);
3174 siocnclose(&sp, iobase);
3175 splx(s);
3176 return (c);
3177}
3178
3153siocngetc(dev)
3154 dev_t dev;
3155{
3156 int c;
3157 Port_t iobase;
3158 int s;
3159 struct siocnstate sp;
3160 speed_t speed;

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

3171 while (!(inb(iobase + com_lsr) & LSR_RXRDY))
3172 ;
3173 c = inb(iobase + com_data);
3174 siocnclose(&sp, iobase);
3175 splx(s);
3176 return (c);
3177}
3178
3179void
3179static void
3180siocnputc(dev, c)
3181 dev_t dev;
3182 int c;
3183{
3184 int need_unlock;
3185 int s;
3186 struct siocnstate sp;
3187 Port_t iobase;

--- 77 unchanged lines hidden ---
3180siocnputc(dev, c)
3181 dev_t dev;
3182 int c;
3183{
3184 int need_unlock;
3185 int s;
3186 struct siocnstate sp;
3187 Port_t iobase;

--- 77 unchanged lines hidden ---