aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-elo.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2013-09-25 03:42:55 -0400
committerJiri Kosina <jkosina@suse.cz>2013-09-25 05:28:50 -0400
commit403cfb53fb450d53751fdc7ee0cd6652419612cf (patch)
tree55ad587bf2d59d0a000f7d4cb4a3d699ee97f33e /drivers/hid/hid-elo.c
parentf204828a1150b0f35730556cd493febda011caf1 (diff)
HID: hid-elo: some systems cannot stomach work around
Some systems although they have firmware class 'M', which usually needs a work around to not crash, must not be subjected to the work around because the work around crashes them. They cannot be told apart by their own device descriptor, but as they are part of compound devices, can be identified by looking at their siblings. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-elo.c')
-rw-r--r--drivers/hid/hid-elo.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
index f042a6cf8b18..4e49462870ab 100644
--- a/drivers/hid/hid-elo.c
+++ b/drivers/hid/hid-elo.c
@@ -181,7 +181,40 @@ fail:
181 */ 181 */
182static bool elo_broken_firmware(struct usb_device *dev) 182static bool elo_broken_firmware(struct usb_device *dev)
183{ 183{
184 return use_fw_quirk && le16_to_cpu(dev->descriptor.bcdDevice) == 0x10d; 184 struct usb_device *hub = dev->parent;
185 struct usb_device *child = NULL;
186 u16 fw_lvl = le16_to_cpu(dev->descriptor.bcdDevice);
187 u16 child_vid, child_pid;
188 int i;
189
190 if (!use_fw_quirk)
191 return false;
192 if (fw_lvl != 0x10d)
193 return false;
194
195 /* iterate sibling devices of the touch controller */
196 usb_hub_for_each_child(hub, i, child) {
197 child_vid = le16_to_cpu(child->descriptor.idVendor);
198 child_pid = le16_to_cpu(child->descriptor.idProduct);
199
200 /*
201 * If one of the devices below is present attached as a sibling of
202 * the touch controller then this is a newer IBM 4820 monitor that
203 * does not need the IBM-requested workaround if fw level is
204 * 0x010d - aka 'M'.
205 * No other HW can have this combination.
206 */
207 if (child_vid==0x04b3) {
208 switch (child_pid) {
209 case 0x4676: /* 4820 21x Video */
210 case 0x4677: /* 4820 51x Video */
211 case 0x4678: /* 4820 2Lx Video */
212 case 0x4679: /* 4820 5Lx Video */
213 return false;
214 }
215 }
216 }
217 return true;
185} 218}
186 219
187static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id) 220static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id)