Deleted Added
full compact
rc.c (12080) rc.c (12502)
1/*
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

53
54#include <i386/isa/isa.h>
55#include <i386/isa/isa_device.h>
56#include <i386/isa/sioreg.h>
57
58#include <i386/isa/ic/cd180.h>
59#include <i386/isa/rcreg.h>
60
1/*
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

53
54#include <i386/isa/isa.h>
55#include <i386/isa/isa_device.h>
56#include <i386/isa/sioreg.h>
57
58#include <i386/isa/ic/cd180.h>
59#include <i386/isa/rcreg.h>
60
61#ifdef JREMOD
62#include <sys/conf.h>
63#define CDEV_MAJOR 63
64static void rc_devsw_install();
65#endif /*JREMOD*/
66
61/* Prototypes */
62int rcprobe __P((struct isa_device *));
63int rcattach __P((struct isa_device *));
64
65/*-
66 * This space intentionally left blank to stop __LINE__ from screwing up
67 * regression tests :-(.
68 *

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

272 tp->t_cflag = TTYDEF_CFLAG;
273 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
274 }
275 rcb->rcb_probed = RC_ATTACHED;
276 if (!rc_wakeup_started) {
277 rc_wakeup((void *)NULL);
278 rc_wakeup_started = 0;
279 }
67/* Prototypes */
68int rcprobe __P((struct isa_device *));
69int rcattach __P((struct isa_device *));
70
71/*-
72 * This space intentionally left blank to stop __LINE__ from screwing up
73 * regression tests :-(.
74 *

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

278 tp->t_cflag = TTYDEF_CFLAG;
279 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
280 }
281 rcb->rcb_probed = RC_ATTACHED;
282 if (!rc_wakeup_started) {
283 rc_wakeup((void *)NULL);
284 rc_wakeup_started = 0;
285 }
286#ifdef JREMOD
287 rc_devsw_install();
288#endif /*JREMOD*/
289
280 return 1;
281}
282
283/* RC interrupt handling */
284void rcintr(unit)
285 int unit;
286{
287 register struct rc_softc *rcb = &rc_softc[unit];

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

1487 int rcnt;
1488
1489 for (rcnt = 100; rcnt && rcin(CD180_CCR); rcnt--)
1490 DELAY(15);
1491 if (rcnt == 0)
1492 printf("rc%d/%d: channel command timeout, rc.c line: %d\n",
1493 unit, chan, line);
1494}
290 return 1;
291}
292
293/* RC interrupt handling */
294void rcintr(unit)
295 int unit;
296{
297 register struct rc_softc *rcb = &rc_softc[unit];

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

1497 int rcnt;
1498
1499 for (rcnt = 100; rcnt && rcin(CD180_CCR); rcnt--)
1500 DELAY(15);
1501 if (rcnt == 0)
1502 printf("rc%d/%d: channel command timeout, rc.c line: %d\n",
1503 unit, chan, line);
1504}
1505
1506#ifdef JREMOD
1507struct cdevsw rc_cdevsw =
1508 { rcopen, rcclose, rcread, rcwrite, /*63*/
1509 rcioctl, rcstop, nxreset, rcdevtotty,/* rc */
1510 ttselect, nommap, NULL };
1511
1512static rc_devsw_installed = 0;
1513
1514static void rc_devsw_install()
1515{
1516 dev_t descript;
1517 if( ! rc_devsw_installed ) {
1518 descript = makedev(CDEV_MAJOR,0);
1519 cdevsw_add(&descript,&rc_cdevsw,NULL);
1520#if defined(BDEV_MAJOR)
1521 descript = makedev(BDEV_MAJOR,0);
1522 bdevsw_add(&descript,&rc_bdevsw,NULL);
1523#endif /*BDEV_MAJOR*/
1524 rc_devsw_installed = 1;
1525 }
1526}
1527#endif /* JREMOD */
1495#endif /* NRC */
1528#endif /* NRC */