tech-misc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PPS broken in 7.1 - missing interrupt enable in com.c
> I setup an amd64 7.1 system, and built a kernel with PPS_SYNC.
> It gave data, but was off by hundreds of ms with lots of
> jitter.
>
> I guessed that it was not getting an interrupt on the PPS event
> but was processing the event when it got an recv interrupt. I
> hacked comopen in com.c to turn on IER_EMSC and things started
> to work sensibly.
comopen() in sys/dev/ic/com.c already contains this section, both
in 7.0 and 8.0:
/* Turn on interrupts. */
sc->sc_ier = IER_ERXRDY | IER_ERLS;
if (!ISSET(tp->t_cflag, CLOCAL))
sc->sc_ier |= IER_EMSC;
So if the "clocal" flag is set on the tty before you open it, you
won't get interrups on modem control signal change, which sort of
makes sense. So what are the flags on the com port you use
before you open it? (e.g. "stty -a </dev/tty00") Worth checking
is also if /etc/ttys mentions the "local" flag for your tty line;
ttyflags(8) which is run on startup will set flags accordingly.
> I don't see a similar fix in current. (But maybe I didn't look
> in the right place.)
>
> Does anybody know if PPS works in 8 or current?
I can't answer that directly, but I know it works reasonably well
in 7.0, and I would be surprised if 7.1 is any different at this
basic level. In my case I use serial ports on a PCI card, and
not com0, though, so that may be different to what you have, but
AFAIK it's still the com.c driver.
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index