aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>2009-06-04 12:00:47 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-07 08:20:22 -0400
commitdf647b5ca3c3a84e5e5f8e7da36b5ffc17276ec7 (patch)
tree30196b8a65d5202a5fab4b4e67abb7d13e3957db /drivers
parent91281fd36c7670904e0b315e273e896d907adc36 (diff)
ixgbe: Add a second feature flags variable, move HW RSC capability there
This adds a second feature flag variable to use for future feature expansion. Add HW RSC to this new feature flags variable. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe.h5
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c6
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c12
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 00c303a745db..59167d7e08ca 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -317,10 +317,11 @@ struct ixgbe_adapter {
317#define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23) 317#define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23)
318#define IXGBE_FLAG_IN_SFP_LINK_TASK (u32)(1 << 24) 318#define IXGBE_FLAG_IN_SFP_LINK_TASK (u32)(1 << 24)
319#define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25) 319#define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25)
320#define IXGBE_FLAG_RSC_CAPABLE (u32)(1 << 26)
321#define IXGBE_FLAG_RSC_ENABLED (u32)(1 << 27)
322#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29) 320#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29)
323 321
322 u32 flags2;
323#define IXGBE_FLAG2_RSC_CAPABLE (u32)(1)
324#define IXGBE_FLAG2_RSC_ENABLED (u32)(1 << 1)
324/* default to trying for four seconds */ 325/* default to trying for four seconds */
325#define IXGBE_TRY_LINK_TIMEOUT (4 * HZ) 326#define IXGBE_TRY_LINK_TIMEOUT (4 * HZ)
326 327
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 003b6e51cf93..ce9cf7edefb1 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1997,13 +1997,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
1997 1997
1998 ethtool_op_set_flags(netdev, data); 1998 ethtool_op_set_flags(netdev, data);
1999 1999
2000 if (!(adapter->flags & IXGBE_FLAG_RSC_CAPABLE)) 2000 if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE))
2001 return 0; 2001 return 0;
2002 2002
2003 /* if state changes we need to update adapter->flags and reset */ 2003 /* if state changes we need to update adapter->flags and reset */
2004 if ((!!(data & ETH_FLAG_LRO)) != 2004 if ((!!(data & ETH_FLAG_LRO)) !=
2005 (!!(adapter->flags & IXGBE_FLAG_RSC_ENABLED))) { 2005 (!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) {
2006 adapter->flags ^= IXGBE_FLAG_RSC_ENABLED; 2006 adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED;
2007 if (netif_running(netdev)) 2007 if (netif_running(netdev))
2008 ixgbe_reinit_locked(adapter); 2008 ixgbe_reinit_locked(adapter);
2009 else 2009 else
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f81fff5a3d34..2553173a16c4 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -748,7 +748,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
748 prefetch(next_rxd); 748 prefetch(next_rxd);
749 cleaned_count++; 749 cleaned_count++;
750 750
751 if (adapter->flags & IXGBE_FLAG_RSC_CAPABLE) 751 if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)
752 rsc_count = ixgbe_get_rsc_count(rx_desc); 752 rsc_count = ixgbe_get_rsc_count(rx_desc);
753 753
754 if (rsc_count) { 754 if (rsc_count) {
@@ -1968,7 +1968,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
1968 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); 1968 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype);
1969 } 1969 }
1970 } else { 1970 } else {
1971 if (!(adapter->flags & IXGBE_FLAG_RSC_ENABLED) && 1971 if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) &&
1972 (netdev->mtu <= ETH_DATA_LEN)) 1972 (netdev->mtu <= ETH_DATA_LEN))
1973 rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; 1973 rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE;
1974 else 1974 else
@@ -2097,7 +2097,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
2097 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); 2097 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl);
2098 } 2098 }
2099 2099
2100 if (adapter->flags & IXGBE_FLAG_RSC_ENABLED) { 2100 if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) {
2101 /* Enable 82599 HW-RSC */ 2101 /* Enable 82599 HW-RSC */
2102 for (i = 0; i < adapter->num_rx_queues; i++) { 2102 for (i = 0; i < adapter->num_rx_queues; i++) {
2103 j = adapter->rx_ring[i].reg_idx; 2103 j = adapter->rx_ring[i].reg_idx;
@@ -3632,8 +3632,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
3632 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; 3632 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598;
3633 } else if (hw->mac.type == ixgbe_mac_82599EB) { 3633 } else if (hw->mac.type == ixgbe_mac_82599EB) {
3634 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; 3634 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
3635 adapter->flags |= IXGBE_FLAG_RSC_CAPABLE; 3635 adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE;
3636 adapter->flags |= IXGBE_FLAG_RSC_ENABLED; 3636 adapter->flags |= IXGBE_FLAG2_RSC_ENABLED;
3637#ifdef IXGBE_FCOE 3637#ifdef IXGBE_FCOE
3638 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED; 3638 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED;
3639 adapter->ring_feature[RING_F_FCOE].indices = IXGBE_FCRETA_SIZE; 3639 adapter->ring_feature[RING_F_FCOE].indices = IXGBE_FCRETA_SIZE;
@@ -5323,7 +5323,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5323 if (pci_using_dac) 5323 if (pci_using_dac)
5324 netdev->features |= NETIF_F_HIGHDMA; 5324 netdev->features |= NETIF_F_HIGHDMA;
5325 5325
5326 if (adapter->flags & IXGBE_FLAG_RSC_ENABLED) 5326 if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED)
5327 netdev->features |= NETIF_F_LRO; 5327 netdev->features |= NETIF_F_LRO;
5328 5328
5329 /* make sure the EEPROM is good */ 5329 /* make sure the EEPROM is good */