Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
canbus
CTU CAN FD IP Core
Commits
e8165763
Commit
e8165763
authored
Sep 06, 2018
by
Martin Jeřábek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driver: fix clearing the Data Overrun flag
Closes
#183
parent
f0213d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
driver/ctu_can_fd.c
driver/ctu_can_fd.c
+13
-0
No files found.
driver/ctu_can_fd.c
View file @
e8165763
...
...
@@ -440,6 +440,8 @@ err_warning:
/* Check for RX FIFO Overflow interrupt */
if
(
isr
.
s
.
doi
)
{
union
ctu_can_fd_int_stat
icr
;
netdev_info
(
ndev
,
" doi (rx fifo overflow)"
);
stats
->
rx_over_errors
++
;
stats
->
rx_errors
++
;
...
...
@@ -447,6 +449,17 @@ err_warning:
cf
->
can_id
|=
CAN_ERR_CRTL
;
cf
->
data
[
1
]
|=
CAN_ERR_CRTL_RX_OVERFLOW
;
}
/* Clear Data Overrun */
ctu_can_fd_clr_overrun_flag
(
&
priv
->
p
);
// TODO: this still sometimes fails without the print (maybe)
// -> test it
netdev_info
(
ndev
,
" DOS=%d after COMMAND[CDR]"
,
ctu_can_get_status
(
&
priv
->
p
).
s
.
dos
);
/* And clear the DOI flag again */
icr
.
u32
=
0
;
icr
.
s
.
doi
=
1
;
ctu_can_fd_int_clr
(
&
priv
->
p
,
icr
);
}
/* Check for Bus Error interrupt */
...
...
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