Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC
Commits
dd33c15e
Commit
dd33c15e
authored
Aug 12, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv:dma: auto-increment memory address for consecutive sg
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
8a8ce4cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
spec-gn412x-dma.c
software/kernel/spec-gn412x-dma.c
+3
-1
No files found.
software/kernel/spec-gn412x-dma.c
View file @
dd33c15e
...
@@ -418,6 +418,7 @@ static struct dma_async_tx_descriptor *gn412x_dma_prep_slave_sg(
...
@@ -418,6 +418,7 @@ static struct dma_async_tx_descriptor *gn412x_dma_prep_slave_sg(
struct
scatterlist
*
sg
;
struct
scatterlist
*
sg
;
struct
gn412x_dma_tx_hw
*
tx_hw
=
NULL
;
struct
gn412x_dma_tx_hw
*
tx_hw
=
NULL
;
dma_addr_t
phys
=
0
;
dma_addr_t
phys
=
0
;
dma_addr_t
src_addr
;
int
i
;
int
i
;
if
(
unlikely
(
direction
!=
DMA_DEV_TO_MEM
))
{
if
(
unlikely
(
direction
!=
DMA_DEV_TO_MEM
))
{
...
@@ -454,7 +455,8 @@ static struct dma_async_tx_descriptor *gn412x_dma_prep_slave_sg(
...
@@ -454,7 +455,8 @@ static struct dma_async_tx_descriptor *gn412x_dma_prep_slave_sg(
tx_hw
=
dma_pool_alloc
(
gn412x_dma
->
pool
,
GFP_NOWAIT
,
&
phys
);
tx_hw
=
dma_pool_alloc
(
gn412x_dma
->
pool
,
GFP_NOWAIT
,
&
phys
);
if
(
!
tx_hw
)
if
(
!
tx_hw
)
goto
err_alloc_pool
;
goto
err_alloc_pool
;
gn412x_dma_prep
(
tx_hw
,
sg
,
sconfig
->
src_addr
);
gn412x_dma_prep
(
tx_hw
,
sg
,
src_addr
);
src_addr
+=
sg_dma_len
(
sg
);
gn412x_dma_tx
->
sgl_hw
[
i
]
=
tx_hw
;
gn412x_dma_tx
->
sgl_hw
[
i
]
=
tx_hw
;
gn412x_dma_tx
->
tx
.
phys
=
phys
;
gn412x_dma_tx
->
tx
.
phys
=
phys
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment