On Wed, Aug 19, 2009 at 07:00:48PM +0200, Aurelien Jarno wrote:
> On Wed, Aug 19, 2009 at 02:38:08PM +0200, Aurelien Jarno wrote:
> > On Thu, Aug 13, 2009 at 11:50:11PM +0200, Aurelien Jarno wrote:
> > > - You have to drop the same kind of file for the mouse (see attached
> > >   file 10-x11-input-mouse.fdi) to /etc/hal/fdi/policy. I haven't
> > >   reported the bug to the BTS, as it don't fully work here. While the
> > >   mouse is detected correctly, the cursor doesn't move.
> > 
> > It seems to work with an USB mouse, but I still haven't manage to solve
> > the issue with a PS/2 mouse.
> 
> Actually PS/2 mice work well with a 7.1 kernel, but not with a 7.2 one.
> The old version of Xorg from debian-ports works with both 7.1 and 7.2 
> kernels.
> 

Continuing my monologue, I have found that *reverting* the following
patch fixes or workaround the problem. But doing so may also hide a
problem elsewhere. Any idea?


------------------------------------------------------------------------
r189870 | rnoland | 2009-03-16 09:21:51 +0100 (lun. 16 mars 2009) | 6 lignes

Teach psm about O_ASYNC

This makes Xorg happy if you aren't using moused.

MFC after:      3 days

Index: sys/dev/atkbdc/psm.c
===================================================================
--- sys/dev/atkbdc/psm.c        (.../7.1.0/sys/dev/atkbdc)      (révision 
196387)
+++ sys/dev/atkbdc/psm.c        (.../7.2.0/sys/dev/atkbdc)      (révision 
196387)
@@ -70,7 +70,10 @@
 #include <sys/module.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
+#include <sys/filio.h>
 #include <sys/poll.h>
+#include <sys/sigio.h>
+#include <sys/signalvar.h>
 #include <sys/syslog.h>
 #include <machine/bus.h>
 #include <sys/rman.h>
@@ -212,6 +215,7 @@
        struct cdev     *bdev;
        int             lasterr;
        int             cmdcount;
+       struct sigio    *async;         /* Processes waiting for SIGIO */
 };
 static devclass_t psm_devclass;
 #define        PSM_SOFTC(unit) \
@@ -1383,6 +1387,7 @@
        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;
@@ -1522,6 +1527,12 @@
        /* 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);
@@ -2083,6 +2094,15 @@
                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);
        }
@@ -2972,6 +2992,9 @@
                wakeup(sc);
        }
        selwakeuppri(&sc->rsel, PZERO);
+       if (sc->async != NULL) {
+               pgsigio(&sc->async, SIGIO, 0);
+       }
        sc->state &= ~PSM_SOFTARMED;
        splx(s);
 }


-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to