From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdzdu-0002TD-G8 for qemu-devel@nongnu.org; Thu, 11 Sep 2008 23:48:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdzds-0002T1-Up for qemu-devel@nongnu.org; Thu, 11 Sep 2008 23:48:21 -0400 Received: from [199.232.76.173] (port=57797 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdzds-0002Sy-OL for qemu-devel@nongnu.org; Thu, 11 Sep 2008 23:48:20 -0400 Received: from hera.kernel.org ([140.211.167.34]:41295) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kdzds-0000P2-Rt for qemu-devel@nongnu.org; Thu, 11 Sep 2008 23:48:21 -0400 Message-ID: <48C9E669.6010407@kernel.org> Date: Thu, 11 Sep 2008 20:47:53 -0700 From: Max Krasnyansky MIME-Version: 1.0 References: <1220679634-7976-1-git-send-email-maxk@kernel.org> <48C986A1.8010102@codemonkey.ws> In-Reply-To: <48C986A1.8010102@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] husb: Make control transactions asynchronous Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, aurelien@aurel32.net, kvm@vger.kernel.org Anthony Liguori wrote: > Max Krasnyansky wrote: >> USB is 99.8% async now :). 0.2% is the three control requests that >> we need to execute synchronously. We could off-load that to a thread >> or something but it's not worth the pain since those requests are >> performed only during device initialization (ie when device is >> connected to the VM). >> >> The change is a bit bigger than I wanted due to the fact that generic >> handle_packet()/handle_control() interface was not designed for >> async transactions. So I ended up adding custom handle_packet() >> code to usb-linux. We can make that generic if/when some other >> component needs it. >> >> Signed-off-by: Max Krasnyansky >> --- >> usb-linux.c | 461 >> +++++++++++++++++++++++++++++++++++++++++++++++------------ >> 1 files changed, 369 insertions(+), 92 deletions(-) >> >> diff --git a/usb-linux.c b/usb-linux.c >> index c31d56a..3ac4440 100644 >> --- a/usb-linux.c >> +++ b/usb-linux.c >> @@ -25,28 +25,21 @@ >> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER >> DEALINGS IN >> * THE SOFTWARE. >> */ >> + >> #include "qemu-common.h" >> #include "qemu-timer.h" >> -#include "hw/usb.h" >> > > hw/usb.h defines USBDevice. By moving this include into the #if > defined(__linux__) block, it breaks the win32 build. I was able to fix > it by moving it down to the #else clause. > >> +static int ctrl_error() >> > > This needs to be static int ctrl_error(void). > > This patch fuzzed really bad for me (for some odd reason). Since I > can't test this easily, I'd rather you update your patch with these > changes, and resend after testing. Thanx for testing. I'll resend it. Max