Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit Switch - Software
Commits
8c6a1af9
Commit
8c6a1af9
authored
Dec 09, 2010
by
Tomasz Wlostowski
Committed by
Alessandro Rubini
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nic/endpoint: fix the link up/down detection
parent
40db3014
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
endpoint.c
nic/endpoint.c
+10
-10
No files found.
nic/endpoint.c
View file @
8c6a1af9
...
...
@@ -54,20 +54,20 @@ static void wrn_update_link_status(struct net_device *dev)
u32
ecr
,
bmsr
,
bmcr
,
lpa
;
bmsr
=
wrn_phy_read
(
dev
,
0
,
MII_BMSR
);
bmcr
=
wrn_phy_read
(
dev
,
0
,
MII_BM
C
R
);
bmcr
=
wrn_phy_read
(
dev
,
0
,
MII_BM
S
R
);
//netdev_dbg(dev, "%s: read %x %x", __func__, bmsr, bmcr);
//pr_debug("%s: read %x %x", __func__, bmsr, bmcr);
if
(
!
mii_link_ok
(
&
ep
->
mii
))
{
/* No link, currently */
if
(
!
netif_carrier_ok
(
dev
))
{
/* No link in software structure: nothing to do */
// printk("%s: read %x %x %x\n", __func__, bmsr, bmcr);
/* Link wnt down? */
if
(
!
mii_link_ok
(
&
ep
->
mii
))
{
if
(
netif_carrier_ok
(
dev
))
{
netif_carrier_off
(
dev
);
clear_bit
(
WRN_EP_UP
,
&
ep
->
ep_flags
);
printk
(
KERN_INFO
"%s: Link down.
\n
"
,
dev
->
name
);
return
;
}
netif_carrier_off
(
dev
);
clear_bit
(
WRN_EP_UP
,
&
ep
->
ep_flags
);
printk
(
KERN_INFO
"%s: Link down.
\n
"
,
dev
->
name
);
return
;
}
/* Currently the link is active */
...
...
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