Hello,
According to DMA-API.txt (4.1.13):
Quote:
With scatterlists, you use the resulting mapping like this:
int i, count = dma_map_sg(dev, sglist, nents, direction);
struct scatterlist *sg;
for_each_sg(sglist, sg, count, i) {
hw_address[i] = sg_dma_address(sg);
hw_len[i] = sg_dma_len(sg);
}
where nents is the number of entries in the sglist.
|
I have to implement a "write" from application to device driver.
The buffer passed to the driver is constructed from pages.
What is the value of "nents" ? How can I find it ?
Thank you,
Zvika