Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 709c3a84 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

usb: core: Limit HCD old enumeration scheme request to root ports



HCD_OLD_ENUM HCD flag is introduced to use old (or short) enumeration
scheme for the devices attached on the corresponding USB bus. The old
enumeration scheme is used by the MSM HSIC controller to avoid multiple
reset during enumeration. This is useful when a known device is attached
to the USB bus, which is the case with MSM HSIC. When a HSIC HUB is
connected, any device can be connected on the HSIC USB bus. The new
enumeration scheme supports wide variety of USB devices. Hence limit
the old enumeration scheme request of a HCD to only root ports.

Change-Id: I6035c2a766787819eb8d0e1fa774e0c79d6e958b
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent c2589d38
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4143,7 +4143,8 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
	for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) {
		if (USE_NEW_SCHEME(retry_counter) &&
			!(hcd->driver->flags & HCD_USB3) &&
			!(hcd->driver->flags & HCD_OLD_ENUM)) {
			!((hcd->driver->flags & HCD_RT_OLD_ENUM) &&
				!hdev->parent)) {
			struct usb_device_descriptor *buf;
			ushort idvendor;
			int r = 0;
@@ -4247,7 +4248,8 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
			msleep(10);
			if (USE_NEW_SCHEME(retry_counter) &&
				!(hcd->driver->flags & HCD_USB3) &&
				!(hcd->driver->flags & HCD_OLD_ENUM))
				!((hcd->driver->flags & HCD_RT_OLD_ENUM) &&
					!hdev->parent))
				break;
  		}

+1 −1
Original line number Diff line number Diff line
@@ -1471,7 +1471,7 @@ static struct hc_driver msm_hsic_driver = {
	 * generic hardware linkage
	 */
	.irq			= msm_hsic_irq,
	.flags			= HCD_USB2 | HCD_MEMORY | HCD_OLD_ENUM,
	.flags			= HCD_USB2 | HCD_MEMORY | HCD_RT_OLD_ENUM,

	.reset			= ehci_hsic_reset,
	.start			= ehci_run,
+2 −1
Original line number Diff line number Diff line
@@ -216,7 +216,8 @@ struct hc_driver {
#define	HCD_MEMORY	0x0001		/* HC regs use memory (else I/O) */
#define	HCD_LOCAL_MEM	0x0002		/* HC needs local memory */
#define	HCD_SHARED	0x0004		/* Two (or more) usb_hcds share HW */
#define	HCD_OLD_ENUM	0x0008		/* HC supports short enumeration */
#define	HCD_RT_OLD_ENUM	0x0008		/* HC supports short enumeration
					   on root port */
#define	HCD_USB11	0x0010		/* USB 1.1 */
#define	HCD_USB2	0x0020		/* USB 2.0 */
#define	HCD_USB3	0x0040		/* USB 3.0 */