1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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.
This commit is contained in:
Bruce Evans 1999-06-04 18:53:47 +00:00
parent 216b6d2da0
commit e650b8f451
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47739
2 changed files with 4 additions and 14 deletions

View File

@ -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;
}

View File

@ -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;
}