Otherwise poll() keeps on triggering on our fd until udev gets around to
notifying the server that the device is in some state of deadness. Meanwhile,
the input thread is busy filling the log up with "Read error" messages. Great
way to test file systems and their ability to handle out of space scenarios
but otherwise a bit pointless. Those FS developers should write their own
tests instead of relying on the synaptics driver!

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/eventcomm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index c69cb66..2cd8704 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -557,6 +557,7 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event 
*ev)
         if (rc != -EAGAIN) {
             LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", 
pInfo->name,
                     errno);
+            xf86RemoveEnabledDevice(pInfo);
         } else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC) {
             proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
             return SynapticsReadEvent(pInfo, ev);
-- 
2.14.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to