CHERRY-PICK: UPSTREAM: HID: Fix logitech-dj: missing Unifying device issue
authorNestor Lopez Casado <nlopezcasad@logitech.com>
Fri, 21 Sep 2012 10:21:34 +0000 (12:21 +0200)
committerChromeBot <chrome-bot@google.com>
Fri, 22 Mar 2013 02:09:06 +0000 (19:09 -0700)
commit22bcbab4d4229dda16c9cc0c3ba0d8bc9ca82c17
treec0df6767d5367d007857577d399ebe1882127413
parent56fd9ba47d3e95d61b9739a0362cd9dfe7d2ca32
CHERRY-PICK: UPSTREAM: HID: Fix logitech-dj: missing Unifying device issue

This patch fixes an issue introduced after commit 4ea5454203d991ec
("HID: Fix race condition between driver core and ll-driver").

After that commit, hid-core discards any incoming packet that arrives while
hid driver's probe function is being executed.

This broke the enumeration process of hid-logitech-dj, that must receive
control packets in-band with the mouse and keyboard packets. Discarding mouse
or keyboard data at the very begining is usually fine, but it is not the case
for control packets.

This patch forces a re-enumeration of the paired devices when a packet arrives
that comes from an unknown device.

Based on a patch originally written by Benjamin Tissoires.

BUG=chromium-os:39354
TEST=manually tested on Link

(cherry picked from upstream commit 596264082f10dd4a567c43d4526b2f54ac5520bc)
Change-Id: I03408c97bb295599306ec74e55698076d5112f81
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Reviewed-on: https://gerrit.chromium.org/gerrit/46003
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
drivers/hid/hid-logitech-dj.c
drivers/hid/hid-logitech-dj.h