i40e: fix offloading of outer checksum for IPIP tunnel
[dpdk.git] / lib / librte_pmd_e1000 / e1000 / e1000_phy.c
index 02c1f51..e214f17 100644 (file)
@@ -1,6 +1,6 @@
 /*******************************************************************************
 
-Copyright (c) 2001-2012, Intel Corporation
+Copyright (c) 2001-2014, Intel Corporation
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -2368,19 +2368,23 @@ s32 e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
                 * it across the board.
                 */
                ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
-               if (ret_val)
+               if (ret_val) {
                        /* If the first read fails, another entity may have
                         * ownership of the resources, wait and try again to
                         * see if they have relinquished the resources yet.
                         */
-                       usec_delay(usec_interval);
+                       if (usec_interval >= 1000)
+                               msec_delay(usec_interval/1000);
+                       else
+                               usec_delay(usec_interval);
+               }
                ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
                if (ret_val)
                        break;
                if (phy_status & MII_SR_LINK_STATUS)
                        break;
                if (usec_interval >= 1000)
-                       msec_delay_irq(usec_interval/1000);
+                       msec_delay(usec_interval/1000);
                else
                        usec_delay(usec_interval);
        }