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

Commit 79376ba7 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: dwc3: Enable evicting endpoint cache after flow control



In 3.00a and 3.20a synopsys release a performance enhancemnet
was done to keep the Non Stream capable bulk IN endpoint in cache
after flow control. This enhancement causes host mode concurrency
issue in which xhci command timeout is happening when mutliple mass
storage devices is connected to the device using HUB and
simultaneous file transfers are happening to mass storage devices.
This failure is caused because if one endpoint flow controlled,
other endpoints will not be serviced right. This change sets
EnableEpCacheEvict bit which will disable the enhancement.

Change-Id: Iafb72f75b81b1bcbe8c5e38ebd6fe40905670e7a
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 3afabc36
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -913,6 +913,17 @@ int dwc3_core_init(struct dwc3 *dwc)
		dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
	}

	/*
	 * Enable evicting endpoint cache after flow control for bulk
	 * endpoints for dwc3 core version 3.00a and 3.20a
	 */
	if (dwc->revision == DWC3_REVISION_300A ||
			dwc->revision == DWC3_REVISION_320A) {
		reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
		reg |= DWC3_GUCTL2_ENABLE_EP_CACHE_EVICT;
		dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
	}

	return 0;

err2:
+3 −0
Original line number Diff line number Diff line
@@ -220,6 +220,9 @@
/* Global User Control 1 Register */
#define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW	(1 << 24)

/* Global User Control 2 Register */
#define DWC3_GUCTL2_ENABLE_EP_CACHE_EVICT	(1 << 12)

/* Global USB2 PHY Configuration Register */
#define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
#define DWC3_GUSB2PHYCFG_ENBLSLPM	(1 << 8)