public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Roger Quadros <rogerq@ti.com>
Cc: <balbi@ti.com>, Chao Xie <chao.xie@marvell.com>,
	<gregkh@linuxfoundation.org>, <stern@rowland.harvard.edu>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <xiechao.mail@gmail.com>
Subject: Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller
Date: Tue, 18 Jun 2013 11:48:45 +0300	[thread overview]
Message-ID: <20130618084845.GM5461@arwen.pp.htv.fi> (raw)
In-Reply-To: <51C01E11.8050201@ti.com>

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi,

On Tue, Jun 18, 2013 at 11:45:05AM +0300, Roger Quadros wrote:
> >>>>> this looks wrong for two reasons:
> >>>>>
> >>>>> a) you're not grabbing the PHY here.
> >>>>>
> >>>>> 	You can't just assume another entity grabbed your PHY for you.
> >>>>
> >>>> Isn't that done in the controller drivers e.g. ehci-fsl.c, ohci-omap, etc?
> >>>
> >>> right, and what I'm saying is that it should all be re-factored into
> >>> ehci-hcd core :-)
> >>>
> >>>> If the controllers don't want HCD core to manage the PHY they can just set it
> >>>> to some error code.
> >>>
> >>> they shouldn't have the choice, otherwise it'll be a bit of a PITA to
> >>> maintain the code. ehci core tries to grab the PHY, if it's not there,
> >>> try to continue anyway. Assume it's not needed.
> >>>
> >>
> >> OK fine, but ehci-omap is a weird case as it needs a slightly different
> >> sequence as to when PHY is initialized depending on which mode it is. (Transceiver
> >> or transceiver-less). please see this fix.
> >> http://www.spinics.net/lists/stable/msg12106.html
> >>
> >> All I'm saying as that ehci-omap needs a way to tell hcd core that it needs PHY
> >> handling for itself.
> > 
> > why don't you do that always ? Meaning, why don't you *always* take PHY
> > out of suspend ? If PHY is suspended, you can't wakeup unless you have
> > (in OMAP case) pad wakeup working, right ?
> > 
> 
> Maybe I wasn't clear before. This is nothing about wakeup and e always take PHY out of suspend. 
> The problem is when to take it out of suspend relative to when EHCI controller starts.
> Let me clarify.
> 
> In Transceiver mode we need this.
> 
> - bring phy out of reset
> - start EHCI controller
> 
> Whereas for Transceiver-less mode we need this.
> 
> - start EHCI controller
> - bring phy out of reset
> 
> If there is some way to signal this behaviour to the HCD core, it
> should be good enough.

alright, now I get it. That's quite messed up that it has to be this way
:-p

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-06-18  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  7:15 [PATCH] USB: initialize or shutdown PHY when add or remove host controller Chao Xie
2013-06-18  8:01 ` Felipe Balbi
2013-06-18  8:23   ` Roger Quadros
2013-06-18  8:24     ` Felipe Balbi
2013-06-18  8:34       ` Roger Quadros
2013-06-18  8:37         ` Felipe Balbi
2013-06-18  8:45           ` Roger Quadros
2013-06-18  8:48             ` Felipe Balbi [this message]
2013-06-18  9:27               ` Chao Xie
2013-06-18 14:53       ` Alan Stern
2013-06-18 15:00         ` Felipe Balbi
2013-06-18 15:18           ` Alan Stern

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=20130618084845.GM5461@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=chao.xie@marvell.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rogerq@ti.com \
    --cc=stern@rowland.harvard.edu \
    --cc=xiechao.mail@gmail.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