All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] e1000e: changed some expensive calls of udelay to usleep_range
Date: Mon, 4 Sep 2017 18:25:55 +0200	[thread overview]
Message-ID: <20170904162555.GB21849@amd> (raw)
In-Reply-To: <1503503985-3869-1-git-send-email-matthew.tan_1@nxp.com>

Hi!

> @@ -183,7 +183,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
>  	 * reading duplicate data in the next MDIC transaction.
>  	 */
>  	if (hw->mac.type == e1000_pch2lan)
> -		udelay(100);
> +		usleep_range(90, 100);
>  
>  	return 0;
>  }

Can you explain why shortening the delay is acceptable here?
										
> @@ -246,7 +246,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
>  	 * reading duplicate data in the next MDIC transaction.
>  	 */
>  	if (hw->mac.type == e1000_pch2lan)
> -		udelay(100);
> +		usleep_range(90, 110);
>  
>  	return 0;
>  }

And here?
										Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170904/9f59a019/attachment.asc>

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Matthew Tan <matthew.tan_1@nxp.com>
Cc: jeffrey.t.kirsher@intel.com, michael.kardonik@nxp.com,
	carolyn.wyborny@intel.com, donald.c.skidmore@intel.com,
	bruce.w.allan@intel.com, john.ronciak@intel.com,
	mitch.a.williams@intel.com, intel-wired-lan@lists.osuosl.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] e1000e: changed some expensive calls of udelay to usleep_range
Date: Mon, 4 Sep 2017 18:25:55 +0200	[thread overview]
Message-ID: <20170904162555.GB21849@amd> (raw)
In-Reply-To: <1503503985-3869-1-git-send-email-matthew.tan_1@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

Hi!

> @@ -183,7 +183,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
>  	 * reading duplicate data in the next MDIC transaction.
>  	 */
>  	if (hw->mac.type == e1000_pch2lan)
> -		udelay(100);
> +		usleep_range(90, 100);
>  
>  	return 0;
>  }

Can you explain why shortening the delay is acceptable here?
										
> @@ -246,7 +246,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
>  	 * reading duplicate data in the next MDIC transaction.
>  	 */
>  	if (hw->mac.type == e1000_pch2lan)
> -		udelay(100);
> +		usleep_range(90, 110);
>  
>  	return 0;
>  }

And here?
										Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2017-09-04 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 15:59 [Intel-wired-lan] [PATCH] e1000e: changed some expensive calls of udelay to usleep_range Matthew Tan
2017-08-23 15:59 ` Matthew Tan
2017-08-29  7:19 ` [Intel-wired-lan] " Neftin, Sasha
2017-08-29  7:19   ` Neftin, Sasha
2017-09-04 16:25 ` Pavel Machek [this message]
2017-09-04 16:25   ` Pavel Machek
2017-09-07 22:19   ` [Intel-wired-lan] " Brown, Aaron F
2017-09-07 22:19     ` Brown, Aaron F
2017-09-07 22:19     ` Brown, Aaron F
2017-09-08  9:28     ` Pavel Machek
2017-09-08  9:28       ` Pavel Machek
2017-09-04 16:36 ` Paul Menzel
2017-09-04 16:36   ` Paul Menzel
  -- strict thread matches above, loose matches on Subject: below --
2017-09-05 20:27 Kardonik Michael
2017-09-10  6:56 ` Neftin, Sasha
2017-09-12  1:34 ` Brown, Aaron F

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=20170904162555.GB21849@amd \
    --to=pavel@ucw.cz \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.