From 41941cb9e2365b27196805c22424dc9ad694806f Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 28 Apr 2007 04:55:26 +0200 Subject: [PATCH] Re-probe on device not found on input if auto-dev is active. If USBReadInput() fails because the device is not being found, and auto-dev is active, try re-probing for the device. The only downside of this procedure is that the log may get spammed a lot as long as no device can be found. --- src/acecad.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acecad.c b/src/acecad.c index cf8489f..8737635 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -833,6 +833,10 @@ USBReadInput (LocalDevicePtr local) if (len <= 0) { xf86Msg(X_ERROR, "%s: error reading device: %s\n", local->name, strerror(errno)); + if ((errno == ENODEV) && priv->acecadAutoDev && AceCadAutoDevProbe(local)) { + DeviceOff(local->dev); + DeviceOn(local->dev); + } return; } -- 2.32.0.93.g670b81a890