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
668c0cdb
Commit
668c0cdb
authored
May 27, 2004
by
Ganesh Venkatesan
Committed by
Jeff Garzik
May 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] e1000 3/7: Determine link status correctly while using
parent
b3a0f501
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.c
+16
-11
No files found.
drivers/net/e1000/e1000_hw.c
View file @
668c0cdb
...
@@ -470,7 +470,6 @@ e1000_init_hw(struct e1000_hw *hw)
...
@@ -470,7 +470,6 @@ e1000_init_hw(struct e1000_hw *hw)
uint16_t
pcix_stat_hi_word
;
uint16_t
pcix_stat_hi_word
;
uint16_t
cmd_mmrbc
;
uint16_t
cmd_mmrbc
;
uint16_t
stat_mmrbc
;
uint16_t
stat_mmrbc
;
DEBUGFUNC
(
"e1000_init_hw"
);
DEBUGFUNC
(
"e1000_init_hw"
);
/* Initialize Identification LED */
/* Initialize Identification LED */
...
@@ -1967,7 +1966,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
...
@@ -1967,7 +1966,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
int32_t
int32_t
e1000_check_for_link
(
struct
e1000_hw
*
hw
)
e1000_check_for_link
(
struct
e1000_hw
*
hw
)
{
{
uint32_t
rxcw
;
uint32_t
rxcw
=
0
;
uint32_t
ctrl
;
uint32_t
ctrl
;
uint32_t
status
;
uint32_t
status
;
uint32_t
rctl
;
uint32_t
rctl
;
...
@@ -1977,17 +1976,24 @@ e1000_check_for_link(struct e1000_hw *hw)
...
@@ -1977,17 +1976,24 @@ e1000_check_for_link(struct e1000_hw *hw)
DEBUGFUNC
(
"e1000_check_for_link"
);
DEBUGFUNC
(
"e1000_check_for_link"
);
ctrl
=
E1000_READ_REG
(
hw
,
CTRL
);
status
=
E1000_READ_REG
(
hw
,
STATUS
);
/* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be
/* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be
* set when the optics detect a signal. On older adapters, it will be
* set when the optics detect a signal. On older adapters, it will be
* cleared when there is a signal. This applies to fiber media only.
* cleared when there is a signal. This applies to fiber media only.
*/
*/
if
(
hw
->
media_type
==
e1000_media_type_fiber
)
if
((
hw
->
media_type
==
e1000_media_type_fiber
)
||
signal
=
(
hw
->
mac_type
>
e1000_82544
)
?
E1000_CTRL_SWDPIN1
:
0
;
(
hw
->
media_type
==
e1000_media_type_internal_serdes
))
{
ctrl
=
E1000_READ_REG
(
hw
,
CTRL
);
status
=
E1000_READ_REG
(
hw
,
STATUS
);
rxcw
=
E1000_READ_REG
(
hw
,
RXCW
);
rxcw
=
E1000_READ_REG
(
hw
,
RXCW
);
if
(
hw
->
media_type
==
e1000_media_type_fiber
)
{
signal
=
(
hw
->
mac_type
>
e1000_82544
)
?
E1000_CTRL_SWDPIN1
:
0
;
if
(
status
&
E1000_STATUS_LU
)
hw
->
get_link_status
=
FALSE
;
}
}
/* If we have a copper PHY then we only want to go out to the PHY
/* If we have a copper PHY then we only want to go out to the PHY
* registers to see if Auto-Neg has completed and/or if our link
* registers to see if Auto-Neg has completed and/or if our link
* status has changed. The get_link_status flag will be set if we
* status has changed. The get_link_status flag will be set if we
...
@@ -2131,8 +2137,7 @@ e1000_check_for_link(struct e1000_hw *hw)
...
@@ -2131,8 +2137,7 @@ e1000_check_for_link(struct e1000_hw *hw)
*/
*/
else
if
(((
hw
->
media_type
==
e1000_media_type_fiber
)
||
else
if
(((
hw
->
media_type
==
e1000_media_type_fiber
)
||
(
hw
->
media_type
==
e1000_media_type_internal_serdes
))
&&
(
hw
->
media_type
==
e1000_media_type_internal_serdes
))
&&
(
ctrl
&
E1000_CTRL_SLU
)
&&
(
ctrl
&
E1000_CTRL_SLU
)
&&
(
rxcw
&
E1000_RXCW_C
))
{
(
rxcw
&
E1000_RXCW_C
))
{
DEBUGOUT
(
"RXing /C/, enable AutoNeg and stop forcing link.
\r\n
"
);
DEBUGOUT
(
"RXing /C/, enable AutoNeg and stop forcing link.
\r\n
"
);
E1000_WRITE_REG
(
hw
,
TXCW
,
hw
->
txcw
);
E1000_WRITE_REG
(
hw
,
TXCW
,
hw
->
txcw
);
E1000_WRITE_REG
(
hw
,
CTRL
,
(
ctrl
&
~
E1000_CTRL_SLU
));
E1000_WRITE_REG
(
hw
,
CTRL
,
(
ctrl
&
~
E1000_CTRL_SLU
));
...
...
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