]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i40e: Link code updates
authorAnjali Singhai <anjali.singhai@intel.com>
Sat, 28 Sep 2013 06:00:02 +0000 (06:00 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 10 Oct 2013 03:46:28 +0000 (20:46 -0700)
Link events should not print to the log until the device is
administratively up.

Signed-off-by: Anjali Singhai <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 221aa4795017649ccdd57accb01520c4bccb42e8..657babe82c9c60c10209c0b09846ece0919f319a 100644 (file)
@@ -3703,8 +3703,11 @@ static int i40e_up_complete(struct i40e_vsi *vsi)
 
        if ((pf->hw.phy.link_info.link_info & I40E_AQ_LINK_UP) &&
            (vsi->netdev)) {
+               netdev_info(vsi->netdev, "NIC Link is Up\n");
                netif_tx_start_all_queues(vsi->netdev);
                netif_carrier_on(vsi->netdev);
+       } else if (vsi->netdev) {
+               netdev_info(vsi->netdev, "NIC Link is Down\n");
        }
        i40e_service_event_schedule(pf);
 
@@ -4153,8 +4156,9 @@ static void i40e_link_event(struct i40e_pf *pf)
        if (new_link == old_link)
                return;
 
-       netdev_info(pf->vsi[pf->lan_vsi]->netdev,
-                   "NIC Link is %s\n", (new_link ? "Up" : "Down"));
+       if (!test_bit(__I40E_DOWN, &pf->vsi[pf->lan_vsi]->state))
+               netdev_info(pf->vsi[pf->lan_vsi]->netdev,
+                           "NIC Link is %s\n", (new_link ? "Up" : "Down"));
 
        /* Notify the base of the switch tree connected to
         * the link.  Floating VEBs are not notified.