From patchwork Sun May 2 02:38:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 51459 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9134BB7D4F for ; Sun, 2 May 2010 12:39:40 +1000 (EST) Received: from localhost ([127.0.0.1]:35753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8P5k-0007ft-Td for incoming@patchwork.ozlabs.org; Sat, 01 May 2010 22:39:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8P58-0007fo-CC for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:58 -0400 Received: from [140.186.70.92] (port=52445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8P56-0007fg-4P for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8P54-0004nZ-P7 for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:56 -0400 Received: from mail-qy0-f188.google.com ([209.85.221.188]:52104) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8P54-0004nE-Md for qemu-devel@nongnu.org; Sat, 01 May 2010 22:38:54 -0400 Received: by qyk26 with SMTP id 26so2166615qyk.19 for ; Sat, 01 May 2010 19:38:53 -0700 (PDT) Received: by 10.224.60.29 with SMTP id n29mr2135989qah.236.1272767933146; Sat, 01 May 2010 19:38:53 -0700 (PDT) Received: from localhost (207-172-165-101.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com [207.172.165.101]) by mx.google.com with ESMTPS id 4sm6478692qwe.17.2010.05.01.19.38.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 01 May 2010 19:38:52 -0700 (PDT) Date: Sat, 1 May 2010 22:38:51 -0400 From: Kevin O'Connor To: qemu-devel@nongnu.org, seabios@seabios.org Message-ID: <20100502023851.GA16268@morn.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Subject: [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The QEMU USB mouse claims to support the "boot" protocol (bInterfaceSubClass is 1). However, the mouse rejects the Set_Protocol command. The qemu mouse does support the "boot" protocol specification, so a simple fix is to just enable the Set_Portocol request. -Kevin --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -790,13 +790,13 @@ static int usb_hid_handle_control(USBDevice *dev, int request, int value, goto fail; break; case GET_PROTOCOL: - if (s->kind != USB_KEYBOARD) + if (s->kind != USB_KEYBOARD && s->kind != USB_MOUSE) goto fail; ret = 1; data[0] = s->protocol; break; case SET_PROTOCOL: - if (s->kind != USB_KEYBOARD) + if (s->kind != USB_KEYBOARD && s->kind != USB_MOUSE) goto fail; ret = 0; s->protocol = value;