[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D18263F6.875E5%harish.patil@qlogic.com>
Date: Wed, 20 May 2015 23:17:51 +0000
From: Harish Patil <harish.patil@...gic.com>
To: Joe Perches <joe@...ches.com>,
Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>
CC: Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@...gic.com>,
"Dept-Eng Linux Driver" <Linux-Driver@...gic.com>,
netdev <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] qlge: Move jiffies_to_usecs immediately before loop
>
>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@...ches.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@...gic.com>
Thanks,
Harish
Powered by blists - more mailing lists