Patchwork [2/3] usb: appledisplay: Set urb transfer_flags to URB_NO_TRANSFER_DMA_MAP

login
register
mail settings
Submitter alex.theissen@me.com
Date Dec. 4, 2018, 10:43 p.m.
Message ID <20181204224337.29122-3-alex.theissen@me.com>
Download mbox | patch
Permalink /patch/672469/
State New
Headers show

Comments

alex.theissen@me.com - Dec. 4, 2018, 10:43 p.m.
From: Alexander Theissen <alex.theissen@me.com>

The driver does allocate a DMA address with usb_alloc_coherent but did
not set the appropriate flag to signal that transfer_dma is set to a
valid value.

Signed-off-by: Alexander Theissen <alex.theissen@me.com>
---
 drivers/usb/misc/appledisplay.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index 39ca31b4de46..2f3c4769238d 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -261,6 +261,7 @@  static int appledisplay_probe(struct usb_interface *iface,
 		usb_rcvintpipe(udev, int_in_endpointAddr),
 		pdata->urbdata, ACD_URB_BUFFER_LEN, appledisplay_complete,
 		pdata, 1);
+	pdata->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
 	if (usb_submit_urb(pdata->urb, GFP_KERNEL)) {
 		retval = -EIO;
 		dev_err(&iface->dev, "Submitting URB failed\n");