From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net/net.c: correct timeout function
Date: Thu, 04 Dec 2008 22:48:47 -0800 [thread overview]
Message-ID: <4938CECF.6090901@gmail.com> (raw)
In-Reply-To: <20081203005808.GD2012@buzzloop.caiaq.de>
Hi Daniel,
Daniel Mack wrote:
> the net/net.c implementation of timeouts assumes that get_timer() returns
> values in milliseconds. As this is true for most platforms, it does not
> apply to PXA3x where the OSCR register increments with more than 3MHz.
>
> The following patch fixes the problem by calculation with the
> CONFIG_SYS_HZ variable.
>
>
I apologize for taking so long to respond to this.
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
>
> ---
> net.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/net/net.c b/net/net.c
> index 77e83b5..b9326de 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -206,6 +206,11 @@ uchar NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
> ulong NetArpWaitTimerStart;
> int NetArpWaitTry;
>
> +static long net_get_timer(long base)
> +{
> + return get_timer(base) / (CONFIG_SYS_HZ / 1000);
> +}
> +
>
Please change this name to something more meaningful, maybe
get_timer_ms(). Apart from that, looks good. If you re-submit soon I'll
pull it in.
regards,
Ben
next prev parent reply other threads:[~2008-12-05 6:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 16:25 [U-Boot] [PATCH] net/net.c: correct timeout function Daniel Mack
2008-12-03 0:31 ` Daniel Mack
2008-12-03 0:43 ` Ben Warren
2008-12-03 1:05 ` Daniel Mack
2008-12-03 17:57 ` Ben Warren
2008-12-03 0:58 ` Daniel Mack
2008-12-05 6:48 ` Ben Warren [this message]
2008-12-05 14:40 ` [U-Boot] [PATCH] net/net.c: add get_timer_ms() Daniel Mack
2008-12-05 20:26 ` Wolfgang Denk
2008-12-05 20:43 ` Daniel Mack
2008-12-05 21:01 ` Wolfgang Denk
2008-12-05 21:07 ` Daniel Mack
2008-12-05 21:16 ` Wolfgang Denk
2008-12-06 16:53 ` Daniel Mack
2008-12-05 20:29 ` [U-Boot] [PATCH] net/net.c: correct timeout function Wolfgang Denk
2008-12-05 21:01 ` Ben Warren
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=4938CECF.6090901@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/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