RE: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Felipe Balbi
> Sent: 08 March 2016 13:48
...
> wonder if we should provide a generic static inline for that. Seems like
> that will replicate on many drivers. How about:
> 
> static inline int dma_try_mask_and_coherent(struct device *dev)
> {
>         int ret;
> 
>         ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
>         if (ret) {
>         	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
>                 if (ret) {
>                 	dev_err(dev, "failed to set dma mask\n");
>                         return ret;
>                 }
>         }
> 
> 	return 0;
> }

Probably worthy of a real function.
Maybe dma_set_mask_and_coherent_64_32(dev) ?

	David

--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux