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

Commit 30885313 authored by Paul Zimmerman's avatar Paul Zimmerman Committed by Greg Kroah-Hartman
Browse files

staging: dwc2: fix value of dma_mask



Passing the value DMA_BIT_MASK(31) to dma_set_mask() causes the
dwc2-pci driver to sometimes fail (cannot enumerate the connected
device). Change it to DMA_BIT_MASK(32) instead, which is a more
sensible value anyway.

Signed-off-by: default avatarPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4aa937e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2804,9 +2804,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,

	/* Set device flags indicating whether the HCD supports DMA */
	if (hsotg->core_params->dma_enable > 0) {
		if (dma_set_mask(hsotg->dev, DMA_BIT_MASK(31)) < 0)
			dev_warn(hsotg->dev,
				 "can't enable workaround for >2GB RAM\n");
		if (dma_set_mask(hsotg->dev, DMA_BIT_MASK(32)) < 0)
			dev_warn(hsotg->dev, "can't set DMA mask\n");
		if (dma_set_coherent_mask(hsotg->dev, DMA_BIT_MASK(31)) < 0)
			dev_warn(hsotg->dev,
				 "can't enable workaround for >2GB RAM\n");