public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Query on timeouts with NetSetTimeout
@ 2009-02-20  3:51 Pillai, Manikandan
  2009-02-20  5:39 ` Ben Warren
  2009-02-20  7:09 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Pillai, Manikandan @ 2009-02-20  3:51 UTC (permalink / raw)
  To: u-boot

Hi,

Recently I ran into some timeout issues with Ethernet on U-Boot 2009.01 for OMAP3 EVM boards.

NetSetTimeout() function provide a way to get timeouts for network related operations. I understand

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Query on timeouts with NetSetTimeout
  2009-02-20  3:51 [U-Boot] Query on timeouts with NetSetTimeout Pillai, Manikandan
@ 2009-02-20  5:39 ` Ben Warren
  2009-02-20  7:09 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Warren @ 2009-02-20  5:39 UTC (permalink / raw)
  To: u-boot

Hi Minikandan,

Pillai, Manikandan wrote:
> Hi,
>
> Recently I ran into some timeout issues with Ethernet on U-Boot 2009.01 for OMAP3 EVM boards.
>
> NetSetTimeout() function provide a way to get timeouts for network related operations. I understand
> From the code now that the NetSetTimeout() function takes 2 params , the 1st being the timeout value
> and the second one being the function to be invoked when timeout expires.
> The issue is now the NetSetTimeout() takes timeout in milliseconds only i.e the first parameter has
> to be a count in milliseconds.
>
> The NetSetTimeout() invokes get_timer() to do its operations. The get_timer() should return the
> counter value. It's not always true that the counter runs at millisecond clock. I believe the earlier
> versions of the NetSetTimeout calls in u-boot/net directory used to have a multiple of
> CONFIG_SYS_HZ for timeout that could easily be used to get required timeout for different platforms.
>   
get_timer() is expected to return milliseconds.  If your architecture 
isn't doing this it should be fixed.  You'll find much about this in the 
archives.

regards,
Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Query on timeouts with NetSetTimeout
  2009-02-20  3:51 [U-Boot] Query on timeouts with NetSetTimeout Pillai, Manikandan
  2009-02-20  5:39 ` Ben Warren
@ 2009-02-20  7:09 ` Wolfgang Denk
  2009-02-21  8:04   ` Dirk Behme
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-02-20  7:09 UTC (permalink / raw)
  To: u-boot

Dear "Pillai, Manikandan",

In message <19F8576C6E063C45BE387C64729E739403FA90441B@dbde02.ent.ti.com> you wrote:
>
> 
> The NetSetTimeout() invokes get_timer() to do its operations. The
> get_timer() should return the counter value. It's not always true
> that the counter runs at millisecond clock. I believe the earlier

We call this a bug, then. get_timer() is specified to return tick os
one millisecond resolution.

If your code behaves differntly, it needs to be fixed.

> versions of the NetSetTimeout calls in u-boot/net directory used to
> have a multiple of CONFIG_SYS_HZ for timeout that could easily be
> used to get required timeout for different platforms.

That code was cleaned up some time ago. If there are board ports
which define CONFIG_SYS_HZ to anything else byt the mandatory value
of 1000 (like OMAP seems to do), then such ports are broken and need
to be fixed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I've seen it. It's rubbish."          - Marvin the Paranoid Android

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] Query on timeouts with NetSetTimeout
  2009-02-20  7:09 ` Wolfgang Denk
@ 2009-02-21  8:04   ` Dirk Behme
  0 siblings, 0 replies; 4+ messages in thread
From: Dirk Behme @ 2009-02-21  8:04 UTC (permalink / raw)
  To: u-boot

Hi Mani,

Wolfgang Denk wrote:
> Dear "Pillai, Manikandan",
> 
> In message <19F8576C6E063C45BE387C64729E739403FA90441B@dbde02.ent.ti.com> you wrote:
>>
>> The NetSetTimeout() invokes get_timer() to do its operations. The
>> get_timer() should return the counter value. It's not always true
>> that the counter runs at millisecond clock. I believe the earlier
> 
> We call this a bug, then. get_timer() is specified to return tick os
> one millisecond resolution.
> 
> If your code behaves differently, it needs to be fixed.
> 
>> versions of the NetSetTimeout calls in u-boot/net directory used to
>> have a multiple of CONFIG_SYS_HZ for timeout that could easily be
>> used to get required timeout for different platforms.
> 
> That code was cleaned up some time ago. If there are board ports
> which define CONFIG_SYS_HZ to anything else by the mandatory value
> of 1000 (like OMAP seems to do), then such ports are broken and need
> to be fixed.

Do you kindly like to look into the two issues Wolfgang mentions here, 
test and send a patch? Sounds like you understood the issue and can 
test it ;)

Many thanks

Dirk

P.S.: Looping in BeagleBoard list.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-21  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  3:51 [U-Boot] Query on timeouts with NetSetTimeout Pillai, Manikandan
2009-02-20  5:39 ` Ben Warren
2009-02-20  7:09 ` Wolfgang Denk
2009-02-21  8:04   ` Dirk Behme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox