Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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
Simple PCIe FMC carrier SPEC - Software
Commits
c246c3ce
Commit
c246c3ce
authored
Sep 25, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/wr_nic: fix rx timestamps
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
ab3f2f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
nic-core.c
kernel/wr_nic/nic-core.c
+10
-6
No files found.
kernel/wr_nic/nic-core.c
View file @
c246c3ce
...
...
@@ -379,9 +379,9 @@ static void __wrn_rx_descriptor(struct wrn_dev *wrn, int desc)
/* RX timestamping part */
//
wrn_ppsg_read_time(wrn, &counter_ppsg, &utc);
wrn_ppsg_read_time
(
wrn
,
&
counter_ppsg
,
&
utc
);
if
(
counter_ppsg
<
REFCLK_FREQ
/
4
&&
ts_r
>
3
*
REFCLK_FREQ
/
4
)
if
(
counter_ppsg
<
ts_r
)
utc
--
;
ts
.
tv_sec
=
(
s32
)
utc
&
0x7fffffff
;
...
...
@@ -396,13 +396,17 @@ static void __wrn_rx_descriptor(struct wrn_dev *wrn, int desc)
ts
.
tv_nsec
&
0x7fffffff
,
ts
.
tv_sec
&
0x80000000
?
1
:
0
);
/* If the timestamp was reported as incorrect, pass 0 instead */
if
(
!
(
r1
&
NIC_RX1_D1_TS_INCORRECT
))
/* FIXME: bit name possibly? */
{
if
(
1
)
{
/* SPEC: don't do the strange stuff for wr-ptp */
ts
.
tv_sec
&=
~
0x80000000
;
ts
.
tv_nsec
&=
0x7fffffff
;
}
if
(
!
(
r1
&
NIC_RX1_D1_TS_INCORRECT
))
{
hwts
=
skb_hwtstamps
(
skb
);
hwts
->
hwtstamp
=
timespec_to_ktime
(
ts
);
}
skb
->
protocol
=
eth_type_trans
(
skb
,
dev
);
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
dev
->
last_rx
=
jiffies
;
...
...
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