Am 16.10.2011 um 06:23 schrieb Doug S: > URL: > <http://savannah.nongnu.org/patch/?7635> > > Summary: Fix avrftdi.c/h Random lockup/moved globals to > private data against 5.11.1 > Project: AVR Downloader/UploaDEr > Submitted by: rickyrockrat > Submitted on: Sun 16 Oct 2011 04:23:53 AM GMT > Category: None > Priority: 5 - Normal > Status: None > Privacy: Public > Assigned to: None > Originator Email: > Open/Closed: Open > Discussion Lock: Any > > _______________________________________________________ > > Details: > > I found a strange lockup with avrftdi on writes - verifys and reads work with > no problem. I had a hardware change (new mother board) so I thought at first > that was it, but it happens on at least two different computers. > > At random places while writting, it will lock up and loop forever. > > strace gives this (forever, AFAIK): > > ioctl(3, USBDEVFS_REAPURBNDELAY, 0x7fff2a91b1e8) = -1 EAGAIN (Resource > temporarily unavailable) > > Removing the purge buffers seems to fix the problem. I'm not sure what all > ramifications the purge has, since I didn't bother to delve into the ftdi > code, but I found one other example, and I noticed they had found this problem > and removed the purge call as well. > > This patch also moves the globals to a private structure, as per Joerg's last > request to do so. > If i remember correctly, this happens if the/a USB-device is re-enumerated when it is in use. Re-enumeration may be triggered by a loose connection (bad cable/soldering joint). Have you tried different cables/programmers/USB-ports?
As fix, you commented out the flush-routine, but that will trigger problems when using high speed transfers, as the comment of avrftdi_flush() states. At least I had problems, using an FTDI 2232C. Do you have problems using 1MHz clock speed and more, without avrftdi_flush()? Thanks for taking the initiative on moving the globals variables to a private structure. Best regards, Hannes _______________________________________________ avrdude-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avrdude-dev
