Re: [patch 41/47] bluetooth hid: enable quirk handling for AppleWireless Keyboards in 2.6.27

From: Torsten Rausche
Date: Mon Feb 16 2009 - 12:48:55 EST


Jan Scholz writes:
> A very similar fix has been proposed by Paul Collins (see
> http://lkml.org/lkml/2008/6/14/26 ) a while ago.

Good catch, did not see that. This is essentially the same fix. One more
reason to let it go in.

> Here on my ppc32 G4 it works only if I apply the following as well.
> I can't test it on x86, though.
>
> Jan Scholz
>
> --
> removed 2 calls to le16_to_cpu from the bluetooth hid quirks
>
> seems we're doing some endianness conversion one time to much
>
> diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
> index 28dc035..6b95a6d 100644
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -699,8 +699,8 @@ static void hidp_setup_quirks(struct hid_device *hid)
> unsigned int n;
>
> for (n = 0; hidp_blacklist[n].idVendor; n++)
> - if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) &&
> - hidp_blacklist[n].idProduct == le16_to_cpu(hid->product))
> + if (hidp_blacklist[n].idVendor == hid->vendor &&
> + hidp_blacklist[n].idProduct == hid->product)
> hid->quirks = hidp_blacklist[n].quirks;
> }

Well, then the wireless Mighty Mouse should never have worked on ppc. I
just tested these changes on my x86_64 box and the keyboard still works
fine.

Actually this is a fix for just another problem. Should these patches be
combined? How is this handled? I am not familiar with this process.

Torsten


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