]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ixgbe: DCB, remove RESET bit it is no longer needed
authorJohn Fastabend <john.r.fastabend@intel.com>
Fri, 7 Jan 2011 15:30:46 +0000 (15:30 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 11 Feb 2011 16:55:06 +0000 (08:55 -0800)
This removes the RESET bit previously used to force a device
reset when DCB bandwidth configurations were changed. This can
now be done dynamically without a reset so the bit is no longer
needed. The only remaining operations that force a device reset
are DCB enable/disable and FCoE application priority changes.
DCB enable/disable is a hardware requirement.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbe/ixgbe_dcb_nl.c

index b3a8d24afdd01d2fcc7c7c576e04e360b457d75f..c94adec5bc3bb7e80cba64f9adfc1b76a7599076 100644 (file)
@@ -37,7 +37,6 @@
 #define BIT_PG_RX      0x04
 #define BIT_PG_TX      0x08
 #define BIT_APP_UPCHG  0x10
-#define BIT_RESETLINK   0x40
 #define BIT_LINKSPEED   0x80
 
 /* Responses for the DCB_C_SET_ALL command */
@@ -345,7 +344,6 @@ static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority,
 static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
-       bool do_reset;
        int ret;
 
        if (!adapter->dcb_set_bitmap)
@@ -358,23 +356,17 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
                return DCB_NO_HW_CHG;
 
        /*
-        * Only take down the adapter if the configuration change
-        * requires a reset.
+        * Only take down the adapter if an app change occured. FCoE
+        * may shuffle tx rings in this case and this can not be done
+        * without a reset currently.
         */
-       do_reset = adapter->dcb_set_bitmap & (BIT_RESETLINK | BIT_APP_UPCHG);
-
-       if (do_reset) {
+       if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
                while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
                        msleep(1);
 
-               if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
-                       if (netif_running(netdev))
-                               netdev->netdev_ops->ndo_stop(netdev);
-                       ixgbe_clear_interrupt_scheme(adapter);
-               } else {
-                       if (netif_running(netdev))
-                               ixgbe_down(adapter);
-               }
+               if (netif_running(netdev))
+                       netdev->netdev_ops->ndo_stop(netdev);
+               ixgbe_clear_interrupt_scheme(adapter);
        }
 
        if (adapter->dcb_cfg.pfc_mode_enable) {
@@ -403,15 +395,10 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
                }
        }
 
-       if (do_reset) {
-               if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
-                       ixgbe_init_interrupt_scheme(adapter);
-                       if (netif_running(netdev))
-                               netdev->netdev_ops->ndo_open(netdev);
-               } else {
-                       if (netif_running(netdev))
-                               ixgbe_up(adapter);
-               }
+       if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
+               ixgbe_init_interrupt_scheme(adapter);
+               if (netif_running(netdev))
+                       netdev->netdev_ops->ndo_open(netdev);
                ret = DCB_HW_CHG_RST;
        }
 
@@ -456,7 +443,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
        if (adapter->dcb_cfg.pfc_mode_enable)
                adapter->hw.fc.current_mode = ixgbe_fc_pfc;
 
-       if (do_reset)
+       if (adapter->dcb_set_bitmap & BIT_APP_UPCHG)
                clear_bit(__IXGBE_RESETTING, &adapter->state);
        adapter->dcb_set_bitmap = 0x00;
        return ret;