Commit 755f04f7 authored by Yu'an Wang's avatar Yu'an Wang Committed by Yang Yingliang
Browse files

qm: fix wrong number of sg elements after dma map



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

1. use sgl API to get sgl dma addr and len
Use sgl API to get sgl dma addr and len, this will help to avoid compile
error in some platforms. So NEED_SG_DMA_LENGTH can be removed here, which
can only be selected by arch code.
2. Fix issue with wrong number of sg elements after dma map
We fill the hardware scatter gather list assuming it will need the same
number of elements at the original scatterlist. If an IOMMU is involved,
then it may well need fewer. The return value of dma_map_sg tells us how
many.
Probably never caused visible problems as the hardware won't get to
the elements that are incorrect before it finds enough space.
3.Remove useless MODULE macros
As we already merge hardware sgl into hisi_qm module, remove useless
MODULE macros

Signed-off-by: default avatarYu'an Wang <wangyuan46@huawei.com>
Reviewed-by: default avatarCheng Hu <hucheng.hu@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent e6fae7ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment