[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
[firefly-linux-kernel-4.4.55.git] / drivers / net / ixgbe / ixgbe_main.c
index b75f1c6efc42b589516a1e4efa5fbd7ae504723d..a56491617661cffef3fd4d370519a169b64da1fc 100644 (file)
 #include "ixgbe_common.h"
 
 char ixgbe_driver_name[] = "ixgbe";
-static char ixgbe_driver_string[] =
-                       "Intel(R) 10 Gigabit PCI Express Network Driver";
+static const char ixgbe_driver_string[] =
+       "Intel(R) 10 Gigabit PCI Express Network Driver";
 
 #define DRV_VERSION "1.1.18"
-char ixgbe_driver_version[] = DRV_VERSION;
-static char ixgbe_copyright[] = "Copyright (c) 1999-2007 Intel Corporation.";
+const char ixgbe_driver_version[] = DRV_VERSION;
+static const char ixgbe_copyright[] =
+        "Copyright (c) 1999-2007 Intel Corporation.";
 
 static const struct ixgbe_info *ixgbe_info_tbl[] = {
        [board_82598AF]                 = &ixgbe_82598AF_info,
@@ -1467,21 +1468,15 @@ static int ixgbe_clean(struct napi_struct *napi, int budget)
        struct ixgbe_adapter *adapter = container_of(napi,
                                        struct ixgbe_adapter, napi);
        struct net_device *netdev = adapter->netdev;
-       int tx_cleaned = 0, work_done = 0;
-
-       /* Keep link state information with original netdev */
-       if (!netif_carrier_ok(adapter->netdev))
-               goto quit_polling;
+       int work_done = 0;
 
        /* In non-MSIX case, there is no multi-Tx/Rx queue */
-       tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
+       ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
        ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done,
                           budget);
 
-       /* If no Tx and not enough Rx work done, exit the polling mode */
-       if ((!tx_cleaned && (work_done < budget)) ||
-           !netif_running(adapter->netdev)) {
-quit_polling:
+       /* If budget not fully consumed, exit the polling mode */
+       if (work_done < budget) {
                netif_rx_complete(netdev, napi);
                ixgbe_irq_enable(adapter);
        }