This patch fixes PS/2 mouse support with xserver-xorg-input-mouse 1.4.0. It is a revert of upstream commit r18970: | Teach psm about O_ASYNC | | This makes Xorg happy if you aren't using moused. --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -70,10 +70,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -297,7 +294,6 @@ struct cdev *bdev; int lasterr; int cmdcount; - struct sigio *async; /* Processes waiting for SIGIO */ }; static devclass_t psm_devclass; @@ -1518,7 +1514,6 @@ sc->mode.level = sc->dflt_mode.level; sc->mode.protocol = sc->dflt_mode.protocol; sc->watchdog = FALSE; - sc->async = NULL; /* flush the event queue */ sc->queue.count = 0; @@ -1660,12 +1655,6 @@ /* remove anything left in the output buffer */ empty_aux_buffer(sc->kbdc, 10); - /* clean up and sigio requests */ - if (sc->async != NULL) { - funsetown(&sc->async); - sc->async = NULL; - } - /* close is almost always successful */ sc->state &= ~PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); @@ -2227,15 +2216,6 @@ break; #endif /* MOUSE_GETHWID */ - case FIONBIO: - case FIOASYNC: - break; - case FIOSETOWN: - error = fsetown(*(int *)addr, &sc->async); - break; - case FIOGETOWN: - *(int *) addr = fgetown(&sc->async); - break; default: return (ENOTTY); } @@ -3502,9 +3482,6 @@ wakeup(sc); } selwakeuppri(&sc->rsel, PZERO); - if (sc->async != NULL) { - pgsigio(&sc->async, SIGIO, 0); - } sc->state &= ~PSM_SOFTARMED; splx(s); }