sio.c (18095) | sio.c (18208) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 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 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 | 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 --- 17 unchanged lines hidden (view full) --- 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 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 |
34 * $Id: sio.c,v 1.4 1996/09/03 10:23:59 asami Exp $ | 34 * $Id: sio.c,v 1.5 1996/09/07 02:14:23 asami Exp $ |
35 */ 36 37#include "opt_comconsole.h" 38#include "opt_ddb.h" 39#include "opt_sio.h" 40#include "sio.h" 41 42/* --- 82 unchanged lines hidden (view full) --- 125#include <sys/proc.h> 126#include <sys/conf.h> 127#include <sys/dkstat.h> 128#include <sys/file.h> 129#include <sys/uio.h> 130#include <sys/kernel.h> 131#include <sys/malloc.h> 132#include <sys/syslog.h> | 35 */ 36 37#include "opt_comconsole.h" 38#include "opt_ddb.h" 39#include "opt_sio.h" 40#include "sio.h" 41 42/* --- 82 unchanged lines hidden (view full) --- 125#include <sys/proc.h> 126#include <sys/conf.h> 127#include <sys/dkstat.h> 128#include <sys/file.h> 129#include <sys/uio.h> 130#include <sys/kernel.h> 131#include <sys/malloc.h> 132#include <sys/syslog.h> |
133#include <sys/devconf.h> | |
134#ifdef DEVFS 135#include <sys/devfsext.h> 136#endif 137 138#include <machine/clock.h> 139 140#ifdef PC98 141#include <pc98/pc98/pc98.h> --- 239 unchanged lines hidden (view full) --- 381#endif 382static int sioattach __P((struct isa_device *dev)); 383static timeout_t siodtrwakeup; 384static void comhardclose __P((struct com_s *com)); 385static void siointr1 __P((struct com_s *com)); 386static int commctl __P((struct com_s *com, int bits, int how)); 387static int comparam __P((struct tty *tp, struct termios *t)); 388static int sioprobe __P((struct isa_device *dev)); | 133#ifdef DEVFS 134#include <sys/devfsext.h> 135#endif 136 137#include <machine/clock.h> 138 139#ifdef PC98 140#include <pc98/pc98/pc98.h> --- 239 unchanged lines hidden (view full) --- 380#endif 381static int sioattach __P((struct isa_device *dev)); 382static timeout_t siodtrwakeup; 383static void comhardclose __P((struct com_s *com)); 384static void siointr1 __P((struct com_s *com)); 385static int commctl __P((struct com_s *com, int bits, int how)); 386static int comparam __P((struct tty *tp, struct termios *t)); 387static int sioprobe __P((struct isa_device *dev)); |
389static void sioregisterdev __P((struct isa_device *id)); | |
390static void siosettimeout __P((void)); 391static void comstart __P((struct tty *tp)); 392static timeout_t comwakeup; 393static int tiocm_xxx2mcr __P((int tiocm_xxx)); 394static void disc_optim __P((struct tty *tp, struct termios *t, 395 struct com_s *com)); 396 397#ifdef DSI_SOFT_MODEM --- 192 unchanged lines hidden (view full) --- 590 { 9600, COMBRD(9600) }, 591 { 19200, COMBRD(19200) }, 592 { 38400, COMBRD(38400) }, 593 { 57600, COMBRD(57600) }, 594 { 115200, COMBRD(115200) }, 595 { -1, -1 } 596}; 597 | 388static void siosettimeout __P((void)); 389static void comstart __P((struct tty *tp)); 390static timeout_t comwakeup; 391static int tiocm_xxx2mcr __P((int tiocm_xxx)); 392static void disc_optim __P((struct tty *tp, struct termios *t, 393 struct com_s *com)); 394 395#ifdef DSI_SOFT_MODEM --- 192 unchanged lines hidden (view full) --- 588 { 9600, COMBRD(9600) }, 589 { 19200, COMBRD(19200) }, 590 { 38400, COMBRD(38400) }, 591 { 57600, COMBRD(57600) }, 592 { 115200, COMBRD(115200) }, 593 { -1, -1 } 594}; 595 |
598static struct kern_devconf kdc_sio[NSIO] = { { 599 0, 0, 0, /* filled in by dev_attach */ 600 driver_name, 0, { MDDT_ISA, 0, "tty" }, 601 isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, 602 &kdc_isa0, /* parent */ 603 0, /* parentdata */ 604 DC_UNCONFIGURED, /* state */ 605 "Serial port", 606 DC_CLS_SERIAL /* class */ 607} }; 608 | |
609#ifdef COM_ESP 610/* XXX configure this properly. */ 611static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, }; 612static Port_t likely_esp_ports[] = { 0x140, 0x180, 0x280, 0 }; 613#endif 614 615#if NCRD > 0 616/* --- 78 unchanged lines hidden (view full) --- 695{ 696 struct com_s *com; 697 698 com = com_addr(dp->isahd.id_unit); 699 if (!com->iobase) { 700 printf("sio%d already unloaded!\n",dp->isahd.id_unit); 701 return; 702 } | 596#ifdef COM_ESP 597/* XXX configure this properly. */ 598static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, }; 599static Port_t likely_esp_ports[] = { 0x140, 0x180, 0x280, 0 }; 600#endif 601 602#if NCRD > 0 603/* --- 78 unchanged lines hidden (view full) --- 682{ 683 struct com_s *com; 684 685 com = com_addr(dp->isahd.id_unit); 686 if (!com->iobase) { 687 printf("sio%d already unloaded!\n",dp->isahd.id_unit); 688 return; 689 } |
703 kdc_sio[com->unit].kdc_state = DC_UNCONFIGURED; 704 kdc_sio[com->unit].kdc_description = "Serial port"; | |
705 if (com->tp && (com->tp->t_state & TS_ISOPEN)) { 706 com->gone = 1; 707 printf("sio%d: unload\n", dp->isahd.id_unit); 708 com->tp->t_gen++; 709 ttyclose(com->tp); 710 ttwakeup(com->tp); 711 ttwwakeup(com->tp); 712 } else { --- 14 unchanged lines hidden (view full) --- 727 struct com_s *com; 728 com = com_addr(dp->isahd.id_unit); 729 if (com && !com_addr(dp->isahd.id_unit)->gone) 730 siointr1(com_addr(dp->isahd.id_unit)); 731 return(1); 732} 733#endif /* NCRD > 0 */ 734 | 690 if (com->tp && (com->tp->t_state & TS_ISOPEN)) { 691 com->gone = 1; 692 printf("sio%d: unload\n", dp->isahd.id_unit); 693 com->tp->t_gen++; 694 ttyclose(com->tp); 695 ttwakeup(com->tp); 696 ttwwakeup(com->tp); 697 } else { --- 14 unchanged lines hidden (view full) --- 712 struct com_s *com; 713 com = com_addr(dp->isahd.id_unit); 714 if (com && !com_addr(dp->isahd.id_unit)->gone) 715 siointr1(com_addr(dp->isahd.id_unit)); 716 return(1); 717} 718#endif /* NCRD > 0 */ 719 |
735static void 736sioregisterdev(id) 737 struct isa_device *id; 738{ 739 int unit; 740 741 unit = id->id_unit; 742/* 743 * If already registered, don't try to re-register. 744 */ 745 if (kdc_sio[unit].kdc_isa) 746 return; 747 if (unit != 0) 748 kdc_sio[unit] = kdc_sio[0]; 749 kdc_sio[unit].kdc_state = DC_UNCONFIGURED; 750 kdc_sio[unit].kdc_description = "Serial port"; 751 kdc_sio[unit].kdc_unit = unit; 752 kdc_sio[unit].kdc_isa = id; 753 dev_attach(&kdc_sio[unit]); 754} 755 | |
756static int 757sioprobe(dev) 758 struct isa_device *dev; 759{ 760 static bool_t already_init; 761 bool_t failures[10]; 762 int fn; 763 struct isa_device *idev; --- 5 unchanged lines hidden (view full) --- 769 int irqout=0; 770 int ret = 0; 771 int tmp; 772 struct siodev iod; 773#else 774 struct isa_device *xdev; 775#endif 776 | 720static int 721sioprobe(dev) 722 struct isa_device *dev; 723{ 724 static bool_t already_init; 725 bool_t failures[10]; 726 int fn; 727 struct isa_device *idev; --- 5 unchanged lines hidden (view full) --- 733 int irqout=0; 734 int ret = 0; 735 int tmp; 736 struct siodev iod; 737#else 738 struct isa_device *xdev; 739#endif 740 |
777 sioregisterdev(dev); 778 | |
779 if (!already_init) { 780 /* 781 * Turn off MCR_IENABLE for all likely serial ports. An unused 782 * port with its MCR_IENABLE gate open will inhibit interrupts 783 * from any used port that shares the interrupt vector. 784 * XXX the gate enable is elsewhere for some multiports. 785 */ 786 for (xdev = isa_devtab_tty; xdev->id_driver != NULL; xdev++) --- 388 unchanged lines hidden (view full) --- 1175 com->it_out = com->it_in; 1176 1177 /* attempt to determine UART type */ 1178 printf("sio%d: type", unit); 1179 1180#ifdef DSI_SOFT_MODEM 1181 if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) { 1182 printf(" Digicom Systems, Inc. SoftModem"); | 741 if (!already_init) { 742 /* 743 * Turn off MCR_IENABLE for all likely serial ports. An unused 744 * port with its MCR_IENABLE gate open will inhibit interrupts 745 * from any used port that shares the interrupt vector. 746 * XXX the gate enable is elsewhere for some multiports. 747 */ 748 for (xdev = isa_devtab_tty; xdev->id_driver != NULL; xdev++) --- 388 unchanged lines hidden (view full) --- 1137 com->it_out = com->it_in; 1138 1139 /* attempt to determine UART type */ 1140 printf("sio%d: type", unit); 1141 1142#ifdef DSI_SOFT_MODEM 1143 if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) { 1144 printf(" Digicom Systems, Inc. SoftModem"); |
1183 kdc_sio[unit].kdc_description = 1184 "Serial port: Digicom Systems SoftModem"; | |
1185 goto determined_type; 1186 } 1187#endif /* DSI_SOFT_MODEM */ 1188 1189#ifndef PC98 1190#ifdef COM_MULTIPORT 1191 if (!COM_ISMULTIPORT(isdp)) 1192#endif --- 5 unchanged lines hidden (view full) --- 1198 scr = inb(iobase + com_scr); 1199 outb(iobase + com_scr, 0xa5); 1200 scr1 = inb(iobase + com_scr); 1201 outb(iobase + com_scr, 0x5a); 1202 scr2 = inb(iobase + com_scr); 1203 outb(iobase + com_scr, scr); 1204 if (scr1 != 0xa5 || scr2 != 0x5a) { 1205 printf(" 8250"); | 1145 goto determined_type; 1146 } 1147#endif /* DSI_SOFT_MODEM */ 1148 1149#ifndef PC98 1150#ifdef COM_MULTIPORT 1151 if (!COM_ISMULTIPORT(isdp)) 1152#endif --- 5 unchanged lines hidden (view full) --- 1158 scr = inb(iobase + com_scr); 1159 outb(iobase + com_scr, 0xa5); 1160 scr1 = inb(iobase + com_scr); 1161 outb(iobase + com_scr, 0x5a); 1162 scr2 = inb(iobase + com_scr); 1163 outb(iobase + com_scr, scr); 1164 if (scr1 != 0xa5 || scr2 != 0x5a) { 1165 printf(" 8250"); |
1206 kdc_sio[unit].kdc_description = 1207 "Serial port: National 8250 or compatible"; | |
1208 goto determined_type; 1209 } 1210 } 1211#endif /* !PC98 */ 1212#ifdef PC98 1213 if(IS_8251(com->pc98_if_type)){ 1214 com_int_TxRx_disable( com ); 1215 com_cflag_and_speed_set( com, com->it_in.c_cflag, 1216 comdefaultrate ); 1217 com_tiocm_bic( com, TIOCM_DTR|TIOCM_RTS|TIOCM_LE ); 1218 com_send_break_off( com ); 1219 switch(com->pc98_if_type){ 1220 case COM_IF_INTERNAL: 1221 printf(" 8251 (internal)"); | 1166 goto determined_type; 1167 } 1168 } 1169#endif /* !PC98 */ 1170#ifdef PC98 1171 if(IS_8251(com->pc98_if_type)){ 1172 com_int_TxRx_disable( com ); 1173 com_cflag_and_speed_set( com, com->it_in.c_cflag, 1174 comdefaultrate ); 1175 com_tiocm_bic( com, TIOCM_DTR|TIOCM_RTS|TIOCM_LE ); 1176 com_send_break_off( com ); 1177 switch(com->pc98_if_type){ 1178 case COM_IF_INTERNAL: 1179 printf(" 8251 (internal)"); |
1222 kdc_sio[unit].kdc_description = 1223 "Serial port: PC-9801 internal"; | |
1224 break; 1225#ifdef COM_IF_PC9861K 1226 case COM_IF_PC9861K: 1227 printf(" 8251 (PC9861K)"); | 1180 break; 1181#ifdef COM_IF_PC9861K 1182 case COM_IF_PC9861K: 1183 printf(" 8251 (PC9861K)"); |
1228 kdc_sio[unit].kdc_description = 1229 "Serial port: PC-9861K"; | |
1230 break; 1231#endif 1232#ifdef COM_IF_PIO9032B 1233 case COM_IF_PIO9032B: 1234 printf(" 8251 (PIO9032B)"); | 1184 break; 1185#endif 1186#ifdef COM_IF_PIO9032B 1187 case COM_IF_PIO9032B: 1188 printf(" 8251 (PIO9032B)"); |
1235 kdc_sio[unit].kdc_description = 1236 "Serial port: PIO9032B"; | |
1237 break; 1238#endif 1239#ifdef COM_IF_B98_01 1240 case COM_IF_B98_01: 1241 printf(" 8251 (B98_01)"); | 1189 break; 1190#endif 1191#ifdef COM_IF_B98_01 1192 case COM_IF_B98_01: 1193 printf(" 8251 (B98_01)"); |
1242 kdc_sio[unit].kdc_description = 1243 "Serial port: B98_01"; | |
1244 break; 1245#endif 1246 } 1247 } else { 1248#endif /* PC98 */ 1249 outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_HIGH); 1250 DELAY(100); 1251 switch (inb(com->int_id_port) & IIR_FIFO_MASK) { 1252 case FIFO_RX_LOW: 1253 printf(" 16450"); | 1194 break; 1195#endif 1196 } 1197 } else { 1198#endif /* PC98 */ 1199 outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_HIGH); 1200 DELAY(100); 1201 switch (inb(com->int_id_port) & IIR_FIFO_MASK) { 1202 case FIFO_RX_LOW: 1203 printf(" 16450"); |
1254 kdc_sio[unit].kdc_description = 1255 "Serial port: National 16450 or compatible"; | |
1256 break; 1257 case FIFO_RX_MEDL: 1258 printf(" 16450?"); | 1204 break; 1205 case FIFO_RX_MEDL: 1206 printf(" 16450?"); |
1259 kdc_sio[unit].kdc_description = 1260 "Serial port: maybe National 16450"; | |
1261 break; 1262 case FIFO_RX_MEDH: 1263 printf(" 16550?"); | 1207 break; 1208 case FIFO_RX_MEDH: 1209 printf(" 16550?"); |
1264 kdc_sio[unit].kdc_description = 1265 "Serial port: maybe National 16550"; | |
1266 break; 1267 case FIFO_RX_HIGH: 1268 printf(" 16550A"); 1269 if (COM_NOFIFO(isdp)) { 1270 printf(" fifo disabled"); | 1210 break; 1211 case FIFO_RX_HIGH: 1212 printf(" 16550A"); 1213 if (COM_NOFIFO(isdp)) { 1214 printf(" fifo disabled"); |
1271 kdc_sio[unit].kdc_description = 1272 "Serial port: National 16550A, FIFO disabled"; | |
1273 } else { 1274 com->hasfifo = TRUE; 1275 com->tx_fifo_size = 16; | 1215 } else { 1216 com->hasfifo = TRUE; 1217 com->tx_fifo_size = 16; |
1276 kdc_sio[unit].kdc_description = 1277 "Serial port: National 16550A or compatible"; | |
1278#ifdef COM_ESP 1279 for (espp = likely_esp_ports; *espp != 0; espp++) 1280 if (espattach(isdp, com, *espp)) { 1281 com->tx_fifo_size = 1024; | 1218#ifdef COM_ESP 1219 for (espp = likely_esp_ports; *espp != 0; espp++) 1220 if (espattach(isdp, com, *espp)) { 1221 com->tx_fifo_size = 1024; |
1282 kdc_sio[unit].kdc_description = 1283 "Serial port: Hayes ESP"; | |
1284 break; 1285 } 1286#endif 1287 } 1288#if 0 1289 /* 1290 * Check for the Startech ST16C650 chip. 1291 * it has a shadow register under the com_iir, --- 8 unchanged lines hidden (view full) --- 1300 outb(iobase + com_cfcr, CFCR_8BITS); 1301 j = inb(iobase + com_iir); 1302 outb(iobase + com_iir, i); 1303 if (i != j) { 1304 printf(" 16550A"); 1305 } else { 1306 com->tx_fifo_size = 32; 1307 printf(" 16650"); | 1222 break; 1223 } 1224#endif 1225 } 1226#if 0 1227 /* 1228 * Check for the Startech ST16C650 chip. 1229 * it has a shadow register under the com_iir, --- 8 unchanged lines hidden (view full) --- 1238 outb(iobase + com_cfcr, CFCR_8BITS); 1239 j = inb(iobase + com_iir); 1240 outb(iobase + com_iir, i); 1241 if (i != j) { 1242 printf(" 16550A"); 1243 } else { 1244 com->tx_fifo_size = 32; 1245 printf(" 16650"); |
1308 kdc_sio[unit].kdc_description = 1309 "Serial port: Startech 16C650 or similar"; | |
1310 } 1311 if (!com->tx_fifo_size) 1312 printf(" fifo disabled"); 1313 } 1314#endif 1315 break; 1316 } 1317#ifdef COM_ESP --- 34 unchanged lines hidden (view full) --- 1352 COM_MPMASTER(isdp))->id_irq == 0; 1353 } 1354#endif /* COM_MULTIPORT */ 1355#ifdef PC98 1356 } 1357#endif 1358 printf("\n"); 1359 | 1246 } 1247 if (!com->tx_fifo_size) 1248 printf(" fifo disabled"); 1249 } 1250#endif 1251 break; 1252 } 1253#ifdef COM_ESP --- 34 unchanged lines hidden (view full) --- 1288 COM_MPMASTER(isdp))->id_irq == 0; 1289 } 1290#endif /* COM_MULTIPORT */ 1291#ifdef PC98 1292 } 1293#endif 1294 printf("\n"); 1295 |
1360 kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE; 1361 | |
1362 s = spltty(); 1363 com_addr(unit) = com; 1364 splx(s); 1365 1366 dev = makedev(CDEV_MAJOR, 0); 1367 cdevsw_add(&dev, &sio_cdevsw, NULL); 1368#ifdef DEVFS 1369 /* devsw, minor, type, uid, gid, perm, fmt, ... */ --- 55 unchanged lines hidden (view full) --- 1425open_top: 1426 while (com->state & CS_DTR_OFF) { 1427 error = tsleep(&com->dtr_wait, TTIPRI | PCATCH, "siodtr", 0); 1428 if (com_addr(unit) == NULL) 1429 return (ENXIO); 1430 if (error != 0 || com->gone) 1431 goto out; 1432 } | 1296 s = spltty(); 1297 com_addr(unit) = com; 1298 splx(s); 1299 1300 dev = makedev(CDEV_MAJOR, 0); 1301 cdevsw_add(&dev, &sio_cdevsw, NULL); 1302#ifdef DEVFS 1303 /* devsw, minor, type, uid, gid, perm, fmt, ... */ --- 55 unchanged lines hidden (view full) --- 1359open_top: 1360 while (com->state & CS_DTR_OFF) { 1361 error = tsleep(&com->dtr_wait, TTIPRI | PCATCH, "siodtr", 0); 1362 if (com_addr(unit) == NULL) 1363 return (ENXIO); 1364 if (error != 0 || com->gone) 1365 goto out; 1366 } |
1433 kdc_sio[unit].kdc_state = DC_BUSY; | |
1434 if (tp->t_state & TS_ISOPEN) { 1435 /* 1436 * The device is open, so everything has been initialized. 1437 * Handle conflicts. 1438 */ 1439 if (mynor & CALLOUT_MASK) { 1440 if (!com->active_out) { 1441 error = EBUSY; --- 262 unchanged lines hidden (view full) --- 1704 * reboots. Some BIOSes fail to detect 16550s when the 1705 * fifos are enabled. 1706 */ 1707 outb(iobase + com_fifo, 0); 1708 } 1709 com->active_out = FALSE; 1710 wakeup(&com->active_out); 1711 wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */ | 1367 if (tp->t_state & TS_ISOPEN) { 1368 /* 1369 * The device is open, so everything has been initialized. 1370 * Handle conflicts. 1371 */ 1372 if (mynor & CALLOUT_MASK) { 1373 if (!com->active_out) { 1374 error = EBUSY; --- 262 unchanged lines hidden (view full) --- 1637 * reboots. Some BIOSes fail to detect 16550s when the 1638 * fifos are enabled. 1639 */ 1640 outb(iobase + com_fifo, 0); 1641 } 1642 com->active_out = FALSE; 1643 wakeup(&com->active_out); 1644 wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */ |
1712 if (!(com->state & CS_DTR_OFF) && unit != comconsole) 1713 kdc_sio[unit].kdc_state = DC_IDLE; | |
1714 splx(s); 1715} 1716 1717static int 1718sioread(dev, uio, flag) 1719 dev_t dev; 1720 struct uio *uio; 1721 int flag; --- 44 unchanged lines hidden (view full) --- 1766static void 1767siodtrwakeup(chan) 1768 void *chan; 1769{ 1770 struct com_s *com; 1771 1772 com = (struct com_s *)chan; 1773 com->state &= ~CS_DTR_OFF; | 1645 splx(s); 1646} 1647 1648static int 1649sioread(dev, uio, flag) 1650 dev_t dev; 1651 struct uio *uio; 1652 int flag; --- 44 unchanged lines hidden (view full) --- 1697static void 1698siodtrwakeup(chan) 1699 void *chan; 1700{ 1701 struct com_s *com; 1702 1703 com = (struct com_s *)chan; 1704 com->state &= ~CS_DTR_OFF; |
1774 if (com->unit != comconsole) 1775 kdc_sio[com->unit].kdc_state = DC_IDLE; | |
1776 wakeup(&com->dtr_wait); 1777} 1778 1779void 1780siointr(unit) 1781 int unit; 1782{ 1783#ifndef COM_MULTIPORT --- 2126 unchanged lines hidden --- | 1705 wakeup(&com->dtr_wait); 1706} 1707 1708void 1709siointr(unit) 1710 int unit; 1711{ 1712#ifndef COM_MULTIPORT --- 2126 unchanged lines hidden --- |