summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* v0.9.2 releasev0.9.2Daniel Drake2008-07-192-1/+4
|
* Linux: fix sysfs directory handlingDaniel Drake2008-07-162-4/+9
| | | | | The length of the directory name varies, e.g. when you have nested hubs. Use dynamic allocation to be able to deal with any length of name.
* Linux: correct usage of MAX_PATHDavid Engraf2008-07-161-6/+6
| | | | | Thanks to clarification from Artem Egorkine, MAX_PATH already includes space for the trailing NULL.
* Linux: fix bulk/iso transfer double-cancellationDaniel Drake2008-07-081-0/+4
| | | | | | Reset counters to 0 so that it's possible to cancel a transfer twice without breaking things. Not sure that I want to support this properly, but this makes it work at least.
* v0.9.1 releasev0.9.1Daniel Drake2008-06-282-1/+6
|
* Add missing GET_CONTEXT()Daniel Drake2008-06-281-0/+1
|
* Linux: Compatibility with new sysfs descriptors fileDaniel Drake2008-06-282-83/+156
| | | | | As of 2.6.26, the descriptors file now includes all descriptors, not just the active one.
* Allow user data pointer to be passed through pollfd notification APIDaniel Drake2008-06-263-6/+16
|
* Introduce contexts to the APIDaniel Drake2008-06-2611-398/+606
| | | | | Suggested by David Zeuthen. This allows multiple libraries in the same process to independently use libusb without interfering.
* Revert "Temporary workaround for event handling serialization issue"Daniel Drake2008-06-241-15/+1
| | | | | | This reverts commit 2d3a1111caff40ebb87983c861ff548cdc9e5946. This was based on the assumption that dying threads would automatically release mutexes, which is not the case.
* Overflow handlingDaniel Drake2008-06-205-7/+82
|
* a fix for SIGSEGV in handle_bulk_completion()Artem Egorkine2008-06-172-1/+2
| | | | | | We cannot dereference tpriv after calling usbi_handle_transfer_cancellation() because that function may invoke the user-supplied callback which may free the transfer.
* Refine configuration selection againDaniel Drake2008-06-161-42/+72
| | | | | | At Alan Stern's suggestion, just offer the bare "set configuration" and "get configuration" functionality, and let applications worry about the specific race conditions and unusual situations.
* docs updateDaniel Drake2008-06-153-1/+22
| | | | Add a THANKS file, make copyright notices easily accessible, update TODO
* round up poll timeoutDaniel Drake2008-06-151-0/+5
| | | | | Pointed out by Richard Röjfors, otherwise we end up busy-looping with a poll() timeout of 0.
* fix doc about libusb_open()Felipe Balbi2008-06-151-1/+6
| | | | | | | libusb_open() returns int instead of libusb_device_handle. Signed-off-by: Felipe Balbi <me@felipebalbi.com> [dsd: small correction]
* Temporary workaround for event handling serialization issueDaniel Drake2008-05-291-1/+15
| | | | | | | | | | | | Ludovic Rousseau pointed out that libusb_unlock_events() is not called when a thread gets terminated with a signal, meaning that event waiters will not be woken up in this case. Add a temporary hack to libusb_event_handler_active() so that at least the other threads will realise on the next iteration of their event handling loop. The real fix will likely involve reworking most of this.
* Refine libusb_set_configuration() semanticsDaniel Drake2008-05-293-3/+120
| | | | | | | | | | | | | Applications will generally want to set a configuration before claiming interfaces. The problem is that the interface may already be set, and someone else may have claimed an interface (meaning that all calls to set_configuration will fail, even if it's for the same configuration). There are now 2 options: 1. Use the new libusb_get_configuration() to determine active configuration before calling libusb_set_configuration() 2. Or just call libusb_set_configuration() as usual, which will do nothing if that configuration is already active.
* v0.9.0 releasev0.9.0Daniel Drake2008-05-253-5/+15
| | | | First libusb-1.0 beta release
* Take lock before raising event waiters conditionDaniel Drake2008-05-251-0/+2
| | | | | This avoids a race between the user checking for active event handler and then blocking on the condition variable
* Implement serialization of event handlersDaniel Drake2008-05-254-30/+523
| | | | | | Now offers a mechanism to wait for events while another thread is doing the event handling. Complicates things for MT async apps, but then again it's a bit of a tricky combination to start with.
* allow LIBUSB_DEBUG env var to control message verbosity at runtimeDaniel Drake2008-05-241-5/+50
| | | | Based on ideas from Ludovic Rousseau
* don't print messages by defaultDaniel Drake2008-05-232-0/+35
| | | | | | | Add libusb_set_debug() API to set message verbosity. Ludovic Rousseau pointed out that applications may close stdout/stderr descriptors, which might then be reused.
* Fix memory leak in libusb_control_transferDaniel Drake2008-05-191-0/+1
| | | | Pointed out by David Engraf: we weren't freeing the transfer buffer
* Linux: fix handling of ioctl failureDavid Engraf2008-05-191-14/+16
| | | | | | The return value of some ioctl commands in linux_usbfs.c are not handeled correct. The ioctl function returns != 0 and errno is set with the error code.
* critical memory leak in handle_eventsDavid Engraf2008-05-191-0/+4
| | | | | | | This patch closes a critical memory leak in handle_events. The fds variable is malloced but never freed. When I'm calling handle_events with a timeout of 0, my system runs out of memory after a few seconds.
* More informative libusb_open() return codeDaniel Drake2008-05-163-21/+32
| | | | Hopefully one of the last API tweaks...
* Fix endianness with descriptor handlingDaniel Drake2008-05-164-58/+87
| | | | | Alan Stern pointed out that usbfs gives host-endian data, but sysfs gives bus-endian.
* Backend documentation for porting effortsDaniel Drake2008-05-135-14/+461
| | | | Hopefully comprehensive enough for people to get started.
* Linux: fix caching of guessed configurationDaniel Drake2008-05-121-5/+11
| | | | Reported and tested by Xiaofan Chen
* Linux: fix bulk transfer early completionRob Walker2008-05-111-7/+42
| | | | | | | We were forgetting about the remaining urbs when a non-final urb completed early. [dsd: some touchups and a warning message for a corner case that we don't handle]
* Handle hot-unpluggingDaniel Drake2008-05-118-89/+236
| | | | | This involved moving from select() to poll() because there is no way to distinguish usbfs's POLLERR condition with select().
* Documentation workDaniel Drake2008-05-113-2/+67
|
* Endianness of control setup packetsDaniel Drake2008-05-116-41/+53
| | | | | | | | Document behaviour where host-endian and bus-endian (little) should be used respectively. Also remove packed attribute from libusb_control_setup as all fields are naturally aligned.
* Document that releasing interface causes SET_INTERFACE control requestDaniel Drake2008-05-112-2/+2
|
* Support unconfigured devicesDaniel Drake2008-05-105-72/+128
|
* Linux: fix caching of active configuration for non-sysfsDaniel Drake2008-05-104-22/+41
|
* Fetch configurations by index (not value)Daniel Drake2008-05-105-57/+74
| | | | Otherwise there is no way to know which values to look for.
* Linux: comprehensive sysfs vs usbfs accessDaniel Drake2008-05-101-102/+210
| | | | Be more flexible when certain parts of sysfs are not available.
* Linux: no need to store usbfs node pathDaniel Drake2008-05-091-19/+15
| | | | This can be computed from bus number and device address
* Rework configuration handlingDaniel Drake2008-05-097-183/+513
| | | | | | libusb no longer caches descriptors in libusb_device but backends are intended to be able to provide copies from memory. In the common linux case we can use sysfs.
* libusb_get_device_list() can return negative error codeDaniel Drake2008-05-093-4/+7
|
* Linux: fix clear_halt implementationDaniel Drake2008-05-081-1/+2
| | | | | The ioctl expects an integer. Bug found with the assistance of Soumen Mondal
* Documentation workDaniel Drake2008-05-083-0/+82
| | | | Partially based on some libusb-devel discussions
* Linux: enumerate devices and descriptors from sysfsDaniel Drake2008-05-052-22/+137
| | | | | | Suggested by Alan Stern. This avoids waking up any suspended USB devices. sysfs is not available on all systems, so the usbfs mechanism is still in place as a fallback.
* documentation touchupsDaniel Drake2008-05-056-21/+37
|
* more error code sanitizationDaniel Drake2008-05-054-20/+20
|
* Isochronous transfer helper functionsDaniel Drake2008-05-053-13/+129
|
* free open devices on exitDaniel Drake2008-05-051-4/+8
|
* move descriptor parsing into main libraryDaniel Drake2008-05-053-100/+201
| | | | | OS modules now provide functionality for fetching device/config descriptors