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-prev] [day] [month] [year] [list]
Date:	Tue, 18 Nov 2014 09:11:19 +0800
From:	Kever Yang <kever.yang@...k-chips.com>
To:	Julius Werner <jwerner@...omium.org>
CC:	Paul Zimmerman <paulz@...opsys.com>, Felipe Balbi <balbi@...com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>,
	Romain Perier <romain.perier@...il.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Douglas Anderson <dianders@...omium.org>,
	Sonny Rao <sonnyrao@...omium.org>,
	addy ke <addy.ke@...k-chips.com>,
	Eddie Cai <cf@...k-chips.com>, wulf <wulf@...k-chips.com>,
	Tao Huang <huangtao@...k-chips.com>,
	"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
	Roy Li <roy.li@...k-chips.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc2: resume root hub when device detect with suspend
 state

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@...k-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@...k-chips.com>
>> Signed-off-by: Kever Yang <kever.yang@...k-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

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