Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6f5c8595
Commit
6f5c8595
authored
Sep 18, 2002
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add netif_carrier_xxx support to 3c59x net driver
(based on patch from Nelson Tan Gin Hwa, via Andrew Morton)
parent
5f761bd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
drivers/net/3c59x.c
drivers/net/3c59x.c
+10
-3
No files found.
drivers/net/3c59x.c
View file @
6f5c8595
...
...
@@ -1483,12 +1483,13 @@ vortex_up(struct net_device *dev)
mii_reg1
=
mdio_read
(
dev
,
vp
->
phys
[
0
],
1
);
mii_reg5
=
mdio_read
(
dev
,
vp
->
phys
[
0
],
5
);
if
(
mii_reg5
==
0xffff
||
mii_reg5
==
0x0000
)
{
;
/* No MII device or no link partner report */
netif_carrier_off
(
dev
);
/* No MII device or no link partner report */
}
else
{
mii_reg5
&=
vp
->
advertising
;
if
((
mii_reg5
&
0x0100
)
!=
0
/* 100baseTx-FD */
||
(
mii_reg5
&
0x00C0
)
==
0x0040
)
/* 10T-FD, but not 100-HD */
vp
->
full_duplex
=
1
;
netif_carrier_on
(
dev
);
}
vp
->
partner_flow_ctrl
=
((
mii_reg5
&
0x0400
)
!=
0
);
if
(
vortex_debug
>
1
)
...
...
@@ -1692,13 +1693,16 @@ vortex_timer(unsigned long data)
switch
(
dev
->
if_port
)
{
case
XCVR_10baseT
:
case
XCVR_100baseTx
:
case
XCVR_100baseFx
:
if
(
media_status
&
Media_LnkBeat
)
{
netif_carrier_on
(
dev
);
ok
=
1
;
if
(
vortex_debug
>
1
)
printk
(
KERN_DEBUG
"%s: Media %s has link beat, %x.
\n
"
,
dev
->
name
,
media_tbl
[
dev
->
if_port
].
name
,
media_status
);
}
else
if
(
vortex_debug
>
1
)
}
else
if
(
vortex_debug
>
1
)
{
netif_carrier_off
(
dev
);
printk
(
KERN_DEBUG
"%s: Media %s has no link beat, %x.
\n
"
,
dev
->
name
,
media_tbl
[
dev
->
if_port
].
name
,
media_status
);
}
break
;
case
XCVR_MII
:
case
XCVR_NWAY
:
{
...
...
@@ -1707,7 +1711,7 @@ vortex_timer(unsigned long data)
if
(
vortex_debug
>
2
)
printk
(
KERN_DEBUG
"%s: MII transceiver has status %4.4x.
\n
"
,
dev
->
name
,
mii_status
);
if
(
mii_status
&
0x0004
)
{
if
(
mii_status
&
BMSR_LSTATUS
)
{
int
mii_reg5
=
mdio_read
(
dev
,
vp
->
phys
[
0
],
5
);
if
(
!
vp
->
force_fd
&&
mii_reg5
!=
0xffff
)
{
int
duplex
;
...
...
@@ -1731,6 +1735,9 @@ vortex_timer(unsigned long data)
/* AKPM: bug: should reset Tx and Rx after setting Duplex. Page 180 */
}
}
netif_carrier_on
(
dev
);
}
else
{
netif_carrier_off
(
dev
);
}
}
break
;
...
...
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