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
a6a3d20d
Commit
a6a3d20d
authored
Apr 11, 2016
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: take into account time-tag size when checking overflow
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
7da3fcd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
fmc-adc-100m14b4cha.h
kernel/fmc-adc-100m14b4cha.h
+4
-3
No files found.
kernel/fmc-adc-100m14b4cha.h
View file @
a6a3d20d
...
...
@@ -422,15 +422,16 @@ static inline int zfat_overflow_detection(struct zio_ti *ti, unsigned int addr,
/*
* +1 because of the trigger samples, which is not counted as
* post-sample by the ADC
* +2 because of the timetag at the end
*/
shot_size
=
((
pre_t
+
post_t
+
1
)
*
ti
->
cset
->
ssize
)
*
FA100M14B4C_NCHAN
;
if
(
(
shot_size
*
nshot_t
)
>
=
FA100M14B4C_MAX_ACQ_BYTE
)
{
shot_size
=
((
pre_t
+
post_t
+
1
+
2
)
*
ti
->
cset
->
ssize
)
*
FA100M14B4C_NCHAN
;
if
(
(
shot_size
*
nshot_t
)
>
FA100M14B4C_MAX_ACQ_BYTE
)
{
dev_err
(
&
ti
->
head
.
dev
,
"Cannot acquire, dev memory overflow
\n
"
);
return
-
ENOMEM
;
}
/* in case of multi shot, each shot cannot exceed the dpram size */
if
(
(
nshot_t
>
1
)
&&
(
shot_size
>
=
FA100M14B4C_MAX_MSHOT_ACQ_BYTE
)
)
{
(
shot_size
>
FA100M14B4C_MAX_MSHOT_ACQ_BYTE
)
)
{
dev_err
(
&
ti
->
head
.
dev
,
"Cannot acquire such amount of samples "
"(shot_size: %d pre-samp:%d post-samp:%d) in multi shot mode."
"dev memory overflow
\n
"
,
...
...
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