From patchwork Thu Feb 21 09:59:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 222233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 764742C0092 for ; Thu, 21 Feb 2013 20:59:58 +1100 (EST) Received: from localhost ([::1]:41138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8SwW-0003eG-B5 for incoming@patchwork.ozlabs.org; Thu, 21 Feb 2013 04:59:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Svx-0003Fg-6Z for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Svt-0001w4-QN for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Svt-0001vX-HS for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:17 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1L9xGi7011957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Feb 2013 04:59:16 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1L9xFcS013520; Thu, 21 Feb 2013 04:59:16 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 2733541AF4; Thu, 21 Feb 2013 10:59:14 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 21 Feb 2013 10:59:07 +0100 Message-Id: <1361440753-13413-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1361440753-13413-1-git-send-email-kraxel@redhat.com> References: <1361440753-13413-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 08/14] usb: add usb_ep_set_halted X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/usb.h | 1 + hw/usb/core.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/hw/usb.h b/hw/usb.h index 90024a4..af86fbd 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -417,6 +417,7 @@ void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep, uint16_t raw); int usb_ep_get_max_packet_size(USBDevice *dev, int pid, int ep); void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled); +void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted); USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep, uint64_t id); diff --git a/hw/usb/core.c b/hw/usb/core.c index d057aab..5517797 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -755,6 +755,12 @@ void usb_ep_set_pipeline(USBDevice *dev, int pid, int ep, bool enabled) uep->pipeline = enabled; } +void usb_ep_set_halted(USBDevice *dev, int pid, int ep, bool halted) +{ + struct USBEndpoint *uep = usb_ep_get(dev, pid, ep); + uep->halted = halted; +} + USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep, uint64_t id) {