提交 cb92ae81 编写于 作者: F FUJITA Tomonori 提交者: Jens Axboe

sparc64: zero out dma_length

zero out dma_length in the entry immediately following the last mapped
entry for unmap_sg.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 83fcaf70
...@@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) ...@@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents)
dma_sg->dma_address = dent_addr; dma_sg->dma_address = dent_addr;
dma_sg->dma_length = dent_len; dma_sg->dma_length = dent_len;
if (dma_sg != sg) {
dma_sg = next_sg(dma_sg);
dma_sg->dma_length = 0;
}
return ((unsigned long) dent_addr + return ((unsigned long) dent_addr +
(unsigned long) dent_len + (unsigned long) dent_len +
(IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册