Ticket #30 (closed defect: fixed)

Opened 2 years ago

Last modified 17 months ago

[PATCH] Darwin big endian issue

Reported by: mk Owned by: hjelmn
Component: libusb-1.0 Keywords:
Cc: Blocked By:
Blocks:

Description

Hello,

submit_control_transfer() in libusb/os/darwin_usb.c is causing some trouble running avrdude on my G4 PowerPC running OS X 10.5.8:

$ LIBUSB_DEBUG=3 avrdude  -p t2313 
[...]
libusb:info [darwin_open] device open for access
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 3 with revents = 10000
libusb:info [op_handle_events] checking fd 5 with revents = 10001
libusb:info [darwin_control_callback] handling control completion with status -536854447
libusb:error [darwin_control_callback] control error = transaction timed out
libusb:warning [libusb_control_transfer] unrecognised status code 1
avrdude: Warning: cannot query manufacturer for device: Result too large
[...]

setup->wValue, setup->wIndex and setup->wLength are, as the source comment says, already in bus order, but DeviceRequestAsyncTO expects host order, according to Apple's documentation: http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/IOKit/USB_h/index.html#//apple_ref/c/tdef/IOUSBDevRequestTO

With the attached patch avrdude is working nicely

Attachments

libusb-1.0.6-darwin-ppc-endian-fix.diff (883 bytes) - added by mk 2 years ago.
Patch

Change History

Changed 2 years ago by mk

Patch

comment:1 Changed 23 months ago by hjelmn

  • Owner set to hjelmn
  • Status changed from new to assigned

comment:2 Changed 23 months ago by hjelmn

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.