1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 15 unchanged lines hidden (view full) --- 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/cy/cy.c 130892 2004-06-21 22:57:16Z phk $"); |
33 34#include "opt_compat.h" 35 36/* 37 * TODO: 38 * Atomic COR change. 39 * Consoles. 40 */ --- 1493 unchanged lines hidden (view full) --- 1534 int flag; 1535 struct thread *td; 1536{ 1537 struct com_s *com; 1538 int error; 1539 int mynor; 1540 int s; 1541 struct tty *tp; |
1542#ifndef BURN_BRIDGES |
1543#if defined(COMPAT_43) 1544 int oldcmd; 1545 struct termios term; 1546#endif |
1547#endif |
1548 1549 mynor = minor(dev); 1550 com = com_addr(MINOR_TO_UNIT(mynor)); 1551 if (mynor & CONTROL_MASK) { 1552 struct termios *ct; 1553 1554 switch (mynor & CONTROL_MASK) { 1555 case CONTROL_INIT_STATE: --- 21 unchanged lines hidden (view full) --- 1577 case TIOCGWINSZ: 1578 bzero(data, sizeof(struct winsize)); 1579 return (0); 1580 default: 1581 return (ENOTTY); 1582 } 1583 } 1584 tp = com->tp; |
1585#ifndef BURN_BRIDGES |
1586#if defined(COMPAT_43) 1587 term = tp->t_termios; 1588 oldcmd = cmd; 1589 error = ttsetcompat(tp, &cmd, data, &term); 1590 if (error != 0) 1591 return (error); 1592 if (cmd != oldcmd) 1593 data = (caddr_t)&term; 1594#endif |
1595#endif |
1596 if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { 1597 int cc; 1598 struct termios *dt = (struct termios *)data; 1599 struct termios *lt = mynor & CALLOUT_MASK 1600 ? &com->lt_out : &com->lt_in; 1601 1602 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 1603 | (dt->c_iflag & ~lt->c_iflag); --- 1276 unchanged lines hidden --- |