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
afbac516
Commit
afbac516
authored
Jan 03, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr e100] Bug fix: enable/disable WOL based on EEPROM settings
Contributed by Scott Feldman @ Intel
parent
dfaa4f3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
drivers/net/e100/e100_config.c
drivers/net/e100/e100_config.c
+11
-5
drivers/net/e100/e100_main.c
drivers/net/e100/e100_main.c
+12
-5
No files found.
drivers/net/e100/e100_config.c
View file @
afbac516
...
@@ -494,8 +494,7 @@ e100_config_long_rx(struct e100_private *bdp, unsigned char enable)
...
@@ -494,8 +494,7 @@ e100_config_long_rx(struct e100_private *bdp, unsigned char enable)
* e100_config_wol
* e100_config_wol
* @bdp: atapter's private data struct
* @bdp: atapter's private data struct
*
*
* This sets configuration options for Wake On LAN functionality (WOL) in the
* This sets configuration options for PHY and Magic Packet WoL
* config record. WOL options are retrieved from wolinfo_wolopts in @bdp
*/
*/
void
void
e100_config_wol
(
struct
e100_private
*
bdp
)
e100_config_wol
(
struct
e100_private
*
bdp
)
...
@@ -504,14 +503,21 @@ e100_config_wol(struct e100_private *bdp)
...
@@ -504,14 +503,21 @@ e100_config_wol(struct e100_private *bdp)
if
(
bdp
->
wolopts
&
WAKE_PHY
)
{
if
(
bdp
->
wolopts
&
WAKE_PHY
)
{
bdp
->
config
[
9
]
|=
CB_LINK_STATUS_WOL
;
bdp
->
config
[
9
]
|=
CB_LINK_STATUS_WOL
;
E100_CONFIG
(
bdp
,
9
);
}
else
{
/* Disable PHY WoL */
bdp
->
config
[
9
]
&=
~
CB_LINK_STATUS_WOL
;
}
}
if
(
!
(
bdp
->
wolopts
&
WAKE_MAGIC
))
{
if
(
bdp
->
wolopts
&
WAKE_MAGIC
)
{
bdp
->
config
[
19
]
&=
~
CB_DISABLE_MAGPAK_WAKE
;
}
else
{
/* Disable Magic Packet WoL */
bdp
->
config
[
19
]
|=
CB_DISABLE_MAGPAK_WAKE
;
bdp
->
config
[
19
]
|=
CB_DISABLE_MAGPAK_WAKE
;
E100_CONFIG
(
bdp
,
19
);
}
}
E100_CONFIG
(
bdp
,
19
);
spin_unlock_bh
(
&
(
bdp
->
config_lock
));
spin_unlock_bh
(
&
(
bdp
->
config_lock
));
}
}
...
...
drivers/net/e100/e100_main.c
View file @
afbac516
...
@@ -673,12 +673,17 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
...
@@ -673,12 +673,17 @@ e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
bdp
->
device
->
name
);
bdp
->
device
->
name
);
}
}
/* Disabling all WOLs as initialization */
bdp
->
wolsupported
=
0
;
bdp
->
wolsupported
=
bdp
->
wolopts
=
0
;
bdp
->
wolopts
=
0
;
if
(
bdp
->
rev_id
>=
D101A4_REV_ID
)
{
bdp
->
wolsupported
=
WAKE_PHY
|
WAKE_MAGIC
;
/* Check if WoL is enabled on EEPROM */
if
(
e100_eeprom_read
(
bdp
,
EEPROM_ID_WORD
)
&
BIT_5
)
{
if
(
bdp
->
rev_id
>=
D101A4_REV_ID
)
bdp
->
wolsupported
=
WAKE_PHY
|
WAKE_MAGIC
;
if
(
bdp
->
rev_id
>=
D101MA_REV_ID
)
if
(
bdp
->
rev_id
>=
D101MA_REV_ID
)
bdp
->
wolsupported
|=
WAKE_UCAST
|
WAKE_ARP
;
bdp
->
wolsupported
|=
WAKE_UCAST
|
WAKE_ARP
;
/* Magic Packet WoL is enabled on device by default */
/* if EEPROM WoL bit is TRUE */
bdp
->
wolopts
=
WAKE_MAGIC
;
bdp
->
wolopts
=
WAKE_MAGIC
;
}
}
...
@@ -4089,9 +4094,11 @@ e100_suspend(struct pci_dev *pcid, u32 state)
...
@@ -4089,9 +4094,11 @@ e100_suspend(struct pci_dev *pcid, u32 state)
e100_isolate_driver
(
bdp
);
e100_isolate_driver
(
bdp
);
pci_save_state
(
pcid
,
bdp
->
pci_state
);
pci_save_state
(
pcid
,
bdp
->
pci_state
);
/* Enable or disable WoL */
e100_do_wol
(
pcid
,
bdp
);
/* If wol is enabled */
/* If wol is enabled */
if
(
bdp
->
wolopts
)
{
if
(
bdp
->
wolopts
)
{
e100_do_wol
(
pcid
,
bdp
);
pci_enable_wake
(
pcid
,
3
,
1
);
/* Enable PME for power state D3 */
pci_enable_wake
(
pcid
,
3
,
1
);
/* Enable PME for power state D3 */
pci_set_power_state
(
pcid
,
3
);
/* Set power state to D3. */
pci_set_power_state
(
pcid
,
3
);
/* Set power state to D3. */
}
else
{
}
else
{
...
...
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