Commit cb92ae81 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by 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: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 83fcaf70
......@@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents)
dma_sg->dma_address = dent_addr;
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 +
(unsigned long) dent_len +
(IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment