Message ID | 1515033405-37477-3-git-send-email-chenxiang66@hisilicon.com (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index ed197bc..225d947 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -2914,7 +2914,7 @@ static void isci_request_io_request_complete(struct isci_host *ihost, task->total_xfer_len, task->data_dir); else /* unmap the sgl dma addresses */ dma_unmap_sg(&ihost->pdev->dev, task->scatter, - request->num_sg_entries, task->data_dir); + task->num_scatter, task->data_dir); break; case SAS_PROTOCOL_SMP: { struct scatterlist *sg = &task->smp_task.smp_req;
For function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. Fix this usage. Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Fixes: d9dcb4ba7("isci: unify isci_host and scic_sds_controller") Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> --- drivers/scsi/isci/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)