lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 May 2015 21:26:05 -0500
From:	<dinguyen@...nsource.altera.com>
To:	<johnyoun@...opsys.com>
CC:	<dinh.linux@...il.com>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>,
	Gregory Herrero <gregory.herrero@...el.com>,
	Mian Yousaf Kaukab <yousaf.kaukab@...el.com>,
	Felipe Balbi <balbi@...com>
Subject: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition

From: Dinh Nguyen <dinguyen@...nsource.altera.com>

For platforms that use a ULPI phy, we should enable the external VbusValid
signal instead.

Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
Cc: Gregory Herrero <gregory.herrero@...el.com>
Cc: Mian Yousaf Kaukab <yousaf.kaukab@...el.com>
Cc: Felipe Balbi <balbi@...com>
---
 drivers/usb/dwc2/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index e5b546f..08ffdc6 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -807,6 +807,11 @@ int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq)
 	if (hsotg->core_params->ts_dline > 0)
 		usbcfg |= GUSBCFG_TERMSELDLPULSE;
 
+	/* Set external VBUS indicator as needed. */
+	if (hsotg->core_params->phy_type == DWC2_PHY_TYPE_PARAM_ULPI)
+		usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND |
+			   GUSBCFG_INDICATORPASSTHROUGH);
+
 	writel(usbcfg, hsotg->regs + GUSBCFG);
 
 	/* Reset the Controller */
-- 
2.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ