From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9Z83-0005J4-E0 for qemu-devel@nongnu.org; Thu, 06 Sep 2012 06:16:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9Z7z-0003Jm-8r for qemu-devel@nongnu.org; Thu, 06 Sep 2012 06:16:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9Z7z-0003JT-0g for qemu-devel@nongnu.org; Thu, 06 Sep 2012 06:16:03 -0400 From: Gerd Hoffmann Date: Thu, 6 Sep 2012 12:16:00 +0200 Message-Id: <1346926560-8166-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1346926560-8166-1-git-send-email-kraxel@redhat.com> References: <1346926560-8166-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] usb-host: allow emulated (non-async) control requests without USBPacket List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex@securiforest.com, Gerd Hoffmann xhci needs this for USB_REQ_SET_ADDRESS due to the way usb addressing is handled by the xhci hardware. Signed-off-by: Gerd Hoffmann --- hw/usb/host-linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 8df9207..44f1a64 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1045,7 +1045,6 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, /* Note request is (bRequestType << 8) | bRequest */ trace_usb_host_req_control(s->bus_num, s->addr, p, request, value, index); - assert(p->result == 0); switch (request) { case DeviceOutRequest | USB_REQ_SET_ADDRESS: @@ -1074,6 +1073,7 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, } /* The rest are asynchronous */ + assert(p && p->result == 0); if (length > sizeof(dev->data_buf)) { fprintf(stderr, "husb: ctrl buffer too small (%d > %zu)\n", -- 1.7.1