mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
* usb_libusb.c (usbdev_open): Downgrade the max transfer size for
the main data endpoints when being forced so by the USB; this can happen when attaching the JTAGICE3 to a USB 1.1 connection * jtag3.c (jtag3_initialize): When detecting a downgraded max transfer size on the JTAGICE3 (presumably, due to being connected to USB 1.1 only), bail out as its firmware cannot properly handle this (by now) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1129 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
16
usb_libusb.c
16
usb_libusb.c
@@ -230,6 +230,22 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
|
||||
fd->usb.rep = USBDEV_BULK_EP_READ_MKII;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < dev->config[0].interface[0].altsetting[0].bNumEndpoints; i++)
|
||||
{
|
||||
if ((dev->config[0].interface[0].altsetting[0].endpoint[i].bEndpointAddress == fd->usb.rep ||
|
||||
dev->config[0].interface[0].altsetting[0].endpoint[i].bEndpointAddress == fd->usb.wep) &&
|
||||
dev->config[0].interface[0].altsetting[0].endpoint[i].wMaxPacketSize < fd->usb.max_xfer)
|
||||
{
|
||||
if (verbose != 0)
|
||||
fprintf(stderr,
|
||||
"%s: max packet size expected %d, but found %d due to EP 0x%02x's wMaxPacketSize\n",
|
||||
progname,
|
||||
fd->usb.max_xfer,
|
||||
dev->config[0].interface[0].altsetting[0].endpoint[i].wMaxPacketSize,
|
||||
dev->config[0].interface[0].altsetting[0].endpoint[i].bEndpointAddress);
|
||||
fd->usb.max_xfer = dev->config[0].interface[0].altsetting[0].endpoint[i].wMaxPacketSize;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
trynext:
|
||||
|
Reference in New Issue
Block a user