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
Kirill Smelkov
linux
Commits
394fdea7
Commit
394fdea7
authored
Jul 14, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/spare/repo/netdev-2.6/sis900
into pobox.com:/spare/repo/net-drivers-2.6
parents
b19c5a4c
b5aea2a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
drivers/net/sis900.c
drivers/net/sis900.c
+14
-7
No files found.
drivers/net/sis900.c
View file @
394fdea7
...
...
@@ -116,6 +116,7 @@ static struct mii_chip_info {
#define HOME 0x0001
#define LAN 0x0002
#define MIX 0x0003
#define UNKNOWN 0x0
}
mii_chip_table
[]
=
{
{
"SiS 900 Internal MII PHY"
,
0x001d
,
0x8000
,
LAN
},
{
"SiS 7014 Physical Layer Solution"
,
0x0016
,
0xf830
,
LAN
},
...
...
@@ -577,9 +578,11 @@ static int __init sis900_mii_probe (struct net_device * net_dev)
break
;
}
if
(
!
mii_chip_table
[
i
].
phy_id1
)
if
(
!
mii_chip_table
[
i
].
phy_id1
)
{
printk
(
KERN_INFO
"%s: Unknown PHY transceiver found at address %d.
\n
"
,
net_dev
->
name
,
phy_addr
);
net_dev
->
name
,
phy_addr
);
mii_phy
->
phy_types
=
UNKNOWN
;
}
}
if
(
sis_priv
->
mii
==
NULL
)
{
...
...
@@ -644,15 +647,15 @@ static int __init sis900_mii_probe (struct net_device * net_dev)
static
u16
sis900_default_phy
(
struct
net_device
*
net_dev
)
{
struct
sis900_private
*
sis_priv
=
net_dev
->
priv
;
struct
mii_phy
*
phy
=
NULL
,
*
phy_home
=
NULL
,
*
default_phy
=
NULL
;
struct
mii_phy
*
phy
=
NULL
,
*
phy_home
=
NULL
,
*
default_phy
=
NULL
,
*
phy_lan
=
NULL
;
u16
status
;
for
(
phy
=
sis_priv
->
first_mii
;
phy
;
phy
=
phy
->
next
){
status
=
mdio_read
(
net_dev
,
phy
->
phy_addr
,
MII_STATUS
);
status
=
mdio_read
(
net_dev
,
phy
->
phy_addr
,
MII_STATUS
);
/* Link ON & Not select de
afalu
t PHY */
if
(
(
status
&
MII_STAT_LINK
)
&&
!
(
default_phy
)
)
/* Link ON & Not select de
fault PHY & not ghos
t PHY */
if
(
(
status
&
MII_STAT_LINK
)
&&
!
default_phy
&&
(
phy
->
phy_types
!=
UNKNOWN
)
)
default_phy
=
phy
;
else
{
status
=
mdio_read
(
net_dev
,
phy
->
phy_addr
,
MII_CONTROL
);
...
...
@@ -660,12 +663,16 @@ static u16 sis900_default_phy(struct net_device * net_dev)
status
|
MII_CNTL_AUTO
|
MII_CNTL_ISOLATE
);
if
(
phy
->
phy_types
==
HOME
)
phy_home
=
phy
;
else
if
(
phy
->
phy_types
==
LAN
)
phy_lan
=
phy
;
}
}
if
(
(
!
default_phy
)
&&
phy_home
)
if
(
!
default_phy
&&
phy_home
)
default_phy
=
phy_home
;
else
if
(
!
default_phy
)
else
if
(
!
default_phy
&&
phy_lan
)
default_phy
=
phy_lan
;
else
if
(
!
default_phy
)
default_phy
=
sis_priv
->
first_mii
;
if
(
sis_priv
->
mii
!=
default_phy
){
...
...
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