Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 DEL 1ns 4cha - Software
Commits
473eead3
Commit
473eead3
authored
Jan 25, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/fd-irq: trivial: better calculation and message
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
dd1fcc01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fd-irq.c
kernel/fd-irq.c
+6
-4
No files found.
kernel/fd-irq.c
View file @
473eead3
...
...
@@ -72,7 +72,7 @@ int fd_read_sw_fifo(struct fd_dev *fd, struct zio_channel *chan)
/* Copy the sample to local storage */
spin_lock_irqsave
(
&
fd
->
lock
,
flags
);
i
=
fd
->
sw_fifo
.
tail
&
(
fd_sw_fifo_len
-
1
)
;
i
=
fd
->
sw_fifo
.
tail
%
fd_sw_fifo_len
;
t
=
fd
->
sw_fifo
.
t
[
i
];
fd
->
sw_fifo
.
tail
++
;
spin_unlock_irqrestore
(
&
fd
->
lock
,
flags
);
...
...
@@ -133,7 +133,7 @@ static int fd_read_hw_fifo(struct fd_dev *fd)
return
-
EAGAIN
;
t
=
fd
->
sw_fifo
.
t
;
t
+=
fd
->
sw_fifo
.
head
&
(
fd_sw_fifo_len
-
1
)
;
t
+=
fd
->
sw_fifo
.
head
%
fd_sw_fifo_len
;
/* Fetch the fifo entry to registers, so we can read them */
fd_writel
(
fd
,
FD_TSBR_ADVANCE_ADV
,
FD_REG_TSBR_ADVANCE
);
...
...
@@ -158,8 +158,10 @@ static int fd_read_hw_fifo(struct fd_dev *fd)
BUG_ON
(
diff
<
0
);
if
(
diff
>=
fd_sw_fifo_len
)
dev_warn
(
fd
->
fmc
->
hwdev
,
"Fifo overlow, dropped %i samples
\n
"
,
fd_sw_fifo_len
/
2
);
dev_warn
(
fd
->
fmc
->
hwdev
,
"Fifo overflow: "
" dropped %i samples (%li -> %li == %li)
\n
"
,
fd_sw_fifo_len
/
2
,
fd
->
sw_fifo
.
tail
,
fd
->
sw_fifo
.
head
,
diff
);
return
0
;
}
...
...
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