Re: Race with Bluetooth hid drivers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-09-20 at 11:00 +0200, David Herrmann wrote:
> Hi Bastien
> 
> On Tue, Sep 20, 2011 at 3:35 AM, Bastien Nocera <hadess@xxxxxxxxxx> wrote:
> > Heya,
> >
> > I'm pretty certain that's already been discussed, but can't seem to find
> > the thread in question, or whether somebody sent patches for the issue.
> >
> > The problem I see is that the input device is advertised really early in
> > its creation, and seems to be missing information when udev (and layers
> > above it in the stack) probes it.
<snip>
> The hid-wacom.c driver should probably use the input_mapped() callback
> instead of setting the input flags in wacom_probe(). input_mapped() is
> called for every descriptor field so there must at least be one valid
> field to make it work. I don't have the device so I can't test it, but
> try something like this:
> 
> From 2f91a998b1bca4b654903e41394fae19dfed1a3c Mon Sep 17 00:00:00 2001
> From: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx>
> Date: Tue, 20 Sep 2011 10:54:06 +0200
> Subject: [PATCH] HID: wacom: Set input bits before registration
> 
> We shouldn't change the event flags of input devices after they get registered.
> Otherwise, udev will not get notified of these flags and cannot setup the
> devices properly.
> This fixes the probing to set the input event flags on the input_mapped callback
> instead of the probe function.
> 
> Reported-by: Bastien Nocera <hadess@xxxxxxxxxx>
> Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx>

Works beautifully.
Tested-by: Bastien Nocera <hadess@xxxxxxxxxx>

Jiri, Dmitry, feel free to add a
Signed-off-by: Bastien Nocera <hadess@xxxxxxxxxx>
if you think this is the right fix for the problem.

/Bastien, can't even fix his own driver

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux