From b791c3b38c7969cb9f4acda8229e19fd865a1c08 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 23 May 2014 16:20:54 +0200 Subject: usb: add usb_pick_speed We can pick the usb port speed in generic code, by looking at the port and device speed masks and looking for the fastest match. So add a function to do exactly that, and drop the speed setting code from usb_desc_attach as it isn't needed any more. This way we can set the device speed before calling port->ops->attach, which fixes some xhci hotplug issues. https://bugzilla.redhat.com/show_bug.cgi?id=1046873 Signed-off-by: Gerd Hoffmann --- include/hw/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw/usb.h') diff --git a/include/hw/usb.h b/include/hw/usb.h index 1919bdc..8bcab48 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -458,6 +458,7 @@ void usb_ep_combine_input_packets(USBEndpoint *ep); void usb_combined_input_packet_complete(USBDevice *dev, USBPacket *p); void usb_combined_packet_cancel(USBDevice *dev, USBPacket *p); +void usb_pick_speed(USBPort *port); void usb_attach(USBPort *port); void usb_detach(USBPort *port); void usb_port_reset(USBPort *port); -- cgit v1.1