igc: Add WOL support
Subsystems (2)
PATCH 1/1 igc: Add WOL support
This patch adds a define and WOL support for an i225 parts.
Signed-off-by Sasha Neftin <[email protected]>
--- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 3 ++ drivers/net/ethernet/intel/igc/igc_ethtool.c | 61 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_main.c | 10 +++++ 4 files changed, 75 insertions(+)
drivers/net/ethernet/intel/igc/igc.h +1 -0
@@ -61,6 +61,7 @@ extern char igc_driver_version[];#define IGC_FLAG_QUEUE_PAIRS BIT(3)#define IGC_FLAG_DMAC BIT(4)#define IGC_FLAG_PTP BIT(8) +#define IGC_FLAG_WOL_SUPPORTED BIT(8)#define IGC_FLAG_NEED_LINK_UPDATE BIT(9)#define IGC_FLAG_MEDIA_RESET BIT(10)#define IGC_FLAG_MAS_ENABLE BIT(12)
drivers/net/ethernet/intel/igc/igc_defines.h +3 -0
@@ -16,7 +16,10 @@/* Wake Up Filter Control */ #define IGC_WUFC_LNKC 0x00000001/* Link Status Change Wakeup Enable */ +#define IGC_WUFC_MAG 0x00000002/* Magic Packet Wakeup Enable */ +#define IGC_WUFC_EX 0x00000004/* Directed Exact Wakeup Enable */ #define IGC_WUFC_MC 0x00000008/* Directed Multicast Wakeup Enable */ +#define IGC_WUFC_BC 0x00000010/* Broadcast Wakeup Enable */ #define IGC_CTRL_ADVD3WUC 0x00100000/* D3 WUC */
drivers/net/ethernet/intel/igc/igc_ethtool.c +61 -0
73 lines not on this page · raw message
drivers/net/ethernet/intel/igc/igc_main.c +10 -0
@@ -4966,6 +4966,16 @@ static int igc_probe(struct pci_dev *pdev, hw->fc.requested_mode = igc_fc_default; hw->fc.current_mode = igc_fc_default; +/* By default, support wake on port A */ + adapter->flags |=IGC_FLAG_WOL_SUPPORTED ; + +/* initialize the wol settings based on the eeprom settings */ +if (adapter->flags &IGC_FLAG_WOL_SUPPORTED ) + adapter->wol |=IGC_WUFC_MAG ; + +device_set_wakeup_enable (&adapter->pdev->dev, + adapter->flags &IGC_FLAG_WOL_SUPPORTED ); +/* reset the hardware with the new settings */ igc_reset (adapter);
Signature · 1 line
2.11.0
Brown
PATCH 1/1 igc: Add WOL support
Quoted 8 lines
From: Intel-wired-lan <[email protected]> On Behalf Of Sasha Neftin
Sent: Sunday, February 2, 2020 11:55 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Add WOL supportThis patch adds a define and WOL support for an i225 parts.
Quoted 9 lines
Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 3 ++ drivers/net/ethernet/intel/igc/igc_ethtool.c | 61 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_main.c | 10 +++++ 4 files changed, 75 insertions(+)
Tested-by Aaron Brown <[email protected]>