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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1362033418-7332-1-git-send-email-vbyravarasu@nvidia.com>
Date:	Thu, 28 Feb 2013 12:06:58 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	<gregkh@...uxfoundation.org>, <stern@...land.harvard.edu>
CC:	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<swarren@...dotorg.org>, Venu Byravarasu <vbyravarasu@...dia.com>
Subject: [PATCH] usb: host: tegra: Reset Tegra USB controller before init

To clear any configurations made by U-Boot on Tegra USB controller,
reset it before init in probe.

Signed-off-by: Venu Byravarasu <vbyravarasu@...dia.com>
---
When U-Boot configures a Tegra USB controller in device mode and if the EHCI
driver of kernel tries to set it to HOST mode, message "irq 52: nobody cared"
appears and IRQ gets disabled.

This issue was initially reported with: http://marc.info/?l=linux-tegra&m=136110175423601&w=2

To avoid such issues, due to configurations made by U-Boot driver, reset the
Tegra USB controller, before configuring it by kernel.


 drivers/usb/host/ehci-tegra.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 568aecc..83d190a 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -28,6 +28,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/usb/ehci_def.h>
 #include <linux/usb/tegra_usb_phy.h>
+#include <linux/clk/tegra.h>
 
 #define TEGRA_USB_BASE			0xC5000000
 #define TEGRA_USB2_BASE			0xC5004000
@@ -691,6 +692,10 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 	if (err)
 		goto fail_clk;
 
+	tegra_periph_reset_assert(tegra->clk);
+	udelay(1);
+	tegra_periph_reset_deassert(tegra->clk);
+
 	tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node,
 		"nvidia,needs-double-reset");
 
-- 
1.7.0.4

--
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