rp.c (47625) | rp.c (47640) |
---|---|
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 --- 15 unchanged lines hidden (view full) --- 24 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) 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 * | 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 --- 15 unchanged lines hidden (view full) --- 24 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) 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 * $Id: rp.c,v 1.26 1999/05/09 17:07:20 peter Exp $ | 32 * $Id: rp.c,v 1.27 1999/05/30 16:52:22 phk Exp $ |
33 */ 34 35/* 36 * rp.c - for RocketPort FreeBSD 37 */ 38 39#include "opt_compat.h" 40 --- 1039 unchanged lines hidden (view full) --- 1080 dev->id_irq = 0; 1081 1082 return 1; 1083} 1084 1085static void 1086rp_pciattach(pcici_t tag, int unit) 1087{ | 33 */ 34 35/* 36 * rp.c - for RocketPort FreeBSD 37 */ 38 39#include "opt_compat.h" 40 --- 1039 unchanged lines hidden (view full) --- 1080 dev->id_irq = 0; 1081 1082 return 1; 1083} 1084 1085static void 1086rp_pciattach(pcici_t tag, int unit) 1087{ |
1088 dev_t rp_dev; | |
1089 int success, oldspl; 1090 u_short iobase; 1091 int num_ports, num_chan, num_aiops; 1092 int aiop, chan, port; 1093 int ChanStatus, line, i, count; 1094 unsigned int aiopio[MAX_AIOPS_PER_BOARD]; 1095 struct rp_port *rp; 1096 struct tty *tty; --- 38 unchanged lines hidden (view full) --- 1135 return; 1136 } 1137 bzero(tty, sizeof(struct tty) * num_ports); 1138 1139 oldspl = spltty(); 1140 rp_addr(unit) = rp; 1141 splx(oldspl); 1142 | 1088 int success, oldspl; 1089 u_short iobase; 1090 int num_ports, num_chan, num_aiops; 1091 int aiop, chan, port; 1092 int ChanStatus, line, i, count; 1093 unsigned int aiopio[MAX_AIOPS_PER_BOARD]; 1094 struct rp_port *rp; 1095 struct tty *tty; --- 38 unchanged lines hidden (view full) --- 1134 return; 1135 } 1136 bzero(tty, sizeof(struct tty) * num_ports); 1137 1138 oldspl = spltty(); 1139 rp_addr(unit) = rp; 1140 splx(oldspl); 1141 |
1143 rp_dev = makedev(CDEV_MAJOR, unit); 1144 cdevsw_add(&rp_dev, &rp_cdevsw, NULL); | 1142 cdevsw_add(&rp_cdevsw); |
1145 1146 port = 0; 1147 for(aiop=0; aiop < num_aiops; aiop++) { 1148 num_chan = sGetAiopNumChan(ctlp, aiop); 1149 for(chan=0; chan < num_chan; chan++, port++, rp++, tty++) { 1150 rp->rp_tty = tty; 1151 rp->rp_port = port; 1152 rp->rp_ctlp = ctlp; --- 38 unchanged lines hidden (view full) --- 1191 } 1192} 1193 1194static 1195int 1196rpattach(dev) 1197struct isa_device *dev; 1198{ | 1143 1144 port = 0; 1145 for(aiop=0; aiop < num_aiops; aiop++) { 1146 num_chan = sGetAiopNumChan(ctlp, aiop); 1147 for(chan=0; chan < num_chan; chan++, port++, rp++, tty++) { 1148 rp->rp_tty = tty; 1149 rp->rp_port = port; 1150 rp->rp_ctlp = ctlp; --- 38 unchanged lines hidden (view full) --- 1189 } 1190} 1191 1192static 1193int 1194rpattach(dev) 1195struct isa_device *dev; 1196{ |
1199 dev_t rp_dev; | |
1200 int iobase, unit, /*rpmajor,*/ oldspl; 1201 int num_ports, num_chan, num_aiops; 1202 int aiop, chan, port; 1203 int ChanStatus, line, i, count; 1204 unsigned int aiopio[MAX_AIOPS_PER_BOARD]; 1205 struct rp_port *rp; 1206 struct tty *tty; 1207 CONTROLLER_t *ctlp; --- 39 unchanged lines hidden (view full) --- 1247 return(0); 1248 } 1249 bzero(tty, sizeof(struct tty) * num_ports); 1250 1251 oldspl = spltty(); 1252 rp_addr(unit) = rp; 1253 splx(oldspl); 1254 | 1197 int iobase, unit, /*rpmajor,*/ oldspl; 1198 int num_ports, num_chan, num_aiops; 1199 int aiop, chan, port; 1200 int ChanStatus, line, i, count; 1201 unsigned int aiopio[MAX_AIOPS_PER_BOARD]; 1202 struct rp_port *rp; 1203 struct tty *tty; 1204 CONTROLLER_t *ctlp; --- 39 unchanged lines hidden (view full) --- 1244 return(0); 1245 } 1246 bzero(tty, sizeof(struct tty) * num_ports); 1247 1248 oldspl = spltty(); 1249 rp_addr(unit) = rp; 1250 splx(oldspl); 1251 |
1255 rp_dev = makedev(CDEV_MAJOR, unit); 1256 cdevsw_add(&rp_dev, &rp_cdevsw, NULL); | 1252 cdevsw_add(&rp_cdevsw); |
1257 1258 port = 0; 1259 for(aiop=0; aiop < num_aiops; aiop++) { 1260 num_chan = sGetAiopNumChan(ctlp, aiop); 1261 for(chan=0; chan < num_chan; chan++, port++, rp++, tty++) { 1262 rp->rp_tty = tty; 1263 rp->rp_port = port; 1264 rp->rp_ctlp = ctlp; --- 792 unchanged lines hidden --- | 1253 1254 port = 0; 1255 for(aiop=0; aiop < num_aiops; aiop++) { 1256 num_chan = sGetAiopNumChan(ctlp, aiop); 1257 for(chan=0; chan < num_chan; chan++, port++, rp++, tty++) { 1258 rp->rp_tty = tty; 1259 rp->rp_port = port; 1260 rp->rp_ctlp = ctlp; --- 792 unchanged lines hidden --- |