Re: [PATCH 1/2] USB: Allow HCDs to specifiy their DMA alignment requirements

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

 



On Sat, 4 Sep 2010, Martin Fuzzey wrote:

> > Why would a driver want to sync the buffers manually when usbcore
> > already takes care of all that?  Besides, manual syncing won't mix with
> > usbmon.
> >
> However Documentation/usb/dma.txt says:
> - Some drivers may prefer to work with the model that they're mapping large
>   buffers, synchronizing their safe re-use.  (If there's no re-use, then let
>   usbcore do the map/unmap.)  Large periodic transfers make good examples
>   here, since it's cheaper to just synchronize the buffer than to unmap it
>   each time an urb completes and then re-map it on during resubmission.
> 
> Is this out of date then?

Yes, or inappropriate -- take your pick.  In that situation it's 
simplest for drivers to use coherent mappings.  On some platforms this 
might be less efficient because coherent buffers get placed in uncached 
memory.  We don't really have a good solution when that happens.

Drivers doing their own synchronization works okay _provided_ usbmon 
isn't being used and the HCD doesn't need to touch the data.  Both of 
these exceptions arose long after Documentation/usb/dma.txt was 
written.

Alan Stern

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