/* Resets any host-side endpoint state such as the toggle bit, sequence number or current window.  */
void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr)
/* Resets any host-side endpoint state such as the toggle bit, sequence number or current window.  */
void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr)
{
	unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
	struct usb_host_endpoint *ep;
	if (usb_endpoint_out(epaddr))
		ep = dev->ep_out[epnum];
	else
		ep = dev->ep_in[epnum];
	if (ep)
		usb_hcd_reset_endpoint(dev, ep);
}