bug #43268: usb_drain() call causes LUFA AVR-ISP MKII Code to Fail
* usb_libusb.c (usbdev_drain): Make this a dummy function only. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1334 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
0136b7dd1b
commit
cdee435f8b
|
@ -1,3 +1,8 @@
|
||||||
|
2014-09-22 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
bug #43268: usb_drain() call causes LUFA AVR-ISP MKII Code to Fail
|
||||||
|
* usb_libusb.c (usbdev_drain): Make this a dummy function only.
|
||||||
|
|
||||||
2014-08-19 Rene Liebscher <R.Liebscher@gmx.de>
|
2014-08-19 Rene Liebscher <R.Liebscher@gmx.de>
|
||||||
|
|
||||||
patch #7694 Add support for the atmega32m1
|
patch #7694 Add support for the atmega32m1
|
||||||
|
|
25
usb_libusb.c
25
usb_libusb.c
|
@ -565,21 +565,16 @@ static int usbdev_recv_frame(union filedescriptor *fd, unsigned char *buf, size_
|
||||||
|
|
||||||
static int usbdev_drain(union filedescriptor *fd, int display)
|
static int usbdev_drain(union filedescriptor *fd, int display)
|
||||||
{
|
{
|
||||||
usb_dev_handle *udev = (usb_dev_handle *)fd->usb.handle;
|
/*
|
||||||
int rv;
|
* There is not much point in trying to flush any data
|
||||||
|
* on an USB endpoint, as the endpoint is supposed to
|
||||||
if (udev == NULL)
|
* start afresh after being configured from the host.
|
||||||
return -1;
|
*
|
||||||
|
* As trying to flush the data here caused strange effects
|
||||||
do {
|
* in some situations (see
|
||||||
if (fd->usb.use_interrupt_xfer)
|
* https://savannah.nongnu.org/bugs/index.php?43268 )
|
||||||
rv = usb_interrupt_read(udev, fd->usb.rep, usbbuf, fd->usb.max_xfer, 100);
|
* better avoid it.
|
||||||
else
|
*/
|
||||||
rv = usb_bulk_read(udev, fd->usb.rep, usbbuf, fd->usb.max_xfer, 100);
|
|
||||||
if (rv > 0)
|
|
||||||
avrdude_message(MSG_TRACE, "%s: usbdev_drain(): flushed %d characters\n",
|
|
||||||
progname, rv);
|
|
||||||
} while (rv > 0);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue