Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
4df15ce2
Commit
4df15ce2
authored
13 years ago
by
Tomasz Wlostowski
Browse files
Options
Downloads
Patches
Plain Diff
minic.c: minic_rx_frame() should return negative on error
parent
3aa70300
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dev/minic.c
+4
-0
4 additions, 0 deletions
dev/minic.c
with
4 additions
and
0 deletions
dev/minic.c
+
4
−
0
View file @
4df15ce2
...
...
@@ -156,6 +156,8 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
payload_size
=
RX_DESC_SIZE
(
desc_hdr
);
num_words
=
((
payload_size
+
3
)
>>
2
)
+
1
;
// mprintf("Payload: %d\n", payload_size);
/* valid packet */
if
(
!
RX_DESC_ERROR
(
desc_hdr
))
{
...
...
@@ -197,6 +199,7 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
minic
.
rx_head
+=
num_words
;
}
else
{
minic
.
rx_head
+=
num_words
;
n_recvd
=
-
1
;
}
rx_addr_cur
=
minic_readl
(
MINIC_REG_RX_ADDR
)
&
0xffff
;
...
...
@@ -209,6 +212,7 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
minic_writel
(
MINIC_REG_EIC_ISR
,
MINIC_EIC_ISR_RX
);
}
// mprintf("minic: num_rx %d\n", n_recvd);
return
n_recvd
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment