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-next>] [day] [month] [year] [list]
Date:	Fri,  3 Jun 2016 19:50:41 +0800
From:	Baolin Wang <baolin.wang@...aro.org>
To:	balbi@...nel.org, gregkh@...uxfoundation.org
Cc:	broonie@...nel.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, baolin.wang@...aro.org
Subject: [PATCH] usb: dwc3: host: Set the dma_ops for xhci device

It will be failed when xhci device set the dma mask, if the xhci device
dma_ops is dummy. Thus set the xhci device dma_ops from the parent device.

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
 drivers/usb/dwc3/host.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index c679f63..7ce55c9 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -32,6 +32,9 @@ int dwc3_host_init(struct dwc3 *dwc)
 		return -ENOMEM;
 	}
 
+	if (get_dma_ops(&xhci->dev) == get_dma_ops(NULL))
+		xhci->dev.archdata.dma_ops = get_dma_ops(dwc->dev);
+
 	dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask);
 
 	xhci->dev.parent	= dwc->dev;
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ