From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Nicholas Nunley <nicholasx.d.nunley@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 02/18] igb: add support for wake-on-link
Date: Wed, 17 Feb 2010 03:01:01 -0800 [thread overview]
Message-ID: <20100217110100.17723.30799.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100217105953.17723.36633.stgit@localhost.localdomain>
From: Nick Nunley <nicholasx.d.nunley@intel.com>
This adds support for wake-on-link/phy activity to the ethtool
interface.
Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_ethtool.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index f771a6c..145a8eb 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -1812,7 +1812,8 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
struct igb_adapter *adapter = netdev_priv(netdev);
wol->supported = WAKE_UCAST | WAKE_MCAST |
- WAKE_BCAST | WAKE_MAGIC;
+ WAKE_BCAST | WAKE_MAGIC |
+ WAKE_PHY;
wol->wolopts = 0;
/* this function will set ->supported = 0 and return 1 if wol is not
@@ -1835,15 +1836,15 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
wol->wolopts |= WAKE_BCAST;
if (adapter->wol & E1000_WUFC_MAG)
wol->wolopts |= WAKE_MAGIC;
-
- return;
+ if (adapter->wol & E1000_WUFC_LNKC)
+ wol->wolopts |= WAKE_PHY;
}
static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
{
struct igb_adapter *adapter = netdev_priv(netdev);
- if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+ if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;
if (igb_wol_exclusion(adapter, wol) ||
@@ -1861,6 +1862,8 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
adapter->wol |= E1000_WUFC_BC;
if (wol->wolopts & WAKE_MAGIC)
adapter->wol |= E1000_WUFC_MAG;
+ if (wol->wolopts & WAKE_PHY)
+ adapter->wol |= E1000_WUFC_LNKC;
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
return 0;
next prev parent reply other threads:[~2010-02-17 11:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 11:00 [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift Jeff Kirsher
2010-02-17 11:01 ` Jeff Kirsher [this message]
2010-02-17 11:01 ` [net-next-2.6 PATCH 03/18] igb: Report link status in ethtool when interface is down Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 04/18] igb: ignore EEPROM APME check when shutting down serdes link Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 05/18] igb: Power down link when interface is down Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 06/18] igb: call pci_save_state after pci_restore_state Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 07/18] igb: Allocate rings seperately instead of as a block Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 08/18] igb: remove adaptive IFS from driver Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 09/18] igb: cap interrupts at 20K per queue when in itr mode 3 Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 10/18] igb: only support SRRCTL_DROP_EN when using multiple queues Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 11/18] igb: only read phy specific stats if in internal phy mode Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 12/18] igb: inline igb_maybe_stop_tx Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 13/18] igb: move gso_segs into buffer_info structure Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 14/18] igb: minor type cleanups Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 15/18] igb: remove unused vmolr value Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 16/18] igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 17/18] igb: change descriptor control thresholds Jeff Kirsher
2010-02-17 11:06 ` [net-next-2.6 PATCH 18/18] igb: update tx DMA mapping error handling Jeff Kirsher
2010-02-17 21:51 ` [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100217110100.17723.30799.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nicholasx.d.nunley@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).