projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39bade0
)
scsi: hisi_sas: fix dma_unmap_sg() parameter
author
Xiang Chen
<
[email protected]
>
Fri, 8 Dec 2017 17:16:33 +0000
(
01:16
+0800)
committer
Martin K. Petersen
<
[email protected]
>
Fri, 15 Dec 2017 02:25:02 +0000
(21:25 -0500)
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.
Signed-off-by: Xiang Chen <
[email protected]
>
Signed-off-by: John Garry <
[email protected]
>
Signed-off-by: Martin K. Petersen <
[email protected]
>
drivers/scsi/hisi_sas/hisi_sas_main.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 359ec52fc2fbe8f61e8dc48720f579527eb16ac1..d8425303eadd0d8253394fa68c89c54205c5d2d8 100644
(file)
--- a/
drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/
drivers/scsi/hisi_sas/hisi_sas_main.c
@@
-192,7
+192,8
@@
void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task,
if (!sas_protocol_ata(task->task_proto))
if (slot->n_elem)
- dma_unmap_sg(dev, task->scatter, slot->n_elem,
+ dma_unmap_sg(dev, task->scatter,
+ task->num_scatter,
task->data_dir);
if (sas_dev)
@@
-431,7
+432,8
@@
err_out:
dev_err(dev, "task prep: failed[%d]!\n", rc);
if (!sas_protocol_ata(task->task_proto))
if (n_elem)
- dma_unmap_sg(dev, task->scatter, n_elem,
+ dma_unmap_sg(dev, task->scatter,
+ task->num_scatter,
task->data_dir);
prep_out:
return rc;