All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20170713001424.GA7990@dtor-ws>

diff --git a/a/1.txt b/N1/1.txt
index a2051ac..ac37785 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -2,10 +2,10 @@ Even though the IO for devices with "always poll" quirk is already running,
 we still need to set HID_OPENED bit in usbhid->iofl so the interrupt
 handler does not ignore the data coming from the device.
 
-Reported-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
-Tested-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
+Reported-by: Olof Johansson <olof@lixom.net>
+Tested-by: Olof Johansson <olof@lixom.net>
 Fixes: e399396a6b0 ("HID: usbhid: remove custom locking from usbhid_open...")
-Signed-off-by: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
 ---
  drivers/hid/usbhid/hid-core.c | 16 ++++++++++------
  1 file changed, 10 insertions(+), 6 deletions(-)
@@ -44,3 +44,28 @@ index 76013eb5cb7f..c008847e0b20 100644
  
 -	if (hid->quirks & HID_QUIRK_ALWAYS_POLL)
 -		return;
+-
+ 	/*
+ 	 * Make sure we don't restart data acquisition due to
+ 	 * a resumption we no longer care about by avoiding racing
+ 	 * with hid_start_in().
+ 	 */
+ 	spin_lock_irq(&usbhid->lock);
+-	clear_bit(HID_IN_POLLING, &usbhid->iofl);
+ 	clear_bit(HID_OPENED, &usbhid->iofl);
++	if (!(hid->quirks & HID_QUIRK_ALWAYS_POLL))
++		clear_bit(HID_IN_POLLING, &usbhid->iofl);
+ 	spin_unlock_irq(&usbhid->lock);
+ 
++	if (hid->quirks & HID_QUIRK_ALWAYS_POLL)
++		return;
++
+ 	hid_cancel_delayed_stuff(usbhid);
+ 	usb_kill_urb(usbhid->urbin);
+ 	usbhid->intf->needs_remote_wakeup = 0;
+-- 
+2.13.2.932.g7449e964c-goog
+
+
+-- 
+Dmitry
diff --git a/a/content_digest b/N1/content_digest
index cb1e829..476bb93 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,22 +1,22 @@
- "From\0Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\0"
+ "From\0Dmitry Torokhov <dmitry.torokhov@gmail.com>\0"
  "Subject\0[PATCH] HID: usbhid: fix \"always poll\" quirk\0"
  "Date\0Wed, 12 Jul 2017 17:14:24 -0700\0"
- "To\0Jiri Kosina <jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>\0"
- "Cc\0Benjamin Tissoires <benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>"
-  Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
-  linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
-  linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
- " linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org\0"
+ "To\0Jiri Kosina <jikos@kernel.org>\0"
+ "Cc\0Benjamin Tissoires <benjamin.tissoires@redhat.com>"
+  Olof Johansson <olof@lixom.net>
+  linux-usb@vger.kernel.org
+  linux-input@vger.kernel.org
+ " linux-kernel@vger.kernel.org\0"
  "\00:1\0"
  "b\0"
  "Even though the IO for devices with \"always poll\" quirk is already running,\n"
  "we still need to set HID_OPENED bit in usbhid->iofl so the interrupt\n"
  "handler does not ignore the data coming from the device.\n"
  "\n"
- "Reported-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>\n"
- "Tested-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>\n"
+ "Reported-by: Olof Johansson <olof@lixom.net>\n"
+ "Tested-by: Olof Johansson <olof@lixom.net>\n"
  "Fixes: e399396a6b0 (\"HID: usbhid: remove custom locking from usbhid_open...\")\n"
- "Signed-off-by: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\n"
+ "Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>\n"
  "---\n"
  " drivers/hid/usbhid/hid-core.c | 16 ++++++++++------\n"
  " 1 file changed, 10 insertions(+), 6 deletions(-)\n"
@@ -54,6 +54,31 @@
  " \tstruct usbhid_device *usbhid = hid->driver_data;\n"
  " \n"
  "-\tif (hid->quirks & HID_QUIRK_ALWAYS_POLL)\n"
- "-\t\treturn;"
+ "-\t\treturn;\n"
+ "-\n"
+ " \t/*\n"
+ " \t * Make sure we don't restart data acquisition due to\n"
+ " \t * a resumption we no longer care about by avoiding racing\n"
+ " \t * with hid_start_in().\n"
+ " \t */\n"
+ " \tspin_lock_irq(&usbhid->lock);\n"
+ "-\tclear_bit(HID_IN_POLLING, &usbhid->iofl);\n"
+ " \tclear_bit(HID_OPENED, &usbhid->iofl);\n"
+ "+\tif (!(hid->quirks & HID_QUIRK_ALWAYS_POLL))\n"
+ "+\t\tclear_bit(HID_IN_POLLING, &usbhid->iofl);\n"
+ " \tspin_unlock_irq(&usbhid->lock);\n"
+ " \n"
+ "+\tif (hid->quirks & HID_QUIRK_ALWAYS_POLL)\n"
+ "+\t\treturn;\n"
+ "+\n"
+ " \thid_cancel_delayed_stuff(usbhid);\n"
+ " \tusb_kill_urb(usbhid->urbin);\n"
+ " \tusbhid->intf->needs_remote_wakeup = 0;\n"
+ "-- \n"
+ "2.13.2.932.g7449e964c-goog\n"
+ "\n"
+ "\n"
+ "-- \n"
+ Dmitry
 
-14720490cf3dcdeab2c0c2b6b58bdb240651c35f50aa046b3720152c152ebb5c
+18552b6fea6ab302ad68cd57ef8c194bda2b00ef44302a7eabf217e3115e83c4

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.