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:   Thu, 14 Oct 2021 11:10:58 +0530
From:   Sandeep Maheswaram <sanm@...eaurora.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.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@...r.kernel.org,
        linux-kernel@...r.kernel.org, ppratap@...eaurora.org,
        pkondeti@...eaurora.org
Subject: Re: [PATCH] usb: dwc: host: add xhci_plat_priv quirk
 XHCI_SKIP_PHY_INIT

Hi,

On 10/12/2021 1:02 PM, Greg Kroah-Hartman wrote:
> On Mon, Oct 11, 2021 at 03:31:57PM +0530, Sandeep Maheswaram wrote:
>> dwc3 manages PHY by own DRD driver, so skip the management by
>> HCD core.
>> During runtime suspend phy was not getting suspend because
>> runtime_usage value is 2.
>>
>> Signed-off-by: Sandeep Maheswaram <sanm@...eaurora.org>
>> ---
>>   drivers/usb/dwc3/host.c | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
>> index f29a264..0921f05 100644
>> --- a/drivers/usb/dwc3/host.c
>> +++ b/drivers/usb/dwc3/host.c
>> @@ -11,6 +11,11 @@
>>   #include <linux/platform_device.h>
>>   
>>   #include "core.h"
>> +#include "../host/xhci-plat.h"
> Why are you tying the dwc3 driver to the xhci driver?
>
Can we add a  property usb-skip-phy-init  in drivers/usb/dwc3/host.c

props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb-skip-phy-init");

and set the quirk like this in xhci-plat.c

if (device_property_read_bool(tmpdev, "usb-skip-phy-init"))
             xhci->quirks |= XHCI_SKIP_PHY_INIT;

as below

if (device_property_read_bool(tmpdev, "usb2-lpm-disable"))
             xhci->quirks |= XHCI_HW_LPM_DISABLE;

  if (device_property_read_bool(tmpdev, "usb3-lpm-capable"))
             xhci->quirks |= XHCI_LPM_SUPPORT;



>> +
>> +static const struct xhci_plat_priv xhci_plat_dwc3_xhci = {
>> +	.quirks = XHCI_SKIP_PHY_INIT,
> If these quirks are now "global", they should go into a
> include/linux/usb/ .h file, right?
>
> thanks,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ