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]
Date:   Thu, 29 Dec 2022 15:44:02 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Daehwan Jung" <dh10.jung@...sung.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
        "Thinh Nguyen" <Thinh.Nguyen@...opsys.com>,
        "Mathias Nyman" <mathias.nyman@...el.com>,
        "Felipe Balbi" <balbi@...nel.org>
Cc:     "open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "open list" <linux-kernel@...r.kernel.org>, sc.suh@...sung.com,
        taehyun.cho@...sung.com, jh0801.jung@...sung.com,
        eomji.oh@...sung.com
Subject: Re: [RFC PATCH v2 1/3] usb: support Samsung Exynos xHCI Controller

On Thu, Dec 29, 2022, at 10:57, Daehwan Jung wrote:
> Currently, dwc3 invokes just xhci platform driver without any data.
> We add xhci node as child of dwc3 node in order to get data from
> device tree. It populates "xhci" child by name during initialization
> of host. This patch only effects if dwc3 node has a child named "xhci"
> not to disturb original path.

Using child nodes is not the normal way of abstracting a soc specific
variant of a device, though there are some USB host drivers that
do this. Just use the node itself and add whatever samsung specific
properties are needed based on the compatible string.

> @@ -86,6 +90,33 @@ static void xhci_plat_quirks(struct device *dev, 
> struct xhci_hcd *xhci)
>  	xhci->quirks |= XHCI_PLAT | priv->quirks;
>  }
> 
> +static int xhci_plat_bus_suspend(struct usb_hcd *hcd)
> +{
> +	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
> +
> +	if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) {
> +		if (hcd == xhci->main_hcd)
> +			__pm_relax(xhci->main_wakelock);
> +		else
> +			__pm_relax(xhci->shared_wakelock);
> +	}
> +
> +	return xhci_bus_suspend(hcd);
> +}
> +
> +static int xhci_plat_bus_resume(struct usb_hcd *hcd)
> +{
> +	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
> +
> +	if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) {
> +		if (hcd == xhci->main_hcd)
> +			__pm_stay_awake(xhci->main_wakelock);
> +		else
> +			__pm_stay_awake(xhci->shared_wakelock);
> +	}
> +	return xhci_bus_resume(hcd);
> +}

It looks like these are no longer tied to the Samsung
device type, which would be a step in the right direction,
but I think adding this should be a separate patch since
it is not a hardware specific change but a new feature.

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ