Re: Is adding offset to dma address is valid operation?

2018-03-26 Thread Robin Murphy
On 26/03/18 13:31, Harsh Jain wrote: On 26-03-2018 17:15, Robin Murphy wrote: Hi Harsh, On 26/03/18 10:55, Harsh Jain wrote: Hi, Can we add offset to dma address received from IOMMU in scatter/Gather list before sending it to H/W. Address to HW = sg_dma_address(sg) + offset, where 0 < off

Re: Is adding offset to dma address is valid operation?

2018-03-26 Thread Harsh Jain
On 26-03-2018 17:15, Robin Murphy wrote: > Hi Harsh, > > On 26/03/18 10:55, Harsh Jain wrote: >> Hi, >> >> Can we add  offset to dma address received from IOMMU in scatter/Gather list >> before sending it to H/W. >> >> Address to HW = sg_dma_address(sg) + offset, where 0 < offset < >> sg_dma_le

Re: Is adding offset to dma address is valid operation?

2018-03-26 Thread Harsh Jain
On 26-03-2018 17:15, Robin Murphy wrote: > Hi Harsh, > > On 26/03/18 10:55, Harsh Jain wrote: >> Hi, >> >> Can we add  offset to dma address received from IOMMU in scatter/Gather list >> before sending it to H/W. >> >> Address to HW = sg_dma_address(sg) + offset, where 0 < offset < >> sg_dma_len

Re: Is adding offset to dma address is valid operation?

2018-03-26 Thread Robin Murphy
Hi Harsh, On 26/03/18 10:55, Harsh Jain wrote: Hi, Can we add  offset to dma address received from IOMMU in scatter/Gather list before sending it to H/W. Address to HW = sg_dma_address(sg) + offset, where 0 < offset < sg_dma_len(sg). sg_dma_address() should already account for sg->offset (i

Is adding offset to dma address is valid operation?

2018-03-26 Thread Harsh Jain
Hi, Can we add  offset to dma address received from IOMMU in scatter/Gather list before sending it to H/W. Address to HW = sg_dma_address(sg) + offset, where 0 < offset < sg_dma_len(sg). I need this operation to make sure our H/W does not receives entry of size greater than 2K. Regards Harsh