From patchwork Wed Jun 7 05:54:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Zabel X-Patchwork-Id: 9770573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1287A60393 for ; Wed, 7 Jun 2017 05:55:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F347D284DA for ; Wed, 7 Jun 2017 05:55:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E50B9284EE; Wed, 7 Jun 2017 05:55:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A736284EE for ; Wed, 7 Jun 2017 05:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751252AbdFGFy6 (ORCPT ); Wed, 7 Jun 2017 01:54:58 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35645 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdFGFy4 (ORCPT ); Wed, 7 Jun 2017 01:54:56 -0400 Received: by mail-wm0-f66.google.com with SMTP id g15so827420wmc.2; Tue, 06 Jun 2017 22:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wDlcMj5cRnVlbANJorIz/g+OPznLp7AoWW0dAGTKHiM=; b=jJK2tWxDUoJCAqmeBpCSRfQUc52CMHwA3khrcwWxyvt0Y0691fqJDZNB4ZfO9gigzS Xa5Lt49po31X9rA/6IWuVgyQem53kRzXQetj6yVSVvxjEqyF0W6Hgy80UkD8Yb7zxc6Z PFSkJ3T9bEI/RnQ1eG6szCaZ1e63vi6L39UcFuAocOXGqorYV9TQ4x6ZRG8YcJq8qUNp oj+GiOgEEnG6D8KXt9QoKJu0/1LxRNYDYisHzH9mqEimJF6s+dm+vq6wUM2cEvuJ3kGN GgTpDzPI6EOscc4Bky9Hlc2qm4bMQ1NbYOCiLJ7cm92a5zufeCfZRqkcmViEK+4eZM0v arKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wDlcMj5cRnVlbANJorIz/g+OPznLp7AoWW0dAGTKHiM=; b=MWiqLBnbmvIPojklKQk9BXVdHsADMVltFE/bMEUDC7WMTdc6bvZbpkQODMcHearjaQ 82y4fl6IkL3DCQSjy4+ZMJ/n+rqlFtvpXsNoqpn68VC61iQW5FZW2aQN+EMQd3w1Bhw8 he6uc/JBDyjqqLowAC7NSy8jqin9YstXiaeMlYkbqpMeumTF0i8ChvIRkwY3Qvekm1cZ dE30yV3pc6BYf87UtVihQmnL4+jhOeLADFXuTCJ2PCgaZiTvm77bxpkcTbS/q5oaJZ+k czfwhTW7BTiVBzxSsOplxVpit9uuIkZJkns+nxHpSQP7/Uk8QaEwLowIqcw7xmcx1lSj guqA== X-Gm-Message-State: AODbwcDOB0dbYMZIY92WGeRz1OlqlZTtXQwz44Rbe5Gg/SYWvLfrRSaP 6e+Fcdgmd3Cm09JP X-Received: by 10.80.142.143 with SMTP id w15mr19775921edw.34.1496814894084; Tue, 06 Jun 2017 22:54:54 -0700 (PDT) Received: from ped.lan (ip1f12fb9c.dynamic.kabel-deutschland.de. [31.18.251.156]) by smtp.googlemail.com with ESMTPSA id g48sm610660edc.9.2017.06.06.22.54.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 22:54:53 -0700 (PDT) From: Philipp Zabel To: linux-input@vger.kernel.org Cc: Jiri Kosina , Benjamin Tissoires , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Zabel Subject: [PATCH 2/2] HID: usbhid: Add HID_QUIRK_NO_INIT_REPORTS for Oculus Rift CV1 Date: Wed, 7 Jun 2017 07:54:35 +0200 Message-Id: <20170607055435.25988-2-philipp.zabel@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170607055435.25988-1-philipp.zabel@gmail.com> References: <20170607055435.25988-1-philipp.zabel@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When plugging in an Oculus Rift CV1 HMD, it takes a long time until the hidraw devices appear, specifically two control transfers time out querying the HID report descriptors: $ echo 1 > /sys/module/hid/parameters/debug usb 1-3.1: new full-speed USB device number 11 using xhci_hcd usb 1-3.1: New USB device found, idVendor=2833, idProduct=0031 usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-3.1: Product: Rift usb 1-3.1: Manufacturer: Oculus VR, Inc. drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 0 hid-generic 0003:2833:0031.0005: Kicking head 1 tail 0 drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0101 wIndex=0x0000 wLength=62 drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x010b wIndex=0x0000 wLength=64 [10 s delay] drivers/hid/usbhid/hid-core.c: timeout waiting for ctrl or out queue to clear drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x010c wIndex=0x0000 wLength=64 hid-generic 0003:2833:0031.0005: usb_submit_urb(ctrl) failed: -1 hid-generic 0003:2833:0031.0005: timeout initializing reports hid-generic 0003:2833:0031.0005: hiddev0,hidraw0: USB HID v1.10 Device [Oculus VR, Inc. Rift] on usb-0000:00:14.0-3.1/input0 drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 1 hid-generic 0003:2833:0031.0006: Kicking head 1 tail 0 drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0101 wIndex=0x0001 wLength=62 drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x010b wIndex=0x0001 wLength=64 [10 s delay] drivers/hid/usbhid/hid-core.c: timeout waiting for ctrl or out queue to clear drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x010c wIndex=0x0001 wLength=64 hid-generic 0003:2833:0031.0006: usb_submit_urb(ctrl) failed: -1 hid-generic 0003:2833:0031.0006: timeout initializing reports hid-generic 0003:2833:0031.0006: hiddev0,hidraw1: USB HID v1.10 Device [Oculus VR, Inc. Rift] on usb-0000:00:14.0-3.1/input1 usbcore: registered new interface driver usbhid usbhid: USB HID core driver These timeouts disappear when setting HID_QUIRK_NO_INIT_REPORTS. The hidraw devices appear quickly and are functional. Signed-off-by: Philipp Zabel --- drivers/hid/usbhid/hid-quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 6316498b7812..7b2df4042167 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -111,6 +111,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_OCULUSVR, USB_DEVICE_ID_RIFT_CV1, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1610, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1640, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },