Deleted Added
full compact
sio.c (131981) sio.c (132226)
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

--- 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 *
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

--- 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/pc98/cbus/sio.c 131981 2004-07-11 15:18:39Z phk $
29 * $FreeBSD: head/sys/pc98/cbus/sio.c 132226 2004-07-15 20:47:41Z phk $
30 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
31 * from: i386/isa sio.c,v 1.234
32 */
33
34#include "opt_comconsole.h"
35#include "opt_compat.h"
36#include "opt_gdb.h"
37#include "opt_kdb.h"

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

793 bus_release_resource(dev, SYS_RES_IRQ, 0, com->irqres);
794 }
795 if (com->ioportres)
796 bus_release_resource(dev, SYS_RES_IOPORT, com->ioportrid,
797 com->ioportres);
798 if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
799 device_printf(dev, "still open, forcing close\n");
800 ttyld_close(com->tp, 0);
30 * from: @(#)com.c 7.5 (Berkeley) 5/16/91
31 * from: i386/isa sio.c,v 1.234
32 */
33
34#include "opt_comconsole.h"
35#include "opt_compat.h"
36#include "opt_gdb.h"
37#include "opt_kdb.h"

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

793 bus_release_resource(dev, SYS_RES_IRQ, 0, com->irqres);
794 }
795 if (com->ioportres)
796 bus_release_resource(dev, SYS_RES_IOPORT, com->ioportrid,
797 com->ioportres);
798 if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
799 device_printf(dev, "still open, forcing close\n");
800 ttyld_close(com->tp, 0);
801 ttyclose(com->tp);
801 tty_close(com->tp);
802 } else {
803 if (com->ibuf != NULL)
804 free(com->ibuf, M_DEVBUF);
805#ifdef PC98
806 if (com->obuf1 != NULL)
807 free(com->obuf1, M_DEVBUF);
808#endif
809 device_set_softc(dev, NULL);

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

2137 tp = com->tp;
2138 s = spltty();
2139 ttyld_close(tp, flag);
2140#ifdef PC98
2141 com->modem_checking = 0;
2142#endif
2143 ttyldoptim(tp);
2144 comhardclose(com);
802 } else {
803 if (com->ibuf != NULL)
804 free(com->ibuf, M_DEVBUF);
805#ifdef PC98
806 if (com->obuf1 != NULL)
807 free(com->obuf1, M_DEVBUF);
808#endif
809 device_set_softc(dev, NULL);

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

2137 tp = com->tp;
2138 s = spltty();
2139 ttyld_close(tp, flag);
2140#ifdef PC98
2141 com->modem_checking = 0;
2142#endif
2143 ttyldoptim(tp);
2144 comhardclose(com);
2145 ttyclose(tp);
2145 tty_close(tp);
2146 siosettimeout();
2147 splx(s);
2148 if (com->gone) {
2149 printf("sio%d: gone\n", com->unit);
2150 s = spltty();
2151 if (com->ibuf != NULL)
2152 free(com->ibuf, M_DEVBUF);
2153 bzero(tp, sizeof *tp);

--- 2733 unchanged lines hidden ---
2146 siosettimeout();
2147 splx(s);
2148 if (com->gone) {
2149 printf("sio%d: gone\n", com->unit);
2150 s = spltty();
2151 if (com->ibuf != NULL)
2152 free(com->ibuf, M_DEVBUF);
2153 bzero(tp, sizeof *tp);

--- 2733 unchanged lines hidden ---