]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
e1000e: Fix wrong comment related to link detection
authorBenjamin Poirier <bpoirier@suse.com>
Fri, 21 Jul 2017 18:36:24 +0000 (11:36 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Mon, 8 Jan 2018 17:48:17 +0000 (09:48 -0800)
Reading e1000e_check_for_copper_link() shows that get_link_status is set to
false after link has been detected. Therefore, it stays TRUE until then.

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 27069012
(cherry picked from commit 65a29da1f5fd20fdebef3b959bef9b3660807b20)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/e1000e/netdev.c

index d3cf06eeee7d2a1db31dec599f61f9f3aa3b791f..972332d691b4671d516cc8dddbf54e0299bb5517 100644 (file)
@@ -5073,7 +5073,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter)
 
        /* get_link_status is set on LSC (link status) interrupt or
         * Rx sequence error interrupt.  get_link_status will stay
-        * false until the check_for_link establishes link
+        * true until the check_for_link establishes link
         * for copper adapters ONLY
         */
        switch (hw->phy.media_type) {
@@ -5091,7 +5091,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter)
                break;
        case e1000_media_type_internal_serdes:
                ret_val = hw->mac.ops.check_for_link(hw);
-               link_active = adapter->hw.mac.serdes_has_link;
+               link_active = hw->mac.serdes_has_link;
                break;
        default:
        case e1000_media_type_unknown: