diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-03-13 17:52:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-15 00:00:31 +0300 |
commit | 0b72e659a10ec50acbef90756bf04177b66c8266 (patch) | |
tree | 233dc05b96c10a7e0694542589a4d80304e4d52d /drivers/net/netxen/netxen_nic_hw.c | |
parent | fbb52f2272e6265295f0e5f6187b628e4c162eca (diff) | |
download | linux-0b72e659a10ec50acbef90756bf04177b66c8266.tar.xz |
netxen: add suspend resume support
Detach network interface on PCI suspend and recreate hardware
context after resumes.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 8db4ac344146..c8faa53d27af 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c @@ -2320,3 +2320,20 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter) } } +int +netxen_nic_wol_supported(struct netxen_adapter *adapter) +{ + u32 wol_cfg; + + if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) + return 0; + + wol_cfg = netxen_nic_reg_read(adapter, NETXEN_WOL_CONFIG_NV); + if (wol_cfg & (1UL << adapter->portnum)) { + wol_cfg = netxen_nic_reg_read(adapter, NETXEN_WOL_CONFIG); + if (wol_cfg & (1 << adapter->portnum)) + return 1; + } + + return 0; +} |