Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f556be0a authored by Jack Pham's avatar Jack Pham
Browse files

usb: xhci: Use correct device for DMA map/unmap calls



xhci_unmap_td_bounce_buffer() and xhci_align_td() in xhci-ring.c
are still using the bus->controller device to perform DMA map/unmap
operations when they should instead be using bus->sysdev. This can
lead to errors since these TDs would be mapped using a different
device than the rest of the driver.

Change-Id: If55d4e8b18d2d731159518fe6c53521ea75a2315
Fixes: 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA configuration")
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 9faa51df
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -675,7 +675,7 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci, struct xhci_ring *ring,
				 struct xhci_td *td)
{
	struct device *dev = xhci_to_hcd(xhci)->self.controller;
	struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
	struct xhci_segment *seg = td->bounce_seg;
	struct urb *urb = td->urb;

@@ -3153,7 +3153,7 @@ static u32 xhci_td_remainder(struct xhci_hcd *xhci, int transferred,
static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,
			 u32 *trb_buff_len, struct xhci_segment *seg)
{
	struct device *dev = xhci_to_hcd(xhci)->self.controller;
	struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
	unsigned int unalign;
	unsigned int max_pkt;
	u32 new_buff_len;