From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/9] net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet"
Date: Tue, 8 Sep 2015 11:23:33 +0200 [thread overview]
Message-ID: <55EEA915.3000104@denx.de> (raw)
In-Reply-To: <1440739559-16225-1-git-send-email-bmeng.cn@gmail.com>
Hello Bin,
Am 28.08.2015 um 07:25 schrieb Bin Meng:
> Commit 620776d "tftp: adjust settings to be suitable for 100Mbit ethernet"
> causes the following error message when trying to load a file using 'tftp'
> command via a tftp server.
>
> TFTP error: 'Unsupported option(s) requested' (8)
>
> This is due to with commit 620776d changes, the tftp option 'timeout'
> value is now set to zero which is an invalid value as per RFC2349 [1].
> Valid values range between "1" and "255" seconds, inclusive. With some
> tftp servers that strictly implement the RFC requirement, it reports
> such an error message.
>
> Revert commit 620776d for RFC compliance.
>
> [1] https://www.ietf.org/rfc/rfc2349.txt
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Just tried current mainline on the smartweb board, and had the
same issue. Your patch fixed it, thanks!
Tested-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
>
> ---
>
> Changes in v3:
> - Drop e1000 build warning patch which is already applied
>
> Changes in v2:
> - Rewrite the commit message to mention RFC2349
>
> net/tftp.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index 18ce84c..89be32a 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -19,10 +19,10 @@
> /* Well known TFTP port # */
> #define WELL_KNOWN_PORT 69
> /* Millisecs to timeout for lost pkt */
> -#define TIMEOUT 100UL
> +#define TIMEOUT 5000UL
> #ifndef CONFIG_NET_RETRY_COUNT
> /* # of timeouts before giving up */
> -# define TIMEOUT_COUNT 1000
> +# define TIMEOUT_COUNT 10
> #else
> # define TIMEOUT_COUNT (CONFIG_NET_RETRY_COUNT * 2)
> #endif
> @@ -711,10 +711,10 @@ void tftp_start(enum proto_t protocol)
> if (ep != NULL)
> timeout_ms = simple_strtol(ep, NULL, 10);
>
> - if (timeout_ms < 10) {
> - printf("TFTP timeout (%ld ms) too low, set min = 10 ms\n",
> + if (timeout_ms < 1000) {
> + printf("TFTP timeout (%ld ms) too low, set min = 1000 ms\n",
> timeout_ms);
> - timeout_ms = 10;
> + timeout_ms = 1000;
> }
>
> debug("TFTP blocksize = %i, timeout = %ld ms\n",
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2015-09-08 9:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 5:25 [U-Boot] [PATCH v3 1/9] net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet" Bin Meng
2015-08-28 5:25 ` [U-Boot] [PATCH v3 2/9] dm: eth: Do not print misleading "Net Initialization Skipped" Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 3/9] dm: test: Add a new test case for dm_test_eth_rotate Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 4/9] dm: eth: Correctly detect alias in eth_get_dev_by_name() Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 5/9] x86: crownbay: Convert to use CONFIG_DM_USB Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 6/9] x86: crownbay: Convert to use CONFIG_DM_ETH for E1000 Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 7/9] net: pch_gbe: Convert to driver model Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 8/9] net: pch_gbe: Add Kconfig option Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-28 5:25 ` [U-Boot] [PATCH v3 9/9] x86: crownbay: Enable CONFIG_PCH_GBE Bin Meng
2015-09-01 0:32 ` Simon Glass
2015-08-30 22:45 ` [U-Boot] [PATCH v3 1/9] net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet" Simon Glass
2015-08-31 14:38 ` Joe Hershberger
2015-09-01 0:31 ` Simon Glass
2015-09-08 9:23 ` Heiko Schocher [this message]
2015-09-08 10:13 ` Hannes Schmelzer
2015-09-08 10:21 ` Bin Meng
2015-09-08 10:36 ` Stefan Roese
2015-09-08 10:42 ` Hannes Schmelzer
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=55EEA915.3000104@denx.de \
--to=hs@denx.de \
--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 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.