Disable "1284" device recognition early to work around

a misfeature in the mode switching / 1284 code.
(It refuses to switch the port mode to eg "PS2"
sometimes if no device speaking the PnP protocol
is connected. Should be fixed elsewhere, but this
is a can of worms.)
This commit is contained in:
drochner 2006-05-10 10:33:40 +00:00
parent f4f8d2a3de
commit fa6adb2a78

View File

@ -1,4 +1,4 @@
/* $NetBSD: pps_ppbus.c,v 1.5 2006/03/29 17:23:56 thorpej Exp $ */
/* $NetBSD: pps_ppbus.c,v 1.6 2006/05/10 10:33:40 drochner Exp $ */
/*
* Copyright (c) 2004
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pps_ppbus.c,v 1.5 2006/03/29 17:23:56 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pps_ppbus.c,v 1.6 2006/05/10 10:33:40 drochner Exp $");
#include "opt_ntp.h"
@ -98,7 +98,7 @@ static int
ppsopen(dev_t dev, int flags, int fmt, struct lwp *l)
{
struct pps_softc *sc;
int res;
int res, weg = 0;
sc = device_lookup(&pps_cd, minor(dev));
if (!sc)
@ -111,6 +111,8 @@ ppsopen(dev_t dev, int flags, int fmt, struct lwp *l)
PPBUS_WAIT|PPBUS_INTR, 0))
return (EINTR);
ppbus_write_ivar(sc->ppbus, PPBUS_IVAR_IEEE, &weg);
/* attach the interrupt handler */
/* XXX priority should be set here */
res = ppbus_add_handler(sc->ppbus, ppsintr, sc);