avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] [bug #34339] back to back avrdude commands fail on dra


From: Joerg Wunsch
Subject: Re: [avrdude-dev] [bug #34339] back to back avrdude commands fail on dragon_isp on Ubuntu 10.10
Date: Thu, 8 Dec 2011 09:39:10 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Xiaofan Chen wrote:

> I think the root cause of the issue is the following codes
> in usb_libusb.c.

>   usb_reset(udev);

No, it isn't.  The main reason is that all the Atmel-provided tools
(JTAGICEmkII, AVRISPmkII, AVR Dragon) volunteerily leave and rejoin
the USbus when we say "Good-bye" to them, causing them to be
enumerated by the OS.  That "dead time" also applies to these tools on
FreeBSD where AVRDUDE doesn't call usb_reset() by itself.

> I believe the above usb_reset() is no longer needed for most of
> the Linux users now. It is usually only required for kernel versions
> up to 2.6.28.

"most of the Linux users" isn't enough though, we have to ensure all
of the Linux users are able to work with it, otherwise we'd introduce
a regression.

Keep in mind that, in particular production system frequently use
older kernel versions (for a variety of reasons outside the control
of those users).  For example, our Linux machines at work run kernel
version 2.6.9.

Having said this, I wouldn't mind if someone provided a patch that
reliably detects whether the underlying Linux kernel needs the
usb_reset() or not.  Preferrably, the patch should do a run-time
detection of the appropriate kernel version (through uname(2)?)
rather than a compile-time test.  (Apparently, MacOS X still has
issues without the usb_reset(), so for them, it should be left in.)
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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