|
|
553148 |
From 9f3a6ac97e9d3f13cdfb38e54fbce92452025830 Mon Sep 17 00:00:00 2001
|
|
|
553148 |
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
553148 |
Date: Mon, 14 May 2018 09:49:00 +1000
|
|
|
553148 |
Subject: [PATCH synaptics] eventcomm: if we get a read error other than
|
|
|
553148 |
EAGAIN, remove the fd
|
|
|
553148 |
|
|
|
553148 |
Otherwise poll() keeps on triggering on our fd until udev gets around to
|
|
|
553148 |
notifying the server that the device is in some state of deadness. Meanwhile,
|
|
|
553148 |
the input thread is busy filling the log up with "Read error" messages. Great
|
|
|
553148 |
way to test file systems and their capacity to handle out of space scenarios
|
|
|
553148 |
but otherwise a bit pointless. Those FS developers should write their own
|
|
|
553148 |
tests instead of relying on the synaptics driver!
|
|
|
553148 |
|
|
|
553148 |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
553148 |
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
|
553148 |
---
|
|
|
553148 |
src/eventcomm.c | 1 +
|
|
|
553148 |
1 file changed, 1 insertion(+)
|
|
|
553148 |
|
|
|
553148 |
diff --git a/src/eventcomm.c b/src/eventcomm.c
|
|
|
553148 |
index f65d532..3d0c5b0 100644
|
|
|
553148 |
--- a/src/eventcomm.c
|
|
|
553148 |
+++ b/src/eventcomm.c
|
|
|
553148 |
@@ -557,6 +557,7 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev)
|
|
|
553148 |
if (rc != -EAGAIN) {
|
|
|
553148 |
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name,
|
|
|
553148 |
errno);
|
|
|
553148 |
+ xf86RemoveEnabledDevice(pInfo);
|
|
|
553148 |
} else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC) {
|
|
|
553148 |
proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
|
|
|
553148 |
return SynapticsReadEvent(pInfo, ev);
|
|
|
553148 |
--
|
|
|
553148 |
2.14.3
|
|
|
553148 |
|