diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-07-03 10:15:08 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-07-09 11:59:55 +0200 |
commit | 7c37e6a4c4972ad3cdb2478a0249757ee3a1bf70 (patch) | |
tree | 891c2a7ec6d14afa682a7d8af3bc12229d35f868 /hw/usb/core.c | |
parent | 19deaa089cb874912767bc6071f3b7372d3ff961 (diff) |
usb: fix interface initialization
zero is a valid interface number, so don't use it when resetting the
endpoints.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/core.c')
-rw-r--r-- | hw/usb/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/core.c b/hw/usb/core.c index fe15be064f..0614f76f4f 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -566,8 +566,8 @@ void usb_ep_reset(USBDevice *dev) dev->ep_out[ep].pid = USB_TOKEN_OUT; dev->ep_in[ep].type = USB_ENDPOINT_XFER_INVALID; dev->ep_out[ep].type = USB_ENDPOINT_XFER_INVALID; - dev->ep_in[ep].ifnum = 0; - dev->ep_out[ep].ifnum = 0; + dev->ep_in[ep].ifnum = USB_INTERFACE_INVALID; + dev->ep_out[ep].ifnum = USB_INTERFACE_INVALID; dev->ep_in[ep].dev = dev; dev->ep_out[ep].dev = dev; dev->ep_in[ep].pipeline = false; |