Skip to content

Commit

Permalink
staging: dwc2: fix value of dma_mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Zimmerman authored and Greg Kroah-Hartman committed May 30, 2013
1 parent e4aa937 commit 3088531
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/dwc2/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3088531

Please sign in to comment.