e1000/base: fix m88e1112 for 82575
authorJijiang Liu <jijiang.liu@intel.com>
Wed, 18 Jun 2014 12:26:25 +0000 (14:26 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 18 Jun 2014 21:30:15 +0000 (23:30 +0200)
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]

lib/librte_pmd_e1000/e1000/e1000_82575.c

index 36cab30..28b29ba 100644 (file)
@@ -1248,6 +1248,11 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
        if (ret_val)
                return ret_val;
 
+       /* reset page to 0 */
+       ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+       if (ret_val)
+               return ret_val;
+
        if (data & E1000_M88E1112_STATUS_LINK)
                port = E1000_MEDIA_PORT_OTHER;