From e0b8e72dd95f5fe133c8bb952a464814ca06fe8b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 15 Sep 2011 12:10:21 +0200 Subject: usb: fix port reset commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicit detach before (re-)attaching in usb_attach(). Some usb host controllers used that behavior though to do a port reset by a detach+attach sequence. This patch establishes old behavior by adding a new usb_reset() function for port resets and putting it into use, thereby also unifying port reset behavior of all host controllers. The patch also adds asserts to usb_attach() and usb_detach() to make sure the calls are symmetrical. Signed-off-by: Gerd Hoffmann --- hw/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/usb.h') diff --git a/hw/usb.h b/hw/usb.h index c08d469..c6e1870 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -306,6 +306,7 @@ void usb_cancel_packet(USBPacket * p); void usb_attach(USBPort *port); void usb_detach(USBPort *port); +void usb_reset(USBPort *port); void usb_wakeup(USBDevice *dev); int usb_generic_handle_packet(USBDevice *s, USBPacket *p); void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p); -- cgit v1.1