staging: dwc2: fix value of dma_mask
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Fri, 24 May 2013 23:27:56 +0000 (16:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 12:14:30 +0000 (21:14 +0900)
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: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dwc2/hcd.c

index 827ab781ae9bd68f8aca7f2176babdc00cf1695e..8551ccedf0376284c4d81648db0c2cbddde6d946 100644 (file)
@@ -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");