aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-07-08 18:10:46 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-11 01:20:32 -0400
commit7dfc16fab1186769d7d0086830ab3fbc8fddfcba (patch)
tree2b5c7a9fbb1497b34d1081e2cb4052cb3893cb9c /drivers/net/igb/igb_ethtool.c
parent2d064c06fecadadcb81a452acd373af00dfb1fec (diff)
igb: Add support for quad port WOL and feature flags
Change igb from using a series of boolean operators to using a single flags value that contains a number of different bit flags for all the different features of the adapter. This patch also adds WOL support for quad port adapters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index e27d5a533b4f..ef209b5cd390 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -1097,7 +1097,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
1097 if (adapter->msix_entries) { 1097 if (adapter->msix_entries) {
1098 /* NOTE: we don't test MSI-X interrupts here, yet */ 1098 /* NOTE: we don't test MSI-X interrupts here, yet */
1099 return 0; 1099 return 0;
1100 } else if (adapter->msi_enabled) { 1100 } else if (adapter->flags & IGB_FLAG_HAS_MSI) {
1101 shared_int = false; 1101 shared_int = false;
1102 if (request_irq(irq, &igb_test_intr, 0, netdev->name, netdev)) { 1102 if (request_irq(irq, &igb_test_intr, 0, netdev->name, netdev)) {
1103 *data = 1; 1103 *data = 1;
@@ -1727,7 +1727,6 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
1727 1727
1728 switch (hw->device_id) { 1728 switch (hw->device_id) {
1729 case E1000_DEV_ID_82575GB_QUAD_COPPER: 1729 case E1000_DEV_ID_82575GB_QUAD_COPPER:
1730 case E1000_DEV_ID_82576_QUAD_COPPER:
1731 /* WoL not supported */ 1730 /* WoL not supported */
1732 wol->supported = 0; 1731 wol->supported = 0;
1733 break; 1732 break;
@@ -1742,6 +1741,15 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
1742 /* return success for non excluded adapter ports */ 1741 /* return success for non excluded adapter ports */
1743 retval = 0; 1742 retval = 0;
1744 break; 1743 break;
1744 case E1000_DEV_ID_82576_QUAD_COPPER:
1745 /* quad port adapters only support WoL on port A */
1746 if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
1747 wol->supported = 0;
1748 break;
1749 }
1750 /* return success for non excluded adapter ports */
1751 retval = 0;
1752 break;
1745 default: 1753 default:
1746 /* dual port cards only support WoL on port A from now on 1754 /* dual port cards only support WoL on port A from now on
1747 * unless it was enabled in the eeprom for port B 1755 * unless it was enabled in the eeprom for port B