]> git.proxmox.com Git - qemu.git/commitdiff
usb: add usb_ep_set_halted
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Dec 2012 12:40:59 +0000 (13:40 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Feb 2013 11:30:05 +0000 (12:30 +0100)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb.h
hw/usb/core.c

index 90024a45159675a35fab7a82b9d563715b8d4995..af86fbd086f3fba48f851027754126c9b828dc43 100644 (file)
--- 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);
 
index d057aab90000eb87dae2995e2156337ce0631fbf..5517797c8a7932538f06e01160c20ae57daae87c 100644 (file)
@@ -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)
 {