Instead of just setting the dma_mask to the empty mask, the pointer to the mask is cleared altogether. This is needed because usb_create_shared_hcd sets hcd->self.uses_dma based on dev->dma_mask != NULL, not by looking at the actual mask itself. This change thus makes hcd->self.uses_dma have the correct value when not using dma even though a dma_mask was set up by the platform or pci driver (which in practice should only occur when manually disabling dma, assuming that a dma_mask is normally only setup when dma is supported and enabled). This in turn prevents usb core from doing some dma-specific stuff that isn't needed (though everything seemed to work with the wrong value of uses_dma as well). Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx> --- drivers/staging/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index 7727112..ac34d4a 100644 --- a/drivers/staging/dwc2/hcd.c +++ b/drivers/staging/dwc2/hcd.c @@ -2810,7 +2810,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq, dev_warn(hsotg->dev, "can't enable workaround for >2GB RAM\n"); } else { - dma_set_mask(hsotg->dev, 0); + hsotg->dev->dma_mask = NULL; dma_set_coherent_mask(hsotg->dev, 0); } -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html