linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"balbi@ti.com" <balbi@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>
Subject: Re: [PATCH 0/7] USB: PHY: Tegra: registering TEGRA USB PHY as platform driver
Date: Wed, 20 Mar 2013 12:52:18 -0600	[thread overview]
Message-ID: <514A0562.6080307@wwwdotorg.org> (raw)
In-Reply-To: <5149F394.4070600@wwwdotorg.org>

On 03/20/2013 11:36 AM, Stephen Warren wrote:
> On 03/20/2013 06:12 AM, Venu Byravarasu wrote:
>> Venu Byravarasu wrote at Wednesday, March 20, 2013 11:30 AM:
>>> Stephen Warren wrote at Wednesday, March 20, 2013 1:22 AM:
>>>> On 03/18/2013 06:29 AM, Venu Byravarasu wrote:
>>>>> As part of this series, apart from patch containing changes to register
>>>> TEGRA
>>>>> USB PHY driver as platform driver, prepared below patches:
>>>>> 1. Re-arranging & adding new DT properties.
>>>>> 2. Getting various params from DT properties added.
>>>>> 3. code clean up.
>>>>
>>>> Venu, I'm curious whether these patches were tested at all. I have found
>>>> at least two significant problems with trivial testing:
>>>
>>> Stephen,
>>> Initially started testing after applying each and every patch.
>>> Like that tested till first 5 patches.
>>> As did not see any issues till then, applied rest 2 patches at once and tested
>>> with that.
>>> Though did not see mouse getting vbus on the 1st boot, Vbus was coming
>>> fine after disconnect and connect.
>>> Hence did not test thereafter.
>>>
>>> After checking your current mail, tried now and observed that there seems to
>>> be some real issue with patch#7 only. (As tried now after applying till patch#
>>> 6 and did not see this issue).
>>> Will debug further on patch#7 and update with proper fix after addressing
>>> your other comments.
>>
>> Debugged further and found that the issue is because of http://marc.info/?l=linux-arm-kernel&m=135890098024987&w=2 
>> On reverting that patch and applying it on top of patch#7, able to see  enumeration working fine.
>>
>> Anyhow, will take care of your other comments and merge this change with patch#7 and resend
>> for review.
> 
> Venu, we already discussed this downstream, and I pointed out that patch
> is /extremely/ unlikely to cause any issue.

OK, so I found that reverting that patch does "solve" the issue, but
it's got nothing to do with that patch being wrong. There is some memory
corruption issue in your patches that is hidden if that patch is reverted.

In other words, on both Springbank (which you don't have, and has an EMC
scaling table so that the EMC frequency probably varies with CPU load)
and Ventana (which is what I assume you're testing on, and has no EMC
table, so the EMC clock frequency is fixed):

1) Tegra's for-next branch: Works fine.

2) (1) plus your patches: Broken as I described above.

3) (2) plus revert 9304512 "usb: host: tegra: don't touch EMC clock":
works fine on Ventana, somewhat works on Seaboard; lots of "can't
enumerate USB bus" messages, but eventually succeeds.

The really interesting thing is that if I take (2) above plus *just* the
following patch:

> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
> index 772fa29..7499240 100644
> --- a/drivers/usb/host/ehci-tegra.c
> +++ b/drivers/usb/host/ehci-tegra.c
> @@ -44,6 +44,7 @@ struct tegra_ehci_hcd {
>         struct ehci_hcd *ehci;
>         struct tegra_usb_phy *phy;
>         struct clk *clk;
> +       struct clk *emc_clk;
>         struct usb_phy *transceiver;
>         int host_resumed;
>         int port_resuming;

Then it works fine on both Ventana and Seaboard.

To me, this says that there's nothing at all wrong with 9304512 "usb:
host: tegra: don't touch EMC clock", but rather there is some memory
corruption going on in your patches series, and adding that extra field
in the struct just hides the effect of the memory corruption.

Please debug and fix that. Thanks.

  reply	other threads:[~2013-03-20 18:52 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 12:29 [PATCH 0/7] USB: PHY: Tegra: registering TEGRA USB PHY as platform driver Venu Byravarasu
     [not found] ` <1363609781-4045-1-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-18 12:29   ` [PATCH 1/7] ARM: tegra: finalize USB EHCI and PHY bindings Venu Byravarasu
     [not found]     ` <1363609781-4045-2-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-20 11:19       ` kishon
2013-03-20 12:15         ` Venu Byravarasu
     [not found]           ` <D958900912E20642BCBC71664EFECE3E6E5092FFE5-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2013-03-20 17:30             ` Stephen Warren
2013-03-18 12:29   ` [PATCH 2/7] ARM: tegra: update device trees for USB binding rework Venu Byravarasu
2013-03-19 19:53     ` Stephen Warren
     [not found]       ` <5148C253.6030007-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-20 12:20         ` Venu Byravarasu
2013-04-03 19:38         ` Stephen Warren
     [not found]     ` <1363609781-4045-3-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-20 11:23       ` kishon
     [not found]         ` <51499C29.6070405-l0cyMroinI0@public.gmane.org>
2013-03-20 12:17           ` Venu Byravarasu
     [not found]             ` <D958900912E20642BCBC71664EFECE3E6E5092FFE7-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2013-03-20 12:24               ` Felipe Balbi
2013-03-20 12:30                 ` Venu Byravarasu
2013-03-20 17:31         ` Stephen Warren
2013-03-18 12:29   ` [PATCH 7/7] usb: phy: registering tegra USB PHY as platform driver Venu Byravarasu
     [not found]     ` <1363609781-4045-8-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-19 20:21       ` Stephen Warren
     [not found]         ` <5148C8B6.90303-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-20 12:43           ` Venu Byravarasu
2013-03-20 17:51             ` Stephen Warren
2013-03-19 19:51   ` [PATCH 0/7] USB: PHY: Tegra: registering TEGRA " Stephen Warren
     [not found]     ` <5148C1DC.1020903-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-20  5:59       ` Venu Byravarasu
2013-04-03 19:47       ` Stephen Warren
2013-03-20 12:12     ` Venu Byravarasu
     [not found]       ` <D958900912E20642BCBC71664EFECE3E6E5092FFE2-QZ+emBqkIFBDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2013-03-20 17:36         ` Stephen Warren
2013-03-20 18:52           ` Stephen Warren [this message]
2013-03-18 12:29 ` [PATCH 3/7] usb: phy: tegra: Get PHY mode using DT Venu Byravarasu
2013-03-19 19:58   ` Stephen Warren
2013-03-20 12:24     ` Venu Byravarasu
2013-03-18 12:29 ` [PATCH 4/7] usb: phy: tegra: Return correct error value provided by clk_get_sys Venu Byravarasu
2013-03-18 12:29 ` [PATCH 5/7] usb: phy: tegra: get ULPI reset GPIO info using DT Venu Byravarasu
     [not found]   ` <1363609781-4045-6-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-18 13:01     ` Sergei Shtylyov
     [not found]       ` <5147102F.1060204-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2013-03-19  4:12         ` Venu Byravarasu
2013-03-19 20:03     ` Stephen Warren
2013-03-18 12:29 ` [PATCH 6/7] usb: phy: tegra: Add error handling & clean up Venu Byravarasu
     [not found]   ` <1363609781-4045-7-git-send-email-vbyravarasu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-19 19:25     ` Stephen Warren
2013-03-19 20:10     ` Stephen Warren
     [not found]       ` <5148C61F.9060708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-03 19:34         ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=514A0562.6080307@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=vbyravarasu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).