From patchwork Fri Jan 20 12:30:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Dennis-Jordan X-Patchwork-Id: 9528215 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 5337460459 for ; Fri, 20 Jan 2017 12:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 450BA26E4E for ; Fri, 20 Jan 2017 12:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39D0E28550; Fri, 20 Jan 2017 12:34:53 +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_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B643026E4E for ; Fri, 20 Jan 2017 12:34:52 +0000 (UTC) Received: from localhost ([::1]:54168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUYP5-0001XB-Pz for patchwork-qemu-devel@patchwork.kernel.org; Fri, 20 Jan 2017 07:34:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUYLA-0007Rp-5l for qemu-devel@nongnu.org; Fri, 20 Jan 2017 07:30:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUYL9-0007bQ-8b for qemu-devel@nongnu.org; Fri, 20 Jan 2017 07:30:48 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUYL9-0007bE-1u for qemu-devel@nongnu.org; Fri, 20 Jan 2017 07:30:47 -0500 Received: by mail-wm0-x243.google.com with SMTP id r126so6366282wmr.3 for ; Fri, 20 Jan 2017 04:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=brCOYX5nXfrTAzEGmISi8IIyH5KZM+dvh2mi8VC/vcY=; b=sFo85dN3stclFie8aaQfefozsqYRAMqP7UyDhwrjbM/4S3A0KpUxtnk/UInEpiVITo hhadFURV5A34ndvkypsDtXaASNlDDYX6wYl0lMDikA24nMPNFQFjh/tzqfba3hEL7oMk irheNErYXQHQianzV8ZA9SciyMd7xfyBiryae8sTIHnRRNYpcqN+b/FkRmDvN4eF7CIh vPCqfVvvtLSMpMo6JBpTb4zh+s5faN94FLi4Ah0LzOqMncPJoTW4+veh8fdLojNuryXC fekPWnciu3hB8/cBKR3XOUsudUXqVjx7SUlmQj958iuebtoU+RFE5CF5zrRZ6Zoft9XL H+/w== 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:mime-version:content-transfer-encoding; bh=brCOYX5nXfrTAzEGmISi8IIyH5KZM+dvh2mi8VC/vcY=; b=sEEk90mPxIxShg61z4lDd6f3f72XwPoDk5I5HZktAU2MsFJmtl3kmQKoT/rC5zq2Cb iLqD58atOnw4ywU6KYfdNB7+c2x45MseavZVw7zb5VEFD2tXsa0Y+jZW7YjIVOlC9Y3U fnZldeYUoIxhgQxrOUSLx4hKnr8QybSJELbsMgMI5DaFc5l0omTmkRQ/Lzl+GToqCp5V qBX48gVyNsgvabsopZvjDb629qWyeco4utO79aixfAnqIVuMI+W3lumDNDrbrROUezqn kwKLEVeANHE1CQnjpXczcC+bPNpCeuLXeGlQ0ZkLR2V79XAzpnURsvIEhGMdDD0l2RuC pM/g== X-Gm-Message-State: AIkVDXLcR51NIqcTjTpllDFs7jLdsQBRWv1y/e7kZzGpEM36XHRCuIV/CgEBShk6m8Xniw== X-Received: by 10.28.52.210 with SMTP id b201mr2989490wma.130.1484915445999; Fri, 20 Jan 2017 04:30:45 -0800 (PST) Received: from Phils-MacBook-Pro-57025.local.eu (37-186-10-86.ip.as39912.net. [37.186.10.86]) by smtp.gmail.com with ESMTPSA id 186sm5749018wmw.24.2017.01.20.04.30.44 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Jan 2017 04:30:45 -0800 (PST) From: Phil Dennis-Jordan To: qemu-devel@nongnu.org Date: Fri, 20 Jan 2017 13:30:16 +0100 Message-Id: <1484915417-10499-2-git-send-email-phil@philjordan.eu> X-Mailer: git-send-email 2.3.2 (Apple Git-55) In-Reply-To: <1484915417-10499-1-git-send-email-phil@philjordan.eu> References: <1484915417-10499-1-git-send-email-phil@philjordan.eu> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v2 1/2] hw/usb/dev-hid: set bInterfaceProtocol to 0x00 for usb-tablet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Phil Dennis-Jordan , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This should be non-zero for boot protocol devices only, which the usb-tablet is not. A boot protocol of 0x02 specifically confuses OS X/macOS' HID driver stack, causing it to generate additional bogus HID events with relative motion in addition to the tablet's absolute coordinate events. Signed-off-by: Phil Dennis-Jordan --- hw/usb/dev-hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 24d05f7..a23e5d4 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -144,7 +144,7 @@ static const USBDescIface desc_iface_tablet = { .bInterfaceNumber = 0, .bNumEndpoints = 1, .bInterfaceClass = USB_CLASS_HID, - .bInterfaceProtocol = 0x02, + .bInterfaceProtocol = 0x00, .ndesc = 1, .descs = (USBDescOther[]) { { @@ -174,7 +174,7 @@ static const USBDescIface desc_iface_tablet2 = { .bInterfaceNumber = 0, .bNumEndpoints = 1, .bInterfaceClass = USB_CLASS_HID, - .bInterfaceProtocol = 0x02, + .bInterfaceProtocol = 0x00, .ndesc = 1, .descs = (USBDescOther[]) { {