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
d7861915
Commit
d7861915
authored
Apr 07, 2014
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger: use buffer helpers
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
b7e1bd6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fa-zio-trg.c
kernel/fa-zio-trg.c
+5
-5
No files found.
kernel/fa-zio-trg.c
View file @
d7861915
...
...
@@ -256,12 +256,12 @@ static int zfat_data_done(struct zio_cset *cset)
if
(
likely
(
i
<
fa
->
n_fires
))
{
/* Store filled blocks */
dev_dbg
(
&
fa
->
fmc
->
dev
,
"Store Block %i/%i
\n
"
,
i
+
1
,
fa
->
n_shots
);
bi
->
b_op
->
store_block
(
bi
,
zfad_block
[
i
].
block
);
zio_buffer_
store_block
(
bi
,
zfad_block
[
i
].
block
);
}
else
{
/* Free un-filled blocks */
dev_dbg
(
&
fa
->
fmc
->
dev
,
"Free un-acquired block %d/%d "
"(received %d shots)
\n
"
,
i
+
1
,
fa
->
n_shots
,
fa
->
n_fires
);
bi
->
b_op
->
free_block
(
bi
,
zfad_block
[
i
].
block
);
zio_buffer_
free_block
(
bi
,
zfad_block
[
i
].
block
);
}
/* Clear active block */
fa
->
n_shots
=
0
;
...
...
@@ -347,7 +347,7 @@ static int zfat_arm_trigger(struct zio_ti *ti)
/* Allocate ZIO blocks */
for
(
i
=
0
;
i
<
fa
->
n_shots
;
++
i
)
{
dev_dbg
(
msgdev
,
"Allocating block %d ...
\n
"
,
i
);
block
=
z
buf
->
b_op
->
alloc_block
(
interleave
->
bi
,
size
,
gfp
);
block
=
z
io_buffer_
alloc_block
(
interleave
->
bi
,
size
,
gfp
);
if
(
!
block
)
{
dev_err
(
msgdev
,
"
\n
arm trigger fail, cannot allocate block
\n
"
);
...
...
@@ -373,7 +373,7 @@ static int zfat_arm_trigger(struct zio_ti *ti)
out_allocate:
while
((
--
i
)
>=
0
)
z
buf
->
b_op
->
free_block
(
interleave
->
bi
,
zfad_block
[
i
].
block
);
z
io_buffer_
free_block
(
interleave
->
bi
,
zfad_block
[
i
].
block
);
kfree
(
zfad_block
);
interleave
->
priv_d
=
NULL
;
return
err
;
...
...
@@ -397,7 +397,7 @@ static void zfat_abort(struct zio_ti *ti)
dev_dbg
(
&
fa
->
fmc
->
dev
,
"Aborting trigger
\n
"
);
/* Free all blocks */
for
(
i
=
0
;
i
<
fa
->
n_shots
;
++
i
)
bi
->
b_op
->
free_block
(
bi
,
zfad_block
[
i
].
block
);
zio_buffer_
free_block
(
bi
,
zfad_block
[
i
].
block
);
kfree
(
zfad_block
);
cset
->
interleave
->
priv_d
=
NULL
;
}
...
...
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