lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zlp6g7p8.fsf@scholz.fias.uni-frankfurt.de>
Date:	Fri, 27 Jun 2008 18:32:03 +0200
From:	Jan Scholz <scholz@...s.uni-frankfurt.de>
To:	paul@...ly.ondioline.org
Cc:	marcel@...tmann.org, jkosina@...e.cz, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RESEND] fix HID quirks for aluminium apple wireless keyboards

Hi Paul,

I applied your patch from http://lkml.org/lkml/2008/6/14/26 but
without HID_QUIRK_APPLE_NUMLOCK_EMULATION to v2.6.25, but on my G4-ppc
iBook the quirk is not found by hidp_setup_quirks.
If I remove the calls to le16_to_cpu from that function it
works on my ppc, looks like some endianness issue, see the second patch. 


diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 519cdb9..f96fb6e 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -676,6 +676,12 @@ static const struct {
 	__u16 idProduct;
 	unsigned quirks;
 } hidp_blacklist[] = {
+	/* Apple Wireless Keyboard, ANSI layout */
+	{ 0x05ac, 0x022c, HID_QUIRK_APPLE_HAS_FN },
+	/* Apple Wireless Keyboard, ISO layout */
+	{ 0x05ac, 0x022d, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
+	/* Apple Wireless Keyboard, JIS layout */
+	{ 0x05ac, 0x022e, HID_QUIRK_APPLE_HAS_FN },
 	/* Apple wireless Mighty Mouse */
 	{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
 


diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index f96fb6e..46f5958 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -693,8 +693,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;
 }
 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ