avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #34339] back to back avrdude commands fail on dragon_


From: Bill Perry
Subject: [avrdude-dev] [bug #34339] back to back avrdude commands fail on dragon_isp on Ubuntu 10.10
Date: Tue, 20 Sep 2011 20:06:30 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0.1) Gecko/20100101 Firefox/5.0.1

Follow-up Comment #2, bug #34339 (project avrdude):

There is already other code in avrdude that tries to work around things that
are outside the control of avrdude. 
In fact the usb_reset() that is already there is one such attempt. There are
other things like trying to resync communication with the device. Some of
those can be due to the device not being ready or data lost in the OS or
device due to buffer overruns which are outside the control of avrdude.

>From a user perspective they don't care where the problem is, They just want
things to "just work". 

I do agree with you that there should not be any added delay for the
normal/working path. My philosophy always is that normal paths should be as
fast as possible but the handling of errors should be allowed to take extra
time especially if there is the possibility to recover from them.

It is also true that the is no way to guarantee that any
delay picked will work 100% of the time.

That said, I think it is worth trying to come up with
a simple retry mechanism.

So I offer a tiny/simple patch that will do retries looking for the device if
no device is discovered.
It delays for short period of time (1/10th of a second) and then does retries
to wait a maximum of 3 seconds.
(polls for device every 1/10 of a second)

There is no change in behavior or timing when things are connected and working
normally.

With Ubuntu 10.10 the device on the first command is found "instantly" and on
the second command is found just a little after 1 second.

While there is no way to every guarantee that the maximum time polling time
picked will be enough, waiting a few seconds (3, 4, 5 ....) will more than
likely work in the vast majority of cases.



--- bill

(file #24002)
    _______________________________________________________

Additional Item Attachment:

File name: usbdev_open_retry.diff         Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?34339>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]