public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: davem@davemloft•net, Carolyn Wyborny <carolyn.wyborny@intel•com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel•com>,
	netdev@vger•kernel.org, gospo@redhat•com, sassmann@redhat•com,
	stable@vger•kernel.org, sunil.k.pandey@intel•com,
	kevin.b.smith@intel•com
Subject: Re: [net 2/2] igb: Fix for issue where values could be too high for udelay function.
Date: Sun, 15 Dec 2013 22:52:37 +0300	[thread overview]
Message-ID: <52AE0885.4030906@cogentembedded.com> (raw)
In-Reply-To: <1387020406-7964-2-git-send-email-jeffrey.t.kirsher@intel.com>

Hello.

On 12/14/2013 02:26 PM, Jeff Kirsher wrote:

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

> 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.

> CC: stable kernel <stable@vger•kernel.org> # 3.9+
> 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>
> ---
>   drivers/net/ethernet/intel/igb/e1000_phy.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)

> diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
> index c4c4fe3..ad2b74d 100644
> --- a/drivers/net/ethernet/intel/igb/e1000_phy.c
> +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
> @@ -1728,7 +1728,10 @@ s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations,
>   			 * 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);

    There should be spaces around / at least for consistency with the previous 
line. Also, are you sure it shouldn't be mdelay(DIV_ROUND_UP(usec_interval, 
1000))?

WBR, Sergei

  parent reply	other threads:[~2013-12-15 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14 11:26 [net 1/2] i40e: fix null dereference Jeff Kirsher
2013-12-14 11:26 ` [net 2/2] igb: Fix for issue where values could be too high for udelay function Jeff Kirsher
2013-12-15  4:00   ` David Miller
2013-12-15 19:52   ` Sergei Shtylyov [this message]
2013-12-15  4:00 ` [net 1/2] i40e: fix null dereference David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52AE0885.4030906@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded$(echo .)com \
    --cc=carolyn.wyborny@intel$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=gospo@redhat$(echo .)com \
    --cc=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=kevin.b.smith@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sassmann@redhat$(echo .)com \
    --cc=stable@vger$(echo .)kernel.org \
    --cc=sunil.k.pandey@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox