Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
87
Issue boards
Milestones
Wiki
Code
Merge requests
4
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
White Rabbit Switch - Software
Commits
ad6c1652
Commit
ad6c1652
authored
10 years ago
by
Adam Wujek
Committed by
Alessandro Rubini
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wr_nic: write MAC to FPGA only for switch
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
7446d51c
Branches
Branches containing commit
Tags
wr-switch-sw-v3.0-rc3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/wr_nic/nic-core.c
+7
-5
7 additions, 5 deletions
kernel/wr_nic/nic-core.c
with
7 additions
and
5 deletions
kernel/wr_nic/nic-core.c
+
7
−
5
View file @
ad6c1652
...
...
@@ -41,11 +41,13 @@ static int wrn_open(struct net_device *dev)
if
(
!
is_valid_ether_addr
(
dev
->
dev_addr
))
return
-
EADDRNOTAVAIL
;
/* MACH gets the first two bytes, MACL the rest */
val
=
get_unaligned_be16
(
dev
->
dev_addr
);
writel
(
val
,
&
ep
->
ep_regs
->
MACH
);
val
=
get_unaligned_be32
(
dev
->
dev_addr
+
2
);
writel
(
val
,
&
ep
->
ep_regs
->
MACL
);
if
(
WR_IS_SWITCH
)
{
/* MACH gets the first two bytes, MACL the rest */
val
=
get_unaligned_be16
(
dev
->
dev_addr
);
writel
(
val
,
&
ep
->
ep_regs
->
MACH
);
val
=
get_unaligned_be32
(
dev
->
dev_addr
+
2
);
writel
(
val
,
&
ep
->
ep_regs
->
MACL
);
}
/* Mark it as down, and start the ep-specific polling timer */
clear_bit
(
WRN_EP_UP
,
&
ep
->
ep_flags
);
...
...
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