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:	Mon, 06 Jun 2016 17:59:08 +0300
From:	Felipe Balbi <balbi@...nel.org>
To:	Baolin Wang <baolin.wang@...aro.org>, gregkh@...uxfoundation.org
Cc:	broonie@...nel.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, baolin.wang@...aro.org
Subject: Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device


Hi,

Baolin Wang <baolin.wang@...aro.org> writes:
> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if
> it did not call 'arch_setup_dma_ops' at device creation time, that will
> cause failure when setting the dma mask for device.
>
> Thus this patch set the xhci device dma_ops from the parent device if
> the xhci device dma_ops is 'dummy_dma_ops'.
>
> Changes since v1:
>  - Add CONFIG_ARM64 macro.
>
> Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
> ---
>  drivers/usb/dwc3/host.c |    5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index c679f63..edb666d 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -32,6 +32,11 @@ int dwc3_host_init(struct dwc3 *dwc)
>  		return -ENOMEM;
>  	}
>  
> +#ifdef CONFIG_ARM64
> +	if (get_dma_ops(&xhci->dev) == get_dma_ops(NULL))
> +		xhci->dev.archdata.dma_ops = get_dma_ops(dwc->dev);
> +#endif

I don't like the ifdef and also don't like that this is done in dwc3
itself. Seems like we need something like this done from the
platform_bus core.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ