From patchwork Thu Jan 24 15:41:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/7] usb: add usb_ep_set_halted Date: Thu, 24 Jan 2013 05:41:17 -0000 From: Gerd Hoffmann X-Patchwork-Id: 215369 Message-Id: <1359042080-24154-5-git-send-email-kraxel@redhat.com> To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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) {