From patchwork Wed Feb 13 13:22:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Abbott X-Patchwork-Id: 2136001 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6C8AEDFE75 for ; Wed, 13 Feb 2013 13:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759026Ab3BMNXD (ORCPT ); Wed, 13 Feb 2013 08:23:03 -0500 Received: from mail.mev.co.uk ([62.49.15.74]:43474 "EHLO mail.mev.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757274Ab3BMNXC (ORCPT ); Wed, 13 Feb 2013 08:23:02 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mev.co.uk (Postfix) with ESMTP id 833525E092; Wed, 13 Feb 2013 13:23:00 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at mail.mev.co.uk Received: from mail.mev.co.uk ([127.0.0.1]) by localhost (mantis.mev.local [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XW1U5XdKaS_4; Wed, 13 Feb 2013 13:22:58 +0000 (GMT) Received: from gentoo-ija64.mev.local (mev-xp64-ian.mev.local [10.0.0.210]) (Authenticated sender: abbotti) by mail.mev.co.uk (Postfix) with ESMTPSA id 640985E08D; Wed, 13 Feb 2013 13:22:58 +0000 (GMT) From: Ian Abbott To: linux-input@vger.kernel.org Cc: Jiri Kosina , Ian Abbott Subject: [PATCH] hid: blacklist Velleman data acquisition boards Date: Wed, 13 Feb 2013 13:22:45 +0000 Message-Id: <1360761765-20142-1-git-send-email-abbotti@mev.co.uk> X-Mailer: git-send-email 1.8.1.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org These are simple data acquistion boards, not HID devices and are handled by the vmk80xx comedi driver. At least one of them (10cf:5500) misidentifies itself as a HID in its USB interface descriptor. Ignore all these devices. Signed-off-by: Ian Abbott --- drivers/hid/hid-core.c | 8 ++++++++ drivers/hid/hid-ids.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index eb2ee11..8e055ea 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2228,6 +2228,14 @@ bool hid_ignore(struct hid_device *hdev) hdev->type != HID_TYPE_USBMOUSE) return true; break; + case USB_VENDOR_ID_VELLEMAN: + /* These are not HID devices. They are handled by comedi. */ + if ((hdev->product >= USB_DEVICE_ID_VELLEMAN_K8055_FIRST && + hdev->product <= USB_DEVICE_ID_VELLEMAN_K8055_LAST) || + (hdev->product >= USB_DEVICE_ID_VELLEMAN_K8061_FIRST && + hdev->product <= USB_DEVICE_ID_VELLEMAN_K8061_LAST)) + return true; + break; } if (hdev->type == HID_TYPE_USBMOUSE && diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 4dfa605..187de47 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -791,6 +791,12 @@ #define USB_DEVICE_ID_UNITEC_USB_TOUCH_0709 0x0709 #define USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19 0x0a19 +#define USB_VENDOR_ID_VELLEMAN 0x10cf +#define USB_DEVICE_ID_VELLEMAN_K8055_FIRST 0x5500 +#define USB_DEVICE_ID_VELLEMAN_K8055_LAST 0x5503 +#define USB_DEVICE_ID_VELLEMAN_K8061_FIRST 0x8061 +#define USB_DEVICE_ID_VELLEMAN_K8061_LAST 0x8068 + #define USB_VENDOR_ID_VERNIER 0x08f7 #define USB_DEVICE_ID_VERNIER_LABPRO 0x0001 #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002