From: Harish Patil <harish.patil@qlogic.com>
To: Joe Perches <joe@perches.com>,
Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Cc: Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@qlogic.com>,
"Dept-Eng Linux Driver" <Linux-Driver@qlogic.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] qlge: Move jiffies_to_usecs immediately before loop
Date: Wed, 20 May 2015 23:17:51 +0000 [thread overview]
Message-ID: <D18263F6.875E5%harish.patil@qlogic.com> (raw)
In-Reply-To: <1432097092.2870.266.camel@perches.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1463 bytes --]
>
>30 usecs (or really, 1 jiffy) can go by pretty fast.
>
>Move the set of the timeout immediately before the loop.
>
>Remove the unnecessary max(1ul, usecs_to_jiffies(30)) as
>usecs_to_jiffies with a non-zero constant is guaranteed
>to be non-zero.
>
>Signed-off-by: Joe Perches <joe@perches.com>
>---
> drivers/net/ethernet/qlogic/qlge/qlge_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
>b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
>index 25800a1..02b7115 100644
>--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
>+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
>@@ -3871,9 +3871,6 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
> return status;
> }
>
>- end_jiffies = jiffies +
>- max((unsigned long)1, usecs_to_jiffies(30));
>-
> /* Check if bit is set then skip the mailbox command and
> * clear the bit, else we are in normal reset process.
> */
>@@ -3888,6 +3885,7 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
>
> ql_write32(qdev, RST_FO, (RST_FO_FR << 16) | RST_FO_FR);
>
>+ end_jiffies = jiffies + usecs_to_jiffies(30);
> do {
> value = ql_read32(qdev, RST_FO);
> if ((value & RST_FO_FR) == 0)
>
>
>
Acked-by: Harish Patil <harish.patil@qlogic.com>
Thanks,
Harish
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2015-05-20 23:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 4:44 Joe Perches
2015-05-20 23:17 ` Harish Patil [this message]
2015-05-21 21:23 ` 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=D18263F6.875E5%harish.patil@qlogic.com \
--to=harish.patil@qlogic.com \
--cc=Dept-GELinuxNICDev@qlogic.com \
--cc=Linux-Driver@qlogic.com \
--cc=Sudarsana.Kalluru@qlogic.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®