summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libusb 1.0.19-rc1v1.0.19-rc1Hans de Goede2014-05-195-5/+23
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* strerrror.c: Add Russian translationЛарионов Даниил2014-05-192-3/+18
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* windows: fix USB 3.0 speed detection on Windows 8 or laterPete Batard2014-05-185-23/+183
| | | | | | * ...since Microsoft broke IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX between Windows 7 and Windows 8 * Also improve Windows version detection and reporting * Closes #10
* samples: set xusb to also produce debug output during init when -d is specifiedPete Batard2014-05-182-3/+22
| | | | * This can be quite useful for troubleshooting user issues
* core: fix/silence issues reported by CoverityPete Batard2014-05-165-29/+38
| | | | | | * libusb has been added to Coverity at https://scan.coverity.com/projects/2180 * Use "// coverity[keyword]" to silence the issues we don't care about * All other issues from the Windows build have been fixed, apart from the closing of the DLLs.
* darwin: initial implemenations of the hotplug_poll functionNathan Hjelm2014-05-122-5/+17
| | | | | | | | | This implementation makes use of the IOKitWaitQuiet which waits until all IOKit processing is complete. The performance won't necessarily be great but it should help codes that have not yet or cannot move to the libusb hotplug API. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* Windows: Fix broken WDK compilationPete Batard2014-05-082-14/+15
| | | | | | * void function call was returning a value * introduced in 6d8dfe0aee41a3c7dd862c3de488df3ce452d86e * also fix whitespaces
* darwin: correct endpoint address calculationNathan Hjelm2014-05-062-3/+3
| | | | | | | | | | | | The backend was incorrectly calculating the addresses of endpoints with directions other than kUSBIn and kUSBOut. This primarily affects devices with multiple control endpoints. This commit should correct the issue by only setting the direction bit when the direction is kUSBIn. Thanks to Jean-Etienne for identifying the issue. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* darwin: code cleanupNathan Hjelm2014-05-063-53/+31
| | | | | | Clean up some code in the darwin backend. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* darwin: Add support for bulk stream transfers.Nathan Hjelm2014-05-063-3/+122
| | | | | | | | This commit adds support for bulk streams to the darwin backend. I have not had a chance to fully test this code as I have no access to any devices that use this interface. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* Use @rpath in Xcode projectSean McBride2014-05-062-1/+2
| | | | | | | | | In the Xcode project, set: LD_DYLIB_INSTALL_NAME = @rpath Such that the built dylib's install name uses rpath, which is generally what one wants.
* Removed unneeded castsSean McBride2014-05-062-6/+6
| | | | The parameters already match the function declaration; no need to cast.
* Add API for using bulk streamsHans de Goede2014-04-2210-9/+116
| | | | | | | | | | | | | | | | | | | | | | Being able to allocate bulk-streams is not really useful if the user cannot specify the stream ids when submitting transfers. The actual stream id gets added to our private itransfer struct, and a setter + getter are added to get to it. Unfortunately this is the only way to add support for stream ids without breaking ABI. So this is another item to fix when we do break ABI in libusb-2.0. Bulk streams also use a separate transer type, to allow backends to determine if a transfer is a bulk stream transfer or an ordinary bulk transfer. This is added because there is no other reliable way to determine if a transfer is a stream as the stream_id is part of the private itransfer struct so apps re-using a transfer may not set it to 0. Adding a separate transfer-type for this was suggested (and coded) by Nathan Hjelm. Most users will likely use the new libusb_fill_bulk_stream_transfer() though, and will never know the difference. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add API for allocating / freeing usb3 bulk streams + Linux implementationHans de Goede2014-04-2210-1/+149
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Updated netlink code to parse events that do not contain BUSNUM andJustin Bischoff2014-04-073-3/+40
| | | | | | | | | | | | | | | | | | | | DEVNUM but do have a DEVICE parameter. These netlink events are now parsed: >>>>>>>>>>>>>>>>> add@/devices/platform/brcm-ohci-0.0/usb3/3-2/3-2:1.0 ACTION=add DEVPATH=/devices/platform/brcm-ohci-0.0/usb3/3-2/3-2:1.0 SUBSYSTEM=usb SEQNUM=290 PHYSDEVBUS=usb DEVICE=/proc/bus/usb/003/003 PRODUCT=45e/28e/114 TYPE=255/255/255 INTERFACE=255/93/1 <<<<<<<<<<<<<<<<< Also added a retry when opening the device file to work around a race condition with the kernel
* examples: fix incorrect error message in fxloadCarl Karsten2014-04-072-2/+2
| | | | * Closes #3
* Removed obsolete comment related to libusbx forkSean McBride2014-03-212-2/+1
|
* Enabled LTO optimization in release in Xcode projectSean McBride2014-03-212-1/+2
|
* Removed empty \see statements, fixing -Wdocumentation warningsSean McBride2014-03-212-13/+13
|
* Enabled additional warnings in Xcode projectSean McBride2014-03-212-2/+11
|
* darwin: squash warning about returning size_t as intNathan Hjelm2014-03-213-3/+3
| | | | | | | | I also updated the documentation on the backend get_config_descriptor function. The documentation incorrectly stated that this function returns 0 on success when it really returns the length of the descriptor. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* Documentation: Update the doxygen taglinePete Batard2014-03-202-2/+2
| | | | * Make it the same as the one used on the website and elsewhere
* darwin: use destructor function instead of atexit to cleanup stateNathan Hjelm2014-02-262-8/+3
| | | | | | | | Using an atexit function to cleanup the state could cause weird interactions with other atexit functions. Ensure the darwin cleanup function is called last by making it a destructor function instead. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* Windows: Add support for AMD USB 3.0 root hubsMarkus Heidelberg2014-02-192-3/+3
| | | | | | | | * The driver has to be updated to version 1.0.0.66 (2011-10-25) or later * Older versions can fail with the following warning: could not get node connection information for device [..]: [87] The parameter is incorrect. * Also Remove duplicated "API" string in debug output * Closes #1
* Documentation: fix hotplug exampleMarkus Heidelberg2014-02-022-2/+7
| | | | | * add a missing call to libusb_handle_events_completed() * add a missing argument to libusb_hotplug_deregister_callback()
* Windows: Add support for (old?) Intel USB 3.0 hub driverPete Batard2014-02-012-2/+2
| | | | * Has VID:PID 8086:1111
* libusb 1.0.18v1.0.18Pete Batard2014-01-254-3/+4
|
* Windows: Fix MinGW parallel buildxantares2014-01-252-2/+2
|
* Darwin: Fix Xcode warning in 'struct timeval' initializationSean McBride2014-01-212-2/+2
|
* libusb 1.0.18-rc1v1.0.18-rc1Pete Batard2014-01-084-3/+20
|
* Misc: Revert all references to libusb/libusb.infohjelmn@cs.unm.edu2014-01-0878-1316/+455
|
* Windows: Fix a MinGW compilation issuePete Batard2014-01-082-1/+6
| | | | | * Some MinGW platforms may not have FACILITY_SETUPAPI defined * Issue introduced with 8b46e1c088167eb86b1712765896e2f17d70d148
* Darwin: Fix format of 64-bit sessionIDs in log messagesMatthias Bolte2014-01-072-5/+5
| | | | | * The sessionID value is 64-bit, so print it as such. * Closes #153
* Darwin: Fix a SIGFPEBei Zhang2014-01-072-3/+9
| | | | | | * GetPipeProperties() may fail when the device is unplugged if DeviceVersion is not greater than 320. * In this case maxPacketSize will be zero and the integer division will throw a EXC_ARITHMETIC signal. * Closes #136
* Darwin: Return error code in darwin_error_str() on unknown errorFrancisco Facioni2014-01-072-2/+4
| | | | * Closes #117
* Windows: Add SetupAPI error handlingPete Batard2013-12-302-1/+15
| | | | | | | | * http://msdn.microsoft.com/en-us/library/windows/hardware/ff545011.aspx states that SetupAPI errors must be be converted before passing it to FormatMessage(). * Use our own implementation of HRESULT_FROM_SETUPAPI to avoid defining a new function call. * Issue and original fix suggested by Matthias Bolte * Closes #166
* Linux: Remove trailing whitespaceMoritz Fischer2013-12-282-5/+5
| | | | * Closes #157
* Android: Add support for Linux/Android platformsKuangye Guo2013-12-284-10/+32
| | | | * Closes #154
* Android: Build for all Android architecturesAndrew Fernandes2013-12-283-2/+8
| | | | | | | * Don't limit support to ARM only (adds MIPS support) * Also add a workaround for a MIPS NDK linker bug * Also add a gitignore entry required to run bootstrap.sh on OS X * Closes #134
* Windows: Add Visual Studio 2013 solution filesJoshua Blake2013-12-1311-1/+1422
| | | | | * Also update gitignore * Closes #162
* core: fix Doxygen warningLudovic Rousseau2013-12-062-2/+2
| | | | | | | | | libusbx/libusb/libusb.h:153: warning: no matching file member found for libusb_cpu_to_le16()Possible candidates: static uint16_t libusb_cpu_to_le16(const uint16_t x) Thanks to Serhat Sevki Dincer for the bug report http://sourceforge.net/mailarchive/message.php?msg_id=31719691
* Windows: Fix a crash when HID transfers return no dataPete Batard2013-11-272-13/+15
| | | | | * Issue reported by Surmakyynis * Closes #160
* core: Make LIBUSB_DEBUG environment variable also work from libusb_exitHans de Goede2013-11-202-8/+15
| | | | | | | libusb_exit sets usbi_default_context to NULL, modify usbi_log_v so that it still honors the LIBUSB_DEBUG environment variable in this case. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* hotplug: Fix usb_device memleak with hotunplug events pending on libusb_exitHans de Goede2013-11-202-1/+15
| | | | | | Closes #150 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* io: Ensure all pending events are consumed in one libusb_handle_events callHans de Goede2013-11-202-1/+12
| | | | | | | | | Before this patch if ie multiple hot-plug events were pending, multiple handle_events calls would be necessary to handle them all, this patch changes handle_events so that the poll is re-done to check for more events if there was activity on any of the special fds. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Windows: Add support for VIA VL805 USB 3.0 Host ControllersOmri Iluz2013-10-082-2/+2
| | | | | * These controllers identify themselves as VUSB3HUB * Closes #152
* examples: check value returned by ftell()Ludovic Rousseau2013-10-062-2/+6
| | | | | | | | | Problem detected by the Coverity tool CID 1042546 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)3. negative_returns: "initial_pos" is passed to a parameter that cannot be negative. fseek(3) can't be called with a negative offset with SEEK_SET
* Windows: Avoid potential mismatch in transfer error reportingMatthias Bolte2013-10-012-2/+2
| | | | | | | | | | | | | | The default case in windows_transfer_callback() calls windows_error_str(0) which will convert the error code returned by GetLastError() to a string. This currently works because windows_transfer_callback() is either called with io_result set to NO_ERROR or io_result set to GetLastError(). If windows_transfer_callback() will ever be called with io_result set differently then the default case might report the wrong error message. Call windows_error_str(io_result) instead to avoid this. Closes #151
* examples: add an option to force a device request for WCID descriptorsPete Batard2013-09-292-2/+12
| | | | | | | | | * Add option 'w' to force the use of a Device Request rather than an Interface Request when querying the WCID OS Extended Properties descriptor. * This is due to a WinUSB limitation where all Interface Requests have the wIndex set to the interface number. * This assumes that the WCID firmware answers both Device and Interface requests equally.
* examples: fix warningLudovic Rousseau2013-09-282-2/+2
| | | | | | | ezusb.c: In function 'ezusb_load_ram': ezusb.c:719:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] int ret;