From: mpi Date: Fri, 25 Apr 2014 10:33:36 +0000 (+0000) Subject: Do no reprobe for a supported protocol when enabling a pointing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b72aedf16434324b73a588d49391e68af84702b1;p=openbsd Do no reprobe for a supported protocol when enabling a pointing device of type PMS_STANDARD, probing during autoconf(9) is enough!. In such case, the device can be a simple PS/2 mouse, a unsupported touchpad or a downgraded touchpad if something bad happened. But it is very unlikely that reprobing will improve the situation and transform a standard mouse into a multitouch-aware touchpad ;) This fixes the 12 seconds delay seen on various Dell laptops (E4310 and Latitude D630) when starting Xorg, reported by Kārlis Miķelsons on bugs@. ok stsp@, dcoppa@, shadchin@ --- diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index af1b9087357..4a6de176166 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.49 2013/10/30 18:00:56 shadchin Exp $ */ +/* $OpenBSD: pms.c,v 1.50 2014/04/25 10:33:36 mpi Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -735,7 +735,7 @@ pms_change_state(struct pms_softc *sc, int newstate, int dev) pckbc_flush(sc->sc_kbctag, PCKBC_AUX_SLOT); pms_reset(sc); - if (sc->protocol->type == PMS_STANDARD || + if (sc->protocol->enable != NULL && sc->protocol->enable(sc) == 0) pms_protocol_lookup(sc);