All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] tftp packet failure counter reset
@ 2009-09-22 23:20 Jeffery Palmer
  2009-09-22 23:32 ` Ben Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffery Palmer @ 2009-09-22 23:20 UTC (permalink / raw)
  To: u-boot


I do large transfers via tftp, and since the timeout counter never resets, they often fail since the failures are counted throughout the entire transfer. By resetting the counter to 0 on a successful packet, this issue is fixed



tftp.c:
                } else {
                        if (((TftpBlock - 1) % 10) == 0) {
                                putc ('#');
                        } else if ((TftpBlock % (10 * HASHES_PER_LINE)) == 0) {
                                puts ("\n\t ");
                        }
+                       //Reset timeout count since we received a good packet
+                       TftpTimeoutCount = 0;
                }

                if (TftpState == STATE_RRQ)
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/

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

* [U-Boot] tftp packet failure counter reset
  2009-09-22 23:20 [U-Boot] tftp packet failure counter reset Jeffery Palmer
@ 2009-09-22 23:32 ` Ben Warren
  2009-09-23 14:23   ` Jeffery Palmer
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Warren @ 2009-09-22 23:32 UTC (permalink / raw)
  To: u-boot

Jeffery Palmer wrote:
> I do large transfers via tftp, and since the timeout counter never resets, they often fail since the failures are counted throughout the entire transfer. By resetting the counter to 0 on a successful packet, this issue is fixed
>
>
>
> tftp.c:
>                 } else {
>                         if (((TftpBlock - 1) % 10) == 0) {
>                                 putc ('#');
>                         } else if ((TftpBlock % (10 * HASHES_PER_LINE)) == 0) {
>                                 puts ("\n\t ");
>                         }
> +                       //Reset timeout count since we received a good packet
> +                       TftpTimeoutCount = 0;
>                 }
>
>                 if (TftpState == STATE_RRQ)
>   
Please send a proper patch in plaintext with all the right bits and pieces.

regards,
Ben

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

* [U-Boot] tftp packet failure counter reset
  2009-09-22 23:32 ` Ben Warren
@ 2009-09-23 14:23   ` Jeffery Palmer
  2009-09-23 15:23     ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffery Palmer @ 2009-09-23 14:23 UTC (permalink / raw)
  To: u-boot


Patch is attached

> Date: Tue, 22 Sep 2009 16:32:37 -0700
> From: biggerbadderben at gmail.com
> To: jefferypalmer at hotmail.com
> CC: u-boot at lists.denx.de
> Subject: Re: [U-Boot] tftp packet failure counter reset
> 
> Jeffery Palmer wrote:
> > I do large transfers via tftp, and since the timeout counter never resets, they often fail since the failures are counted throughout the entire transfer. By resetting the counter to 0 on a successful packet, this issue is fixed
> >
> >
> >
> > tftp.c:
> >                 } else {
> >                         if (((TftpBlock - 1) % 10) == 0) {
> >                                 putc ('#');
> >                         } else if ((TftpBlock % (10 * HASHES_PER_LINE)) == 0) {
> >                                 puts ("\n\t ");
> >                         }
> > +                       //Reset timeout count since we received a good packet
> > +                       TftpTimeoutCount = 0;
> >                 }
> >
> >                 if (TftpState == STATE_RRQ)
> >   
> Please send a proper patch in plaintext with all the right bits and pieces.
> 
> regards,
> Ben

_________________________________________________________________
Bing brings you health info from trusted sources.
http://www.bing.com/search?q=pet+allergy&form=MHEINA&publ=WLHMTAG&crea=TXT_MHEINA_Health_Health_PetAllergy_1x1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp.patch
Type: application/octet-stream
Size: 404 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090923/f3c2c20b/attachment.obj 

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

* [U-Boot] tftp packet failure counter reset
  2009-09-23 14:23   ` Jeffery Palmer
@ 2009-09-23 15:23     ` Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-09-23 15:23 UTC (permalink / raw)
  To: u-boot

On Wednesday 23 September 2009 10:23:38 Jeffery Palmer wrote:
> From: biggerbadderben at gmail.com
> > Jeffery Palmer wrote:
> > > I do large transfers via tftp, and since the timeout counter never
> > > resets, they often fail since the failures are counted throughout the
> > > entire transfer. By resetting the counter to 0 on a successful packet,
> > > this issue is fixed
> >
> > Please send a proper patch in plaintext with all the right bits and
> > pieces.
>
> Patch is attached

he didnt say "attach the patch", he said "do it right".  that means:
 - do not top post in your e-mails
 - use a proper changelog
 - include your s-o-b tag

if you dont know how to do these bits, then use `git commit` to do it for you:
git commit -s -a -m 'tftp packet failure counter reset' -e
<enter your changelog as a new paragraph>
git format-patch HEAD^
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090923/3ad16c3b/attachment.pgp 

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

end of thread, other threads:[~2009-09-23 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-22 23:20 [U-Boot] tftp packet failure counter reset Jeffery Palmer
2009-09-22 23:32 ` Ben Warren
2009-09-23 14:23   ` Jeffery Palmer
2009-09-23 15:23     ` Mike Frysinger

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.