summaryrefslogtreecommitdiffstats
path: root/sys/dev/rc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-06-04 18:53:47 +0000
committerbde <bde@FreeBSD.org>1999-06-04 18:53:47 +0000
commit8e183f96d3b047bc215bdede636b1eecd6a044ac (patch)
tree3dc3842d3e5bbc9ee3efe27dc5f8c9e3f16d14f3 /sys/dev/rc
parent2906737cf248c4a0aef37bddec86e73fb4c52108 (diff)
downloadFreeBSD-src-8e183f96d3b047bc215bdede636b1eecd6a044ac.zip
FreeBSD-src-8e183f96d3b047bc215bdede636b1eecd6a044ac.tar.gz
Fixed null setting of `rc_started'. This was fixed for the
corresponding variable `rc_wakeup_started' in rev.1.36 but broken again in rev.1.37. This bug only caused excessive polling (it gave NRC activations for each of the SWI handler and the timeout handler instead of 1 of each). Moved cdevsw attachment from the driver probe routine to the driver attach routine.
Diffstat (limited to 'sys/dev/rc')
-rw-r--r--sys/dev/rc/rc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 8e0fdc5..78b94f2 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -33,7 +33,6 @@
#include "rc.h"
#if NRC > 0
-
#include "opt_devfs.h"
/*#define RCDEBUG*/
@@ -59,7 +58,6 @@
#include <i386/isa/ic/cd180.h>
#include <i386/isa/rcreg.h>
-
/* Prototypes */
static int rcprobe __P((struct isa_device *));
static int rcattach __P((struct isa_device *));
@@ -213,10 +211,6 @@ rcprobe(dvp)
{
int irq = ffs(dvp->id_irq) - 1;
register int nec = dvp->id_iobase;
- static int once;
-
- if (!once++)
- cdevsw_add(&rc_cdevsw);
if (dvp->id_unit > NRC)
return 0;
@@ -291,9 +285,10 @@ rcattach(dvp)
}
rcb->rcb_probed = RC_ATTACHED;
if (!rc_started) {
+ cdevsw_add(&rc_cdevsw);
register_swi(SWI_TTY, rcpoll);
rc_wakeup((void *)NULL);
- rc_started = 0;
+ rc_started = 1;
}
return 1;
}
OpenPOWER on IntegriCloud