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] [thread-next>] [day] [month] [year] [list]
Message-ID: <eaca1146-666d-2b1f-637d-7a5f3e2ad989@quicinc.com>
Date:   Mon, 24 Jan 2022 10:57:59 +0530
From:   Sandeep Maheswaram <quic_c_sanm@...cinc.com>
To:     Jun Li <lijun.kernel@...il.com>, Li Jun <jun.li@....com>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Doug Anderson <dianders@...omium.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Mathias Nyman <mathias.nyman@...el.com>,
        <linux-arm-msm@...r.kernel.org>,
        Linux USB List <linux-usb@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>, <quic_pkondeti@...cinc.com>,
        <quic_ppratap@...cinc.com>
Subject: Re: [PATCH v10 2/6] usb: dwc3: core: Host wake up support from system
 suspend


On 1/18/2022 2:27 PM, Jun Li wrote:
> Sandeep Maheswaram <quic_c_sanm@...cinc.com> 于2022年1月17日周一 22:03写道:
>> Avoiding phy powerdown when wakeup capable devices are connected
>> by checking wakeup property of xhci plat device.
>> Phy should be on to wake up the device from suspend using wakeup capable
>> devices such as keyboard and mouse.
>>
>> Signed-off-by: Sandeep Maheswaram <quic_c_sanm@...cinc.com>
>> Tested-by: Brian Norris <briannorris@...omium.org>
>> ---
>> Remove redundant else part in dwc3_resume_common. This will not be
>> required if GDSC is always on during suspend/resume.
>>
>>
>>   drivers/usb/dwc3/core.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index f4c0995..e7a5e3f 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -1789,7 +1789,7 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
>>                  dwc3_core_exit(dwc);
>>                  break;
>>          case DWC3_GCTL_PRTCAP_HOST:
>> -               if (!PMSG_IS_AUTO(msg)) {
>> +               if (!PMSG_IS_AUTO(msg) && !device_may_wakeup(&dwc->xhci->dev)) {
>>                          dwc3_core_exit(dwc);
>>                          break;
>>                  }
>> @@ -1850,7 +1850,7 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg)
>>                  spin_unlock_irqrestore(&dwc->lock, flags);
>>                  break;
>>          case DWC3_GCTL_PRTCAP_HOST:
>> -               if (!PMSG_IS_AUTO(msg)) {
>> +               if (!PMSG_IS_AUTO(msg) && !device_may_wakeup(&dwc->xhci->dev)) {
> If XHCI_SKIP_PHY_INIT is not set, I see the usb core will help to
> handle phy power on/off and init/exit via drivers/usb/core/phy.c, so
> if the wakeup is enabled for controller, then finally the phy will not
> be power off/exit. I am wondering if this change is actually required if
> that is the case.
>
> Sorry for the late comment.
>
> Li Jun
>
The patch is to avoid phy power off in case only if some wakeup capable 
devices are connected.

Regarding  XHCI_SKIP_PHY_INIT we are setting  in this patch

https://patchwork.kernel.org/project/linux-arm-msm/patch/1640153383-21036-1-git-send-email-quic_c_sanm@quicinc.com/

>
>>                          ret = dwc3_core_init_for_resume(dwc);
>>                          if (ret)
>>                                  return ret;
>> --
>> 2.7.4
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ