[PATCH] Re-open devices on read error.
Peter Hutterer
peter.hutterer at who-t.net
Tue Aug 26 21:37:35 PDT 2008
Coming back from resume may leave us with an invalid file descriptor and a
dead device.
Affected by this is any evdev device specified in the xorg.conf.
Devices added through HAL are not affected.
The attached patches do the following:
Patch 0001-Attempt-to-re-open-devices-on-read-errors.patch
- if ENODEV occurs on the fd, try to reopen the device file.
- keep repeating up to ReopenAttempts or success.
For more fun, the fd may be still be valid during DEVICE_ON and then become
invalid by the time we hit ReadInput.
Patch 0002-Cache-device-information-and-compare-against-info-af.patch
- cache ioctl information during PreInit
- if reopen succeeds, compare new ioctl with cached one. If it is different,
the device topology has changed. Disable the device.
Review would be appreciated.
Cheers,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Attempt-to-re-open-devices-on-read-errors.patch
Type: text/x-diff
Size: 8030 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080827/ee87a23a/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Cache-device-information-and-compare-against-info-af.patch
Type: text/x-diff
Size: 6776 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080827/ee87a23a/attachment-0001.patch>
More information about the xorg
mailing list