Hi, Grygorii Strashko <grygorii.strashko@xxxxxx> writes: > Felipe, Seems the problem might be deeper than on first look :( > > Lets see what grep says below. Even if we descope all SoC's drivers, > there still will be few USB core components which manipulate with DMA parameters: > > --- > ./drivers/usb/core/hcd.c: hcd->self.uses_dma = (dev->dma_mask != NULL); > usb_create_shared_hcd() > hcd->self.uses_dma = (dev->dma_mask != NULL); > > --- > ./drivers/usb/core/usb.c: dev->dev.dma_mask = bus->controller->dma_mask; > usb_alloc_dev() > dev->dev.dma_mask = bus->controller->dma_mask; > > --- > ./drivers/usb/core/message.c: intf->dev.dma_mask = dev->dev.dma_mask; > usb_set_configuration() > intf->dev.dma_mask = dev->dev.dma_mask; > > ^ why it is here is total mystery :( interfaces are devices in their own right. A USB device might be composite, meaning that it has several "devices" (functions or classes might be a better wording) bundled into a single device/package. > --- > ./drivers/usb/dwc3/core.c: dev->dma_mask = dev->parent->dma_mask; > > --- > ./drivers/usb/dwc2/hcd.c: /* Check if the bus driver or platform code has setup a dma_mask */ > dwc2_hcd_init() > dma_set_mask(hsotg->dev, DMA_BIT_MASK(32)) < 0) > > --- > ./drivers/usb/host/xhci.c: > xhci_gen_setup() > !dma_set_mask(dev, DMA_BIT_MASK(64) > ./drivers/usb/host/xhci-plat.c: if (WARN_ON(!pdev->dev.dma_mask)) > > --- > ./drivers/usb/musb/musb_core.c: if (use_dma && dev->dma_mask) { > > --- > ./drivers/usb/storage/scsiglue.c: if (!us->pusb_dev->bus->controller->dma_mask) > > It is big secret as for me (I'm USB noob:) which device is used for > DMA transfers and when :( heh, seems like we need to audit the usb subsystem (peripheral and host) :-) -- balbi
Attachment:
signature.asc
Description: PGP signature