Submitted by Stephen Roe:

patch #7710: usb_libusb: Check VID/PID before opening device
* usb_libusb.c (usbdev_open): Swap the sequence of verifying the
VID:PID, and opening the device.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1228 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2013-09-13 19:56:07 +00:00
parent 4d6574dc51
commit 4b5ecec817
3 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Stephen Roe:
patch #7710: usb_libusb: Check VID/PID before opening device
* usb_libusb.c (usbdev_open): Swap the sequence of verifying the
VID:PID, and opening the device.
2013-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
patch #8176: butterfly.c (AVR109 protocol implementation) clean-up and bug-fixing

View File

@ -107,10 +107,11 @@ Current:
- bug #28344: chip_erase_delay too short for ATmega324P, 644, 644P, and 1284P
- bug #34277: avrdude reads wrong byte order if using avr911 (aka butterfly)
- bug #35456: The progress bar for STK500V2 programmer is "wrong".
- patch #5708 avrdude should make 10 synchronization attempts instead of just one
- patch #7606 ATtiny43u support
- patch #7657 Add ATmega406 support for avrdude using DRAGON + JTAG
- bug #35474 Feature request: print fuse values in safemode output.
- patch #5708: avrdude should make 10 synchronization attempts instead of just one
- patch #7606: ATtiny43u support
- patch #7657: Add ATmega406 support for avrdude using DRAGON + JTAG
- bug #35474: Feature request: print fuse values in safemode output.
- patch #7710: usb_libusb: Check VID/PID before opening device
* Keep track of input file contents

View File

@ -115,11 +115,11 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
{
for (dev = bus->devices; dev; dev = dev->next)
{
udev = usb_open(dev);
if (udev)
if (dev->descriptor.idVendor == USB_VENDOR_ATMEL &&
dev->descriptor.idProduct == (unsigned short)baud)
{
if (dev->descriptor.idVendor == USB_VENDOR_ATMEL &&
dev->descriptor.idProduct == (unsigned short)baud)
udev = usb_open(dev);
if (udev)
{
/* yeah, we found something */
if (usb_get_string_simple(udev,
@ -246,10 +246,14 @@ static int usbdev_open(char * port, long baud, union filedescriptor *fd)
fd->usb.max_xfer = dev->config[0].interface[0].altsetting[0].endpoint[i].wMaxPacketSize;
}
}
return 0;
return 0;
trynext:
usb_close(udev);
}
trynext:
usb_close(udev);
else
fprintf(stderr,
"%s: usbdev_open(): cannot open device: %s\n",
progname, usb_strerror());
}
}
}