Re: [Bug #10825] appletouch after wakeup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oliver Neukum
Date: Monday, June 9, 2008 - 2:16 pm

Am Montag 09 Juni 2008 22:52:21 schrieb Justin Mattock:

Didn't I mail it to you? Anyway, here it is.

	Regards
		Oliver

----

--- linux-2.6.26-rc5/drivers/usb/core/quirks.c	2008-06-05 13:45:57.000000000 +0200
+++ linux-2.6.26-rc5-btusb/drivers/usb/core/quirks.c	2008-06-06 08:12:10.000000000 +0200
@@ -47,6 +47,9 @@ static const struct usb_device_id usb_qu
 	/* Edirol SD-20 */
 	{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },
 
+	/* appletouch */
+	{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
+
 	/* Avision AV600U */
 	{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
 	  USB_QUIRK_STRING_FETCH_255 },
--- linux-2.6.26-rc5-btusb/drivers/input/mouse/appletouch.c.alt	2008-06-09 10:40:00.000000000 +0200
+++ linux-2.6.26-rc5-btusb/drivers/input/mouse/appletouch.c	2008-06-09 10:40:03.000000000 +0200
@@ -589,6 +589,20 @@ static void atp_close(struct input_dev *
 	dev->open = 0;
 }
 
+static int handle_geyser(struct atp *dev)
+{
+	struct usb_device *udev = dev->udev;
+
+	if (!atp_is_fountain(dev)) {
+		/* switch to raw sensor mode */
+		if (atp_geyser_init(udev))
+			return -EIO;
+
+		printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
+	}
+	return 0;
+}
+
 static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id)
 {
 	struct atp *dev;
@@ -744,6 +758,20 @@ static void atp_disconnect(struct usb_in
 	printk(KERN_INFO "input: appletouch disconnected\n");
 }
 
+static int recover_dev(struct atp *dev)
+{
+	int rv;
+
+	rv = handle_geyser(dev);
+	if (rv < 0)
+		return rv;
+
+	if (dev->open && usb_submit_urb(dev->urb, GFP_NOIO))
+		return -EIO;
+
+	return 0;	
+}
+
 static int atp_suspend(struct usb_interface *iface, pm_message_t message)
 {
 	struct atp *dev = usb_get_intfdata(iface);
@@ -764,12 +792,20 @@ static int atp_resume(struct usb_interfa
 	return 0;
 }
 
+static int atp_reset_resume(struct usb_interface *iface)
+{
+	struct atp *dev = usb_get_intfdata(iface);
+
+	return recover_dev(dev);
+}
+
 static struct usb_driver atp_driver = {
 	.name		= "appletouch",
 	.probe		= atp_probe,
 	.disconnect	= atp_disconnect,
 	.suspend	= atp_suspend,
 	.resume		= atp_resume,
+	.reset_resume	= atp_reset_resume,
 	.id_table	= atp_table,
 };
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.26-rc5-git2: Reported regressions from 2.6.25, Rafael J. Wysocki, (Sat Jun 7, 1:38 pm)
[Bug #10493] mips BCM47XX compile error, Rafael J. Wysocki, (Sat Jun 7, 1:38 pm)
[Bug #10764] some serial configurations are now broken, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10748] dhclient fails to run; capabilities error, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10741] bug in `tty: BKL pushdown'?, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10726] x86-64 NODES_SHIFT compile failure., Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10724] ACPI: EC: GPE storm detected, disabling EC GPE, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10725] Write protect on on, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10714] Badness seen on 2.6.26-rc2 with lockdep enabled, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10616] Horrendous Audio Stutter - current git, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #9791] Clock is running too fast^Wslow using acpi_pm ..., Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10861] 2.6.26-rc4-git2 - long pause during boot, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10872] x86_64 boot hang when CONFIG_NUMA=n, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10874] blackfin drivers/net/smc91x.c build error, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10873] serial/bfin_5xx.c build error, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10864] [regression][bisected] ~90,000 wakeups as of ..., Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10863] kvm causing memory corruption? now 2.6.26-rc4, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10862] forcedeth: lockdep warning on ethtool -s, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10860] total system freeze at boot with 2.6.26-rc, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10830] two different oopses with 2.6.26-rc4, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10823] stuck localhost TCP connections, v2.6.26-rc3+, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10827] 2.6.26rc4 GFS2 oops., Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10826] NFS oops in 2.6.26rc4, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10825] appletouch after wakeup, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10819] Fatal DMA error with b43 driver since 2.6.26, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10821] rt25xx: lock dependancy warning, association ..., Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10816] vt/fbcon: fix background color on line feed, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10799] sky2 general protection fault, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10794] mips: CONF_CM_DEFAULT build error, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10787] pcie hotplug bootup crash fix, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
[Bug #10786] 2.6.26-rc3 64bit SMP does not boot on J5600, Rafael J. Wysocki, (Sat Jun 7, 1:42 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Sat Jun 7, 3:54 pm)
Re: [Bug #10816] vt/fbcon: fix background color on line feed, Rafael J. Wysocki, (Sun Jun 8, 9:52 am)
Re: [Bug #10825] appletouch after wakeup, Rafael J. Wysocki, (Sun Jun 8, 9:53 am)
Re: [Bug #10860] total system freeze at boot with 2.6.26-rc, Rafael J. Wysocki, (Sun Jun 8, 9:58 am)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Sun Jun 8, 11:26 am)
Re: [Bug #10787] pcie hotplug bootup crash fix, Kenji Kaneshige, (Mon Jun 9, 1:22 am)
Re: [Bug #10825] appletouch after wakeup, Oliver Neukum, (Mon Jun 9, 2:07 am)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 9:18 am)
Re: [Bug #10825] appletouch after wakeup, Oliver Neukum, (Mon Jun 9, 12:53 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 1:29 pm)
Re: [Bug #10825] appletouch after wakeup, Oliver Neukum, (Mon Jun 9, 1:31 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 1:52 pm)
Re: [Bug #10825] appletouch after wakeup, Oliver Neukum, (Mon Jun 9, 2:16 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 3:04 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 3:36 pm)
Re: [Bug #10825] appletouch after wakeup, Oliver Neukum, (Mon Jun 9, 3:40 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 5:03 pm)
Re: [Bug #10825] appletouch after wakeup, Jiri Kosina, (Mon Jun 9, 5:06 pm)
Re: [Bug #10825] appletouch after wakeup, Justin Mattock, (Mon Jun 9, 6:11 pm)
Re: [Bug #10493] mips BCM47XX compile error, Adrian Bunk, (Wed Jun 11, 9:17 am)
Re: [Bug #10794] mips: CONF_CM_DEFAULT build error, Adrian Bunk, (Wed Jun 11, 11:51 am)
Re: [Bug #10872] x86_64 boot hang when CONFIG_NUMA=n, Randy Dunlap, (Wed Jun 11, 1:30 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Adrian Bunk, (Fri Jun 13, 6:52 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sat Jun 14, 7:42 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Oleg Nesterov, (Sat Jun 14, 7:58 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sat Jun 14, 11:12 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Sat Jun 14, 12:43 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sat Jun 14, 8:30 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Sun Jun 15, 9:21 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sun Jun 15, 11:17 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Linus Torvalds, (Sun Jun 15, 1:32 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sun Jun 15, 4:26 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sun Jun 15, 4:27 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Linus Torvalds, (Sun Jun 15, 4:38 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Sun Jun 15, 8:01 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Sun Jun 15, 8:31 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Sun Jun 15, 8:46 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Vegard Nossum, (Mon Jun 16, 6:53 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Mon Jun 16, 8:42 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Alexey Dobriyan, (Mon Jun 23, 5:50 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Linus Torvalds, (Mon Jun 23, 6:31 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Nick Piggin, (Mon Jun 23, 6:51 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Tue Jun 24, 5:04 am)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Tue Jun 24, 2:08 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Ingo Molnar, (Tue Jun 24, 2:15 pm)
Re: [Bug #10815] 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0, Paul E. McKenney, (Wed Jun 25, 2:04 am)