RE: [PATCH] [xorg/xserver] config: handle device change event properly
Hi, -Original Message- From: ext Peter Hutterer [mailto:peter.hutte...@who-t.net] Sent: 21 March, 2011 01:16 To: Erkki Seppälä Cc: xorg-devel@lists.x.org; Kost Stefan (Nokia-MS/Helsinki) Subject: Re: [PATCH] [xorg/xserver] config: handle device change event properly On Fri, Mar 18, 2011 at 04:35:36PM +0200, Erkki Seppälä wrote: wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä erkki.sepp...@vincit.fi Signed-off-by: Stefan Kost stefan.k...@nokia.com --- Stefan, please ask a proper Reported-by tag for the bug from the original reporter. config/udev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config/udev.c b/config/udev.c index a2f5710..c120747 100644 --- a/config/udev.c +++ b/config/udev.c @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, remove)) device_removed(udev_device); +else if (!strcmp(action, change)) { +device_removed(udev_device); +device_added(udev_device); +} } udev_device_unref(udev_device); } -- 1.7.0.4 merged, thank you. Cheers, Peter Out of curiosity, is it done in a specific branch? I can (yet) see in on http://cgit.freedesktop.org/xorg/xserver/log/ xorg master. Stefan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] [xorg/xserver] config: handle device change event properly
On 24/03/11 19:38 , stefan.k...@nokia.com wrote: Hi, -Original Message- From: ext Peter Hutterer [mailto:peter.hutte...@who-t.net] Sent: 21 March, 2011 01:16 To: Erkki Seppälä Cc: xorg-devel@lists.x.org; Kost Stefan (Nokia-MS/Helsinki) Subject: Re: [PATCH] [xorg/xserver] config: handle device change event properly On Fri, Mar 18, 2011 at 04:35:36PM +0200, Erkki Seppälä wrote: wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppäläerkki.sepp...@vincit.fi Signed-off-by: Stefan Koststefan.k...@nokia.com --- Stefan, please ask a proper Reported-by tag for the bug from the original reporter. config/udev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config/udev.c b/config/udev.c index a2f5710..c120747 100644 --- a/config/udev.c +++ b/config/udev.c @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, remove)) device_removed(udev_device); +else if (!strcmp(action, change)) { +device_removed(udev_device); +device_added(udev_device); +} } udev_device_unref(udev_device); } -- 1.7.0.4 merged, thank you. Cheers, Peter Out of curiosity, is it done in a specific branch? I can (yet) see in on http://cgit.freedesktop.org/xorg/xserver/log/ xorg master. it's on git://people.freedesktop.org/~whot/xserver.git for-keith but i forgot to send the pull request today, will do tomorrow. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] [xorg/xserver] config: handle device change event properly
On Fri, Mar 18, 2011 at 04:35:36PM +0200, Erkki Seppälä wrote: wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä erkki.sepp...@vincit.fi Signed-off-by: Stefan Kost stefan.k...@nokia.com --- Stefan, please ask a proper Reported-by tag for the bug from the original reporter. config/udev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config/udev.c b/config/udev.c index a2f5710..c120747 100644 --- a/config/udev.c +++ b/config/udev.c @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, remove)) device_removed(udev_device); +else if (!strcmp(action, change)) { +device_removed(udev_device); +device_added(udev_device); +} } udev_device_unref(udev_device); } -- 1.7.0.4 merged, thank you. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] [xorg/xserver] config: handle device change event properly
2011/3/18 Erkki Seppälä erkki.sepp...@vincit.fi: wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä erkki.sepp...@vincit.fi Signed-off-by: Stefan Kost stefan.k...@nokia.com --- Stefan, please ask a proper Reported-by tag for the bug from the original reporter. config/udev.c | 4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config/udev.c b/config/udev.c index a2f5710..c120747 100644 --- a/config/udev.c +++ b/config/udev.c @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, remove)) device_removed(udev_device); + else if (!strcmp(action, change)) { + device_removed(udev_device); + device_added(udev_device); + } } udev_device_unref(udev_device); } Just wanted to say that I agree that this patch is needed, but it is an awfully big hammer. It would be nice if we could pass this information through to the driver, but I'm not sure how that would work. Anyway, Reviewed-by: Dan Nicholson dbn.li...@gmail.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] [xorg/xserver] config: handle device change event properly
wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä erkki.sepp...@vincit.fi Signed-off-by: Stefan Kost stefan.k...@nokia.com --- Stefan, please ask a proper Reported-by tag for the bug from the original reporter. config/udev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config/udev.c b/config/udev.c index a2f5710..c120747 100644 --- a/config/udev.c +++ b/config/udev.c @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, remove)) device_removed(udev_device); +else if (!strcmp(action, change)) { +device_removed(udev_device); +device_added(udev_device); +} } udev_device_unref(udev_device); } -- 1.7.0.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel