1/* 2 * Copyright (c) Comtrol Corporation <support@comtrol.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted prodived that the follwoing conditions 7 * are met. 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/rp/rp.c 130892 2004-06-21 22:57:16Z phk $"); |
36 37/* 38 * rp.c - for RocketPort FreeBSD 39 */ 40 41#include "opt_compat.h" 42 43#include <sys/param.h> --- 1192 unchanged lines hidden (view full) --- 1236 struct rp_port *rp; 1237 CHANNEL_t *cp; 1238 struct tty *tp; 1239 int unit, mynor, port, umynor; /* SG */ 1240 int oldspl; 1241 int error = 0; 1242 int arg, flags, result, ChanStatus; 1243 struct termios *t; |
1244#ifndef BURN_BRIDGES |
1245#if defined(COMPAT_43) 1246 u_long oldcmd; 1247 struct termios term; 1248#endif |
1249#endif |
1250 1251 umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ 1252 port = (minor(dev) & 0x1f); /* SG */ 1253 mynor = (port + umynor); /* SG */ 1254 unit = minor_to_unit[mynor]; 1255 rp = rp_addr(unit) + port; 1256 1257 if(IS_CONTROL(dev)) { --- 28 unchanged lines hidden (view full) --- 1286 default: 1287 return(ENOTTY); 1288 } 1289 } 1290 1291 tp = rp->rp_tty; 1292 cp = &rp->rp_channel; 1293 |
1294#ifndef BURN_BRIDGES |
1295#if defined(COMPAT_43) 1296 term = tp->t_termios; 1297 oldcmd = cmd; 1298 error = ttsetcompat(tp, &cmd, data, &term); 1299 if(error != 0) 1300 return(error); 1301 if(cmd != oldcmd) { 1302 data = (caddr_t)&term; 1303 } 1304#endif |
1305#endif |
1306 if((cmd == TIOCSETA) || (cmd == TIOCSETAW) || (cmd == TIOCSETAF)) { 1307 int cc; 1308 struct termios *dt = (struct termios *)data; 1309 struct termios *lt = IS_CALLOUT(dev) 1310 ? &rp->lt_out : &rp->lt_in; 1311 1312 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 1313 | (dt->c_iflag & ~lt->c_iflag); --- 353 unchanged lines hidden --- |