All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kever Yang <kever.yang@rock-chips.com>
To: Julius Werner <jwerner@chromium.org>
Cc: Paul Zimmerman <paulz@synopsys.com>, Felipe Balbi <balbi@ti.com>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	Romain Perier <romain.perier@gmail.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Douglas Anderson <dianders@chromium.org>,
	Sonny Rao <sonnyrao@chromium.org>,
	addy ke <addy.ke@rock-chips.com>, Eddie Cai <cf@rock-chips.com>,
	wulf <wulf@rock-chips.com>, Tao Huang <huangtao@rock-chips.com>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Roy Li <roy.li@rock-chips.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc2: resume root hub when device detect with suspend state
Date: Tue, 18 Nov 2014 09:11:19 +0800	[thread overview]
Message-ID: <546A9CB7.1030207@rock-chips.com> (raw)
In-Reply-To: <CAODwPW8r0cq2aozVjY9o9wOwqa4Nn1Oom9+Td8e-H0FoDf-LfQ@mail.gmail.com>

Hi Julius,

On 11/18/2014 05:21 AM, Julius Werner wrote:
> On Mon, Nov 17, 2014 at 5:14 AM, Kever Yang <kever.yang@rock-chips.com> wrote:
>> After we implement the bus_suspend/resume, auto suspend id enabled.
>> The root hub will be auto suspend if there is no device connected,
>> we need to resume the root hub when a device connect detect.
>>
>> This patch tested on rk3288.
>>
>> Signed-off-by: Roy Li <roy.li@rock-chips.com>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>>   drivers/usb/dwc2/hcd_intr.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
>> index 551ba87..c8299fd 100644
>> --- a/drivers/usb/dwc2/hcd_intr.c
>> +++ b/drivers/usb/dwc2/hcd_intr.c
>> @@ -355,6 +355,13 @@ static void dwc2_port_intr(struct dwc2_hsotg *hsotg)
>>                  hprt0_modify |= HPRT0_CONNDET;
>>
>>                  /*
>> +                * Check if root hub is in suspend state
>> +                * if root hub in suspend, resume it.
>> +                */
>> +               if ((bus->root_hub) && (hcd->state == HC_STATE_SUSPENDED))
> What is bus->root_hub checking for? Is there any chance that this
> could be NULL here?
I add bus->root_hub check because the _dwc2_hcd_start check this before it
call the usb_hcd_resume_root_hub.
I think we don't need this check for the root_hub must be there if we 
register
the HCD success, right?
I will remove this in next version.
>
>> +                       usb_hcd_resume_root_hub(hcd);
>> +
>> +               /*
>>                   * The Hub driver asserts a reset when it sees port connect
>>                   * status change flag
>>                   */
>> --
>> 1.9.1
> Seems sensible in general. Does this actually fix the problem Doug was
> reporting?
Yes, this fix the problem Doug reported with my dwc2 hcd suspend/resume 
patch.

- Kever


      reply	other threads:[~2014-11-18  1:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 13:14 [PATCH] usb: dwc2: resume root hub when device detect with suspend state Kever Yang
2014-11-17 15:21 ` Kever Yang
2014-11-17 18:16 ` Sergei Shtylyov
2014-11-17 21:21 ` Julius Werner
2014-11-18  1:11   ` Kever Yang [this message]

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=546A9CB7.1030207@rock-chips.com \
    --to=kever.yang@rock-chips.com \
    --cc=addy.ke@rock-chips.com \
    --cc=balbi@ti.com \
    --cc=cf@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=paulz@synopsys.com \
    --cc=romain.perier@gmail.com \
    --cc=roy.li@rock-chips.com \
    --cc=sonnyrao@chromium.org \
    --cc=wulf@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.