ixgbe: use msleep for long delays
authorArnd Bergmann <arnd@arndb.de>
Sat, 16 Apr 2016 20:35:08 +0000 (22:35 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 25 Apr 2016 11:55:20 +0000 (04:55 -0700)
The newly added x550em_a support causes a link failure on ARM because of
an overly long time passed into udelay():

ERROR: "__bad_udelay" [drivers/net/ethernet/intel/ixgbe/ixgbe.ko] undefined!

There are multiple variants of the ixgbe_acquire_swfw_sync_*() function,
and the other ones all use msleep(), so we can safely assume that all
callers are allowed to sleep, which makes msleep() a better replacement
than mdelay().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 49425dfc7451 ("ixgbe: Add support for x550em_a 10G MAC type")
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index c8a4f5e..19b75cd 100644 (file)
@@ -2765,7 +2765,7 @@ static s32 ixgbe_acquire_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)
                        ixgbe_release_swfw_sync_X540(hw, hmask);
                if (status != IXGBE_ERR_TOKEN_RETRY)
                        return status;
-               udelay(FW_PHY_TOKEN_DELAY * 1000);
+               msleep(FW_PHY_TOKEN_DELAY);
        }
 
        return status;