lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 061/118] igb: Fix for issue where values could be too high for udelay function.
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Carolyn Wyborny <carolyn.wyborny@intel.com>

    commit df29df92adda751ac04ca5149d30014b5199db81 upstream.

    This patch changes the igb_phy_has_link function to check the value of the
    parameter before deciding to use udelay or mdelay in order to be sure that
    the value is not too high for udelay function.

    Signed-off-by: Sunil K Pandey <sunil.k.pandey@intel.com>
    Signed-off-by: Kevin B Smith <kevin.b.smith@intel.com>
    Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
    Tested-by: Aaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/ethernet/intel/igb/e1000_phy.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/drivers/net/ethernet/intel/igb/e1000_phy.c
    +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
    @@ -1730,7 +1730,10 @@ s32 igb_phy_has_link(struct e1000_hw *hw
    * ownership of the resources, wait and try again to
    * see if they have relinquished the resources yet.
    */
    - udelay(usec_interval);
    + if (usec_interval >= 1000)
    + mdelay(usec_interval/1000);
    + else
    + udelay(usec_interval);
    }
    ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
    if (ret_val)



    \
     
     \ /
      Last update: 2013-12-19 05:41    [W:4.426 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site