/* Disables all udc endpoints (even control endpoint), report disconnect to the gadget user.  */
static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
/* Disables all udc endpoints (even control endpoint), report disconnect to the gadget user.  */
static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
{
	int i;
	if (udc->gadget.speed == USB_SPEED_UNKNOWN)
		driver = NULL;
	udc->gadget.speed = USB_SPEED_UNKNOWN;
	for (i = 0; i < NR_USB_ENDPOINTS; i++)
		pxa_ep_disable(&udc->udc_usb_ep[i].usb_ep);
	if (driver)
		driver->disconnect(&udc->gadget);
}