summaryrefslogtreecommitdiff
path: root/libusb/os
Commit message (Collapse)AuthorAgeFilesLines
* Misc: Fix missing libsub's -> libusbx's from previous patchesPete Batard2012-04-031-1/+1
|
* Misc: Rebrand to libusbxPete Batard2012-04-0313-50/+45
| | | | | * Mentions of 'libusb' in doxygen are changed to 'libusbx' * Also update copyright notices and remove unneeded EOF LFs
* Linux: Don't spam the console with 'device unconfigured' errorsHans de Goede2012-03-311-2/+4
|
* Darwin: Fix a warning on 64 bit platformsPete Batard2012-03-311-1/+5
|
* Windows: fix Clang warnings about unused assignationsPete Batard2012-03-282-3/+1
|
* Linux: fix inaccurate commentHans de Goede2012-03-261-2/+1
| | | | * We don't stop on urbs/iso pkts with less data then requested
* Linux: Remove unneeded status assignationHans de Goede2012-03-261-3/+0
| | | | * status value was never used
* Linux: Translate iso pkt status codes to libusb transfer status codesHans de Goede2012-03-261-1/+35
| | | | * Linux negative errno from iso pkts status must be translated and reported.
* Linux: Fix handling of urb status codesHans de Goede2012-03-261-5/+12
| | | | | * Adds EOVERFLOW handling in handle_control_completion * Removes handling of codes that can never occur on an iso urb
* Linux: Fix cancel_transfer return value when cancelling a multi-urb transferHans de Goede2012-03-261-1/+2
| | | | | * if we've successfully cancelled the last urb, and then another urb fails with errno == EINVAL, we shouldn't return LIBUSB_ERROR_NOT_FOUND
* libusbi.h: Add IS_EPIN() IS_EPOUT() IS_XFERIN() and IS_XFEROUT() macrosPeter Stuge2012-03-223-26/+17
| | | | | | The macros make backend code a little simpler to read, since the transfer and endpoint direction is checked in several places across the supported platforms.
* Add LIBUSB_TRANSFER_ADD_ZERO_PACKET flag to indicate need for ZLPPeter Stuge2012-02-225-1/+41
| | | | | | | | | | | | | | | Some protocols which use USB require an extra zero length data packet to signal end-of-transfer on bulk endpoints, if the last data packet is exactly wMaxPacketSize bytes long. This flag allows applications to inform libusb about this requirement, so that libusb can handle the issue transparently. At the moment the new flag is only supported on Linux, and submitting a transfer with the flag set returns an error at submit time on other systems. Hopefully implementations will soon follow for other systems. References #6.
* Linux: Rework bulk continuation check to generic kernel version checkPeter Stuge2012-02-191-17/+16
| | | | | | The old check_flag_bulk_continuation() tested for one specific running kernel version. The new kernel_version_ge() instead allows to test the running kernel version against major, minor and sublevel parameters.
* OpenBSD: Correctly catch attempts to do isochronous OUT transfersPeter Stuge2012-02-191-1/+1
| | | | | LIBUSB_ENDPOINT_OUT is the value of the direction bit, which is 0 for OUT transfers, so the previous condition could never evaluate to true.
* Darwin: Do not reject devices with product id 0x0000Peter Stuge2012-02-191-2/+1
| | | | Fixes #128.
* Windows: Add Renesas SuperSpeed support for libusb_get_device_speed()Pete Batard2012-02-121-0/+1
| | | | | | * tests conducted using a Renesas PCIE USB 3.0 controller and driver and a mass storage USB 3.0 confirm that USB_NODE_CONNECTION_INFORMATION_EX uses (undocumented) value 3 for SuperSpeed
* Darwin: Clarify comments on event thread creation and terminationSean McBride2012-02-081-2/+2
|
* Darwin: Fix incorrect mutex protection of libusb_darwin_acfl globalSean McBride2012-02-081-3/+1
|
* Darwin: Use retained runloop variable instead of CFRunLoopGetCurrent()Sean McBride2012-02-081-2/+2
|
* Darwin: Fix libusb_init() and libusb_exit() refcount race conditionSean McBride2012-02-081-3/+4
| | | | | Use OSAtomicIncrement32Barrier() and OSAtomicDecrement32Barrier() in darwin_init() and darwin_exit() to be thread safe.
* threads_posix.c: Fix prototype warning by including threads_posix.hSean McBride2012-02-081-1/+1
|
* Windows: Fix crash during enumeration with >= 64 connected devicesDave Camarillo2012-02-081-1/+1
| | | | | * indexes were outgrowing the unref_list array before realloc, resulting in out of bound access and crash.
* Windows: guid_to_string() is only discarded when macro-usbi_dbg usedMichael Plante2012-02-081-1/+1
| | | | | | | | | | | | | * usbi_dbg encloses all references to guid_to_string * MinGW/cygwin warn about an unused function, so the #if squelches this warning * MSVC6 uses a variadic function form of usbi_dbg instead of a macro, so the compiler still "sees" guid_to_string and it therefore needs to always be defined for MSVC6, even if it's only a stub. * So we define it if usbi_dbg is used OR if MSVC6 is used. Signed-off-by: Michael Plante <michael.plante@gmail.com>
* Windows: Fix undefined datatype 'LONG_PTR' in MSVC6Pete Batard2012-02-081-1/+1
| | | | | | * issue reported by Elmi Signed-off-by: Michael Plante <michael.plante@gmail.com>
* Windows: Fix for MSVC6 preprocessor not accepting blank parametersPete Batard2012-02-081-11/+13
| | | | | | | * unlike later iterations of Visual Studio, MSVC6 does not accept blank parameters on macro calls [eg. CALL(a, ,b)] * blank params were used with the DLL_DECLARE and DLL_LOAD macros * issue reported by Elmi
* OpenBSD backendMartin Pieuchot2012-01-301-0/+711
|
* Darwin: Set a name for the background thread on Mac OS X 10.6 and laterSean McBride2011-12-091-0/+6
| | | | | The call to pthread_setname_np() makes it easy to identify the background thread in the Xcode debugger and in crash reports.
* Darwin: Fix warnings about mismatched signed/unsigned compareSean McBride2011-10-171-2/+3
| | | | References #121.
* Fix unused variable warnings when without timerfd and/or when on DarwinSean McBride2011-10-171-0/+5
| | | | References #121.
* Windows: do not set altsetting 0 as part of libusb_release_interface()Pete Batard2011-10-171-1/+0
| | | | | | * pointed out by Travis Robinson and Xiaofan Chen * similar to a change advised by Alan Stern for the Linux kernel: http://marc.info/?m=122790204410765
* Windows: fix communication with hubsPete Batard2011-10-171-4/+2
| | | | * issue reported by René Haunstrup in http://marc.info/?m=130503019227814
* Windows: add USB 3.0 controller supportPete Batard2011-10-171-7/+15
| | | | | | * Windows 8, NEC/Renesas, TI, Fresco Logic, Etron, VIA, ASMedia (some of which untested!) * includes workaround for NEC/Renesas USB 3.0 root hubs
* Windows: add static keywords and drop duplicated or unneeded codePete Batard2011-10-171-7/+5
|
* Windows: fix 'windows_error_str' defined but not used when not loggingPete Batard2011-10-171-0/+2
|
* Darwin: fix port leak in darwin_clock_gettime()Vitali Lovich2011-10-171-2/+16
|
* Darwin: remove unnecessary run loop invalidation during libusb_exit()Vitali Lovich2011-10-171-1/+0
|
* Darwin: fix port leak during libusb_exit()Vitali Lovich2011-10-171-0/+1
|
* Darwin: fix potential leak on libusb_claim_interface() errorVitali Lovich2011-10-171-3/+4
|
* Darwin: Fix #117 transfer size 64/32 bit issue for transfer callbacksNathan Hjelm2011-10-171-2/+4
| | | | The transfer size is now always truncated to 32 bits.
* Darwin: Reduce race likelihood between cancellation and device disconnectVitali Lovich2011-10-171-0/+7
| | | | | References #88. The race condition still remains, but this change makes it less likely to trigger.
* Linux: Fix #81 URB double free race condition on device disconnectPete Batard2011-10-171-2/+9
| | | | | | | | | | | | | | | | | A submitted transfer that has just been failed by the kernel could be picked up by an event handler to be cleaned up, where freeing of URB memory would race with the submit function doing it's own cleanup and freeing as a result of the submit failing. libusb_submit_transfer() always holds itransfer->lock, so the race can be avoided by taking that lock also in the cleanup path and checking that the URB memory has not already been freed before freeing it there. As http://libusb.org/ticket/81#comment:14 notes there is still another possible, but unlikely, race condition between libusb_submit_transfer() and an event handling thread. That will require more work to solve. [stuge: Add check in cleanup path that URBs have not already been freed]
* Linux: Add libusb_open() debug and error messages with the device pathPekka Nikander2011-09-221-0/+3
| | | | Fixes #109.
* Darwin: Use a condition to signal async thread ready in libusb_init()Nathan Hjelm2011-09-221-4/+16
|
* Fix #64 use of reserved identifiers throughout libusbNathan Hjelm2011-09-229-187/+187
|
* Darwin: fix libusb_get_device_list() and libusb_claim_interface() leaksNathan Hjelm2011-09-221-4/+5
|
* Darwin: use kIOMasterPortDefault instead of creating a master portNathan Hjelm2011-09-221-19/+2
|
* Linux: Continue enumeration even if one device returns an errorPeter Stuge2011-09-151-15/+21
|
* Linux: Handle single- and two-digit kernel versions like 3.0 and 4Hans de Goede2011-09-151-13/+21
| | | | | | The code has been tested with various version strings. [stuge: Remove bogus string length check and optimize for newer kernels]
* Windows: Provide libusb_get_device_speed() dataPete Batard2011-09-152-9/+19
| | | | | | | | | * use (currently superspeed unaware) USB_NODE_CONNECTION_INFORMATION_EX Fixes #45. [stuge: Explicitly convert OS device speeds to libusb device speeds] [pbatard: Add breaks overlooked when adding explicit conversion]
* Darwin: Provide libusb_get_device_speed() dataTrygve Laugstøl2011-09-151-0/+11
| | | | References #45.