All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: "Steven Noonan" <steven@uplinklabs.net>
Cc: "Justin Mattock" <justinmattock@gmail.com>,
	"Jiri Kosina" <jkosina@suse.cz>,
	"Sven Anders" <anders@anduras.de>,
	linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: Re: appletouch regression
Date: Sat, 18 Oct 2008 21:56:59 +0200	[thread overview]
Message-ID: <1224359819-15152-1-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <f488382f0810181134h24ed5da8lc12e62816436bb5@mail.gmail.com>

Steven Noonan wrote:
> On Sat, Oct 18, 2008 at 10:29 AM, Justin Mattock
> <justinmattock@gmail.com> wrote:
>> On Sat, Oct 18, 2008 at 9:44 AM, Steven Noonan <steven@uplinklabs.net> wrote:
>>> 2008/10/18 Sven Anders <anders@anduras.de>:
>>>> Steven Noonan schrieb:
>>>>> It seems that the appletouch driver is (sporadically) not detecting my
>>>>> Apple Trackpad anymore on Linus' current tree (2.6.27-05577-g0cfd810).
>>>>> When it is misbehaving, it doesn't have any /dev/input/event* entry
>>>>> that corresponds to the input from appletouch, and dmesg -should- show
>>>>> the following, as 2.6.27.1 does, but does not:
>>>>>
>>>>> appletouch: Geyser mode initialized.
>>>>> input: appletouch as /class/input/input4
>>>>> usbcore: registered new interface driver appletouch
>>>>> appletouch: 17" model detected
>>>>>
>>>>> On the current tree, occasionally all I get is:
>>>>>
>>>>> usbcore: registered new interface driver appletouch
[...]
> Any ideas, gentlemen?

Yeah, I see the problem. The device is grabbed by the hid bus and not
released even if apple driver says ENODEV (this is expected behaviour
and noted in the driver).

Could you try this patch? (Not ready for merge, it needs to be cleaned
up.)

---
 drivers/hid/hid-core.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8a7d9db..94cf1db 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1539,6 +1539,34 @@ static const struct hid_device_id hid_ignore_list[] = {
 	{ }
 };
 
+static const struct hid_device_id hid_mouse_ignore_list[] = {
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
+	{ }
+};
+
+#include <linux/usb.h>
+
 static bool hid_ignore(struct hid_device *hdev)
 {
 	switch (hdev->vendor) {
@@ -1555,6 +1583,12 @@ static bool hid_ignore(struct hid_device *hdev)
 		break;
 	}
 
+	if (hdev->bus == BUS_USB && to_usb_interface(hdev->dev.parent)->
+			cur_altsetting->desc.bInterfaceProtocol ==
+			USB_INTERFACE_PROTOCOL_MOUSE &&
+			hid_match_id(hdev, hid_mouse_ignore_list))
+		return true;
+
 	return !!hid_match_id(hdev, hid_ignore_list);
 }
 
-- 
1.6.0.2


  reply	other threads:[~2008-10-18 19:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-18 12:52 appletouch regression Steven Noonan
2008-10-18 13:34 ` Sven Anders
2008-10-18 16:44   ` Steven Noonan
2008-10-18 17:29     ` Justin Mattock
2008-10-18 18:34       ` Steven Noonan
2008-10-18 19:56         ` Jiri Slaby [this message]
2008-10-18 20:32           ` Justin Mattock
2008-10-18 20:44             ` Steven Noonan
2008-10-18 22:52           ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224359819-15152-1-git-send-email-jirislaby@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=anders@anduras.de \
    --cc=jkosina@suse.cz \
    --cc=justinmattock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steven@uplinklabs.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.