Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
FMC ADC 100M 14b 4cha - Software
Commits
542b4bd0
Commit
542b4bd0
authored
Aug 23, 2012
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fa-dma.c; use cur_dev_mem to index the block on device
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
2c8948d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fa-dma.c
fa-dma.c
+6
-4
No files found.
fa-dma.c
View file @
542b4bd0
...
...
@@ -103,17 +103,19 @@ int zfad_map_dma(struct zio_cset *cset)
dev_err
(
fa
->
fmc
->
hwdev
,
"cannot map dma memory
\n
"
);
goto
out_map
;
}
/* Configure DMA items */
for_each_sg
(
fa
->
sgt
.
sgl
,
sg
,
fa
->
sgt
.
nents
,
i
)
{
dev_dbg
(
&
cset
->
head
.
dev
,
"configure DMA item %d(%p)"
"(addr: 0x%p, len: %d)
\n
"
,
i
,
sg
,
sg_dma_address
(
sg
),
sg_dma_len
(
sg
));
"(addr: 0x%p, len: %d)(dev off: 0x%x)
\n
"
,
i
,
sg
,
sg_dma_address
(
sg
),
sg_dma_len
(
sg
),
fa
->
cur_dev_mem
);
/* Prepare DMA item */
items
[
i
].
start_addr
=
fa
->
dev_data
_mem
;
items
[
i
].
start_addr
=
fa
->
cur_dev
_mem
;
items
[
i
].
dma_addr_l
=
sg_dma_address
(
sg
)
&
0xFFFFFFFF
;
items
[
i
].
dma_addr_h
=
sg_dma_address
(
sg
)
>>
32
;
items
[
i
].
dma_len
=
sg_dma_len
(
sg
);
fa
->
dev_data
_mem
+=
items
[
i
].
dma_len
;
fa
->
cur_dev
_mem
+=
items
[
i
].
dma_len
;
if
(
!
sg_is_last
(
sg
))
{
/* more transfers */
/* uint64_t so it works on 32 and 64 bit */
tmp
=
fa
->
dma_list_item
;
...
...
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