On Wed, Dec 13, 2023 at 08:44:51AM +0000, Kasireddy, Vivek wrote: > That is, populate a scatterlist with ubuf->pagecount number of entries, > where each segment if of size PAGE_SIZE, in order to be consistent and > support a wide variety of DMA importers that may not probably handle > segments that are larger than PAGE_SIZE. No! This is totally wrong, sg lists must aggregate up to the limits specified in the struct device. We have importer helpers that do this aggregation. If some driver is working with a sglist and can't handle this it is simply broken. Do not mess up core code to accomodate such things. Jason