From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fa052-0003yR-OL for qemu-devel@nongnu.org; Sat, 29 Apr 2006 20:46:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fa050-0003y3-S0 for qemu-devel@nongnu.org; Sat, 29 Apr 2006 20:46:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fa050-0003y0-Md for qemu-devel@nongnu.org; Sat, 29 Apr 2006 20:46:30 -0400 Received: from [24.93.47.41] (helo=ms-smtp-02.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fa08T-0003sX-UE for qemu-devel@nongnu.org; Sat, 29 Apr 2006 20:50:06 -0400 Received: from [192.168.0.11] (cpe-67-9-160-120.austin.res.rr.com [67.9.160.120]) by ms-smtp-02.texas.rr.com (8.13.4/8.13.4) with ESMTP id k3U0kK8a016884 for ; Sat, 29 Apr 2006 19:46:21 -0500 (CDT) Message-ID: <445408D5.3060101@austin.rr.com> Date: Sat, 29 Apr 2006 19:46:13 -0500 From: Lonnie Mendez MIME-Version: 1.0 Subject: Re: [Qemu-devel] Large USB patch References: <4447E811.1040403@gmx.de> <4448F1F6.4090609@austin.rr.com> <4448FF3F.3030009@austin.rr.com> <44490614.50406@austin.rr.com> <44490852.2080608@gmx.de> <44491659.30804@austin.rr.com> <44491F0A.2090608@austin.rr.com> <444926AC.3070104@austin.rr.com> <44494596.3070808@austin.rr.com> <4449F860.1060809@gmx.de> <444A3F7E.6070107@austin.rr.com> <444A5336.4040102@gmx.de> <444A578E.6000702@austin.rr.com> <444A5B65.8010104@gmx.de> <444AF6B7.1030606@austin.rr.com> <4452BB67.8080902@austin.rr.com> <4452DD84.8090707@austin.rr.com> In-Reply-To: <4452DD84.8090707@austin.rr.com> Content-Type: multipart/mixed; boundary="------------000609040704010406090303" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------000609040704010406090303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit lo. The attached patch addresses the problem with removing the usbhub/tablet devices and switches the handle_packet call in the port reset call to handle_msg which just happens to make the hub functional. --------------000609040704010406090303 Content-Type: text/plain; name="lusb-upd5.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lusb-upd5.diff" --- a/qemu/hw/usb-hub.c 2006-04-28 19:44:18.000000000 -0500 +++ b/qemu/hw/usb-hub.c 2006-04-29 18:55:46.000000000 -0500 @@ -240,6 +240,13 @@ return 1; } +int usb_hub_handle_close(USBDevice *dev) +{ + USBHubState *s = (USBHubState *)(dev->opaque); + qemu_free(s); + return 1; +} + int usb_hub_handle_control(USBDevice *dev, int request, int value, int index, int length, uint8_t *data) { @@ -385,8 +392,7 @@ break; case PORT_RESET: if (dev) { - dev->handle_packet(dev, - USB_MSG_RESET, 0, 0, NULL, 0); + dev->handle_msg(dev, USB_MSG_RESET); port->wPortChange |= PORT_STAT_C_RESET; /* set enable bit */ // port->wPortChange |= PORT_STAT_C_ENABLE; @@ -578,6 +584,7 @@ dev->handle_packet= usb_hub_handle_packet; dev->handle_attach= usb_hub_attach; dev->handle_reset= usb_hub_handle_reset; + dev->handle_close= usb_hub_handle_close; dev->handle_control= usb_hub_handle_control; dev->handle_data= usb_hub_handle_data; --- a/qemu/hw/usb-hid.c 2006-04-28 19:44:18.000000000 -0500 +++ b/qemu/hw/usb-hid.c 2006-04-29 18:56:15.000000000 -0500 @@ -526,6 +526,7 @@ dev->handle_packet= usb_generic_handle_packet; dev->handle_reset= usb_mouse_handle_reset; + dev->handle_close= usb_mouse_handle_close; dev->handle_control= usb_mouse_handle_control; dev->handle_data= usb_mouse_handle_data; s->kind= USB_TABLET; --------------000609040704010406090303--