From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8WyH-0005RE-KK for qemu-devel@nongnu.org; Sun, 02 May 2010 07:04:25 -0400 Received: from [140.186.70.92] (port=43248 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8WyF-0005Qa-TM for qemu-devel@nongnu.org; Sun, 02 May 2010 07:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8WyE-0000mg-CZ for qemu-devel@nongnu.org; Sun, 02 May 2010 07:04:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43600) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8WyE-0000mY-4t for qemu-devel@nongnu.org; Sun, 02 May 2010 07:04:22 -0400 Date: Sun, 2 May 2010 14:04:44 +0300 From: Shahar Havivi Subject: Re: [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior Message-ID: <20100502110444.GB31334@redhat.com> References: <20100502023851.GA16268@morn.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100502023851.GA16268@morn.localdomain> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org On Sat, May 01, 2010 at 10:38:51PM -0400, Kevin O'Connor wrote: > Date: Sat, 1 May 2010 22:38:51 -0400 > From: Kevin O'Connor > To: qemu-devel@nongnu.org, seabios@seabios.org > Cc: > Subject: [Qemu-devel] [PATCH] Fix qemu mouse Set_Protocol behavior > > 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 Isn't it true for the USB_TABLET as well? Shahar. > > > --- 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; > >