commit 9140f5b414e37a3714cde9c6d6c87c963338a83a
Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jun 28 21:28:44 2008 -0500 v0.9.1 release commit 83a029062c1d2bfb584d7a6ee94915583d37464c Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jun 28 21:24:49 2008 -0500 Add missing GET_CONTEXT() commit fbad9a5426f0369394c88987355a8fb06a741ca1 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jun 28 21:18:41 2008 -0500 Linux: Compatibility with new sysfs descriptors file As of 2.6.26, the descriptors file now includes all descriptors, not just the active one. commit 819e65f880ca43526036e56c65c415042c91f58f Author: Daniel Drake <dsd@gentoo.org> Date: Thu Jun 26 22:47:05 2008 -0500 Allow user data pointer to be passed through pollfd notification API commit 1df713d622ab4f0b03aad72d903ac7beb8fb3b90 Author: Daniel Drake <dsd@gentoo.org> Date: Tue Jun 24 23:01:51 2008 -0500 Introduce contexts to the API Suggested by David Zeuthen. This allows multiple libraries in the same process to independently use libusb without interfering. commit 9818151c60a85aea6af24cb0996a92c3726c9864 Author: Daniel Drake <dsd@gentoo.org> Date: Tue Jun 24 21:31:13 2008 -0500 Revert "Temporary workaround for event handling serialization issue" This reverts commit 2d3a1111caff40ebb87983c861ff548cdc9e5946. This was based on the assumption that dying threads would automatically release mutexes, which is not the case. commit d5f82893fab3f1c13b1af4ba17aac72479bad7d5 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jun 20 23:04:53 2008 -0500 Overflow handling commit 546dee211eefbdd280fd1fc9dee84a9b52105078 Author: Artem Egorkine <arteme@gmail.com> Date: Tue Jun 17 18:27:38 2008 -0500 a fix for SIGSEGV in handle_bulk_completion() We cannot dereference tpriv after calling usbi_handle_transfer_cancellation() because that function may invoke the user-supplied callback which may free the transfer. commit 947ba8056456a5215724fb502e3e09d50016f699 Author: Daniel Drake <dsd@gentoo.org> Date: Mon Jun 16 22:50:50 2008 -0500 Refine configuration selection again 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. commit e7a7a49d0331ee0e14145f6e7ec39763b36314ac Author: Daniel Drake <dsd@gentoo.org> Date: Sun Jun 15 15:29:38 2008 -0500 docs update Add a THANKS file, make copyright notices easily accessible, update TODO commit 217534e4b396081e038ee5f94c813d1668963673 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Jun 15 15:23:29 2008 -0500 round up poll timeout Pointed out by Richard Röjfors, otherwise we end up busy-looping with a poll() timeout of 0. commit 5ad79b324bc5e11a75a585398a1e81c26f05e758 Author: Felipe Balbi <me@felipebalbi.com> Date: Sun Jun 8 12:34:48 2008 +0300 fix doc about libusb_open() libusb_open() returns int instead of libusb_device_handle. Signed-off-by: Felipe Balbi <me@felipebalbi.com> [dsd: small correction] commit 2d3a1111caff40ebb87983c861ff548cdc9e5946 Author: Daniel Drake <dsd@gentoo.org> Date: Thu May 29 17:26:26 2008 +0100 Temporary workaround for event handling serialization issue 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. commit 514bb8790cfe8b93ccfff82bc17081b1030acce0 Author: Daniel Drake <dsd@gentoo.org> Date: Thu May 29 12:35:01 2008 +0100 Refine libusb_set_configuration() semantics 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. commit d1292f8e7300051239a7ed2769d221dc7a6f9fca Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 25 23:42:42 2008 +0100 v0.9.0 release First libusb-1.0 beta release commit 4cd249388e4ed2ca03f1263984ab67df5030bb65 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 25 22:59:09 2008 +0100 Take lock before raising event waiters condition This avoids a race between the user checking for active event handler and then blocking on the condition variable commit 7c525480ab3c4db9205bfe30bb0d2bef9096c444 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 23 15:57:07 2008 +0100 Implement serialization of event handlers 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. commit ff0660a415ecfd0879600eaad1c5899b6d93a30a Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 24 21:28:31 2008 +0100 allow LIBUSB_DEBUG env var to control message verbosity at runtime Based on ideas from Ludovic Rousseau commit 4d788967e3f8d75eaf3a1ac1ee8e2e8bed0601c1 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 23 15:58:11 2008 +0100 don't print messages by default 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. commit bef33bb9eba0da04ee7488d9cd5e6ab12bc61c0c Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 19 15:43:27 2008 +0100 Fix memory leak in libusb_control_transfer Pointed out by David Engraf: we weren't freeing the transfer buffer commit a345bacb6f07ebb2122402041a9e8092d4a20a4d Author: David Engraf <david.engraf@netcom.eu> Date: Mon May 19 15:16:32 2008 +0100 Linux: fix handling of ioctl failure 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. commit e44396a458ecea9e5edd9a7577e617571c76860d Author: David Engraf <david.engraf@netcom.eu> Date: Mon May 19 15:13:38 2008 +0100 critical memory leak in handle_events 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. commit eb25630f52bc9848b444e439632c899977d887b0 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 16 23:50:20 2008 +0100 More informative libusb_open() return code Hopefully one of the last API tweaks... commit 2b2e9c40b195261b09ac52ebdb93eef25c79de90 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 16 22:37:56 2008 +0100 Fix endianness with descriptor handling Alan Stern pointed out that usbfs gives host-endian data, but sysfs gives bus-endian. commit 1298c51f516a7bf04ca9add1b7db14417cdc66f3 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 12 18:46:37 2008 +0100 Backend documentation for porting efforts Hopefully comprehensive enough for people to get started. commit ade26afc42c34ceb1c45afcadd2ea5e8240eaca4 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 12 15:43:30 2008 +0100 Linux: fix caching of guessed configuration Reported and tested by Xiaofan Chen commit e25d590a9198995b4f0b6afeb41ecae318715e7e Author: Rob Walker <rob@tenfoot.org.uk> Date: Sun May 11 21:14:18 2008 +0100 Linux: fix bulk transfer early completion 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] commit fec7c84163e25b8f811632828334d75da82bcb16 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 11 20:31:58 2008 +0100 Handle hot-unplugging This involved moving from select() to poll() because there is no way to distinguish usbfs's POLLERR condition with select(). commit aeb905fa5d78cdbba80a680aa7a2bb7338f27f65 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 11 16:04:35 2008 +0100 Documentation work commit ba5d9a45c06311204f51faef41d1ee215bb5b823 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 11 15:36:24 2008 +0100 Endianness of control setup packets 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. commit 7bedc3b2683f35ee1dd39a2ebe0ec05be0019f38 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 11 15:11:59 2008 +0100 Document that releasing interface causes SET_INTERFACE control request commit f2ede9876cd4f5cfa7751b975670fa449187fe3d Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 10 21:45:42 2008 +0100 Support unconfigured devices commit 8ebb4ccdfaf5f095a1c38787d909d280ea64405c Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 10 20:56:44 2008 +0100 Linux: fix caching of active configuration for non-sysfs commit c3844f7aeb2176636ce6e6ef697659fdb0b30048 Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 10 14:42:43 2008 +0100 Fetch configurations by index (not value) Otherwise there is no way to know which values to look for. commit d77052c0d630e33737c38d601fd633155f6b2229 Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 10 00:12:53 2008 +0100 Linux: comprehensive sysfs vs usbfs access Be more flexible when certain parts of sysfs are not available. commit 74bc842bac1a32a26323da6c3e8af2f66e1b5cfa Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 9 19:38:13 2008 +0100 Linux: no need to store usbfs node path This can be computed from bus number and device address commit fe4adcc99e30115204ab832ad3e0170c9aca7629 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 9 14:34:31 2008 +0100 Rework configuration handling 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. commit 5741bfe01a2481b8c3830c80edc3637bf62a7e16 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 9 14:36:14 2008 +0100 libusb_get_device_list() can return negative error code commit 45413101b78298e9332b22a34bc6bc159000ad8a Author: Daniel Drake <dsd@gentoo.org> Date: Thu May 8 23:09:21 2008 +0100 Linux: fix clear_halt implementation The ioctl expects an integer. Bug found with the assistance of Soumen Mondal commit 10d4e427cc171dfd6ad7f43a33ce3cfebcd7aa04 Author: Daniel Drake <dsd@gentoo.org> Date: Thu May 8 23:04:52 2008 +0100 Documentation work Partially based on some libusb-devel discussions commit ded0a249322571a075e3ed3528021864247dfa55 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 22:57:48 2008 +0100 Linux: enumerate devices and descriptors from sysfs 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. commit 885c2a5de69d6b7d8902bb55d6d83680a5a1a6e5 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 21:34:31 2008 +0100 documentation touchups commit 59c205d542b43d79fe28622dbe8f03a3a3300b6f Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 21:17:03 2008 +0100 more error code sanitization commit 88055d4b5913102a90ff666f75fd922c74860dc5 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 20:57:43 2008 +0100 Isochronous transfer helper functions commit a95c943ed301dcd20e92b0b3b255568899a4c42e Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 17:54:33 2008 +0100 free open devices on exit commit b27fff633843824744df7d334cb89ece329cafa6 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 17:47:49 2008 +0100 move descriptor parsing into main library OS modules now provide functionality for fetching device/config descriptors commit a304eca71f22c6df7d70a901483b30f1b8e93378 Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 16:22:33 2008 +0100 Detect endpoint halts and unsupported control requests commit 7da521954ba661d3f537440c31a84b66e974d56b Author: Daniel Drake <dsd@gentoo.org> Date: Mon May 5 01:00:31 2008 +0100 Linux: fix logical URB allocation We were allocating the wrong number of URBs for transfers of size multiples of 16k. commit 470b1bc42bf53373ce678fc76bab9160a54d6881 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 16:51:23 2008 +0100 add functionality for querying and detaching kernel driver commit 17ecfb0ecc833596c43755c80d461cddb9b3b0d7 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 16:20:46 2008 +0100 Descriptor reading functionality commit bdce367d1bd8691465844b2411c85215498f517d Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 14:22:16 2008 +0100 sanitized error returns from synchronous I/O functions commit bfe74e9cd9c17a40fff042ea0647326f51cfecae Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 14:10:19 2008 +0100 implement libusb_reset_device() commit c01f744ce07bbeccbe353e956479f0cc5a811a6f Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 13:46:41 2008 +0100 Add functionality to clear endpoint halt conditions commit 5878daa85e3364bb3885190425d4f9deaa2d8c36 Author: Daniel Drake <dsd@gentoo.org> Date: Sun May 4 00:51:59 2008 +0100 Fix libusb_get_device_list return value It was documented to return the list length, but was returning 0. commit a74106a9b48b88bae0e099be34a18d653a8f1238 Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 16:50:58 2008 +0100 Well-defined error codes for some operations Also renamed set_interface_altsetting to set_interface_alt_setting for better consistency commit 0f463fe671455670efcf4a93e526b2a9082b0afe Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 16:24:11 2008 +0100 Add libusb_set_configuration() commit e65608994f795f97e4d6adac20329ca08709db2d Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 15:40:23 2008 +0100 rename LIBUSB_ERROR_NOMEM to LIBUSB_ERROR_NO_MEM improves consistency commit 5384bbf300779e7936eac9ebd33ee38f5b533f8e Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 14:34:54 2008 +0100 Linux: better EACCES handling commit 1936eeeba3f933a078df1005cc7c1533a8ec2bac Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 14:26:56 2008 +0100 Rename reference counting API This improves consistency with the naming style of other functions commit e2f822b4f17342f614ab2455179a80975fca6cb0 Author: Daniel Drake <dsd@gentoo.org> Date: Sat May 3 14:24:40 2008 +0100 Linux: use read-only access to enumerate devices and descriptors Write access is not needed until later. Also fix handling of open() error code. commit 81204eed3d0a7744b89b68bd90d567b68d191a91 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 17:45:23 2008 +0100 document pollfd notifiers commit e20f8281fb7da32587f81b5eea5818af1eab0fe0 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 17:33:52 2008 +0100 Allow multiple interfaces to be claimed commit 66685ff25d81a1f1a2a3dbda882d407638d00672 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 16:55:36 2008 +0100 Documentation improvements commit 55bce39cbe0c9746a428b66751d1afe551d86381 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 12:55:34 2008 +0100 detect short descriptor reads commit f3f17846dcced6b2dc40f899ed6a2aba151c264b Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 12:32:46 2008 +0100 remove "references" and "referenced by" listings in documentation commit fbb017dd9a26ce449578482b95157b3c850fa446 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 12:32:08 2008 +0100 Use typedef ptr types in parameters and return types This is passed through to the docs commit 3675e978fb7a1042f8601931255658bcd14a2298 Author: Daniel Drake <dsd@gentoo.org> Date: Fri May 2 12:28:31 2008 +0100 Expose bus number and device address commit 2012898ffc492317cb428d97077bf5ee0e98e1da Author: Daniel Drake <dsd@gentoo.org> Date: Tue Apr 29 15:26:46 2008 +0100 standardised error codes commit 0269c75ae3de7acb2dc555e45928750e35fdb320 Author: Daniel Drake <dsd@gentoo.org> Date: Tue Apr 29 13:34:26 2008 +0100 Fix descriptor handling memory leaks commit d3ab4e3bd4068cba41c1e12c4b175018dc3cb343 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 23:50:01 2008 +0100 Rename endpoint_type to transfer_type Matches the USB specs more closely commit 379e90e0fdcef6f4db1849fa0a7fd524407cf564 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 23:41:24 2008 +0100 Remove a FIXME comment it can't. commit 2ddf81420557d016bbcbf28dda0d8d1c64d16264 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 23:30:34 2008 +0100 Fix unlocked flying_transfers list access commit 7ac0a405b4c57db42e88cbcba5f135697f03b646 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 23:27:04 2008 +0100 Remove libusb_cancel_transfer_sync This wasn't a particularly nice API. Cancellation should be handled by the completion handler. commit a5006fd7b9dae6f1db7969c8744086ba3a7c027b Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 19:56:02 2008 +0100 remove extra timeout check If select() didn't timeout then don't check for more timeouts commit 3bdafaa359d9c65e1af360b5338e1f25528a8066 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Apr 27 19:53:51 2008 +0100 Documentation touchups Detail that interrupt polling interval is fixed to endpoint bInterval, and that data may be transferred even on a timeout condition. commit e12618c79d520955b1abf80a277e881d91907162 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Apr 19 16:17:53 2008 +0100 add threaded example program commit 1fcdb0678b759569db7cd530457dbc0a5f86fb1d Author: Daniel Drake <dsd@gentoo.org> Date: Fri Apr 18 23:58:54 2008 +0100 libusb_device mutex protection commit 0efd2efa65d5513e5754d717d522b2c5c45332e2 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Apr 18 23:42:40 2008 +0100 mutex protection for device and handle lists commit d2ff2b14a15e5099ff0214502944de30f141a39c Author: Daniel Drake <dsd@gentoo.org> Date: Fri Apr 18 20:00:31 2008 +0100 lock flying_transfers during transfer removal commit 2569980762cb66804da31e54bef243702da8dfe9 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Apr 18 19:59:56 2008 +0100 pollfds mutex protection commit f5a33e08ec0da51ccb5e95a5adec50c5211a9bf5 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Apr 17 18:24:54 2008 +0100 flying_transfers mutex protection This marks the beginnings of thread safety commit 85e1994123545125ce0653415d122f9790f8d041 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Apr 17 17:44:28 2008 +0100 Linux: fix control transfer cancellation commit cf9b831f7bfd97ba88721c1d934aeda522f3692c Author: Daniel Drake <dsd@gentoo.org> Date: Mon Apr 14 20:03:27 2008 +0100 set correct endpoint type for isochronous transfers Pointed out by Felix Domke commit ad6e2b712c5b54af44424e58a2776686314e26b7 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Apr 11 21:40:07 2008 +0100 Linux: fire multiple URBs at once for split transfers This results in a significant performance increase for bulk transfers larger than 16kb, and fixes a bug where data would be spliced and mixed between two simultaneously submitted transfers to the same endpoint. It also allows isochronous transfers larger than 16kb to be submitted. This commit also improves cancellation - the library now understands what is going on. commit d9b2ce2894ed43d34de6850f2dac50ccabf1db55 Author: Daniel Drake <dsd@gentoo.org> Date: Tue Apr 1 23:28:32 2008 +0100 Constify some return data Make it clear that apps should not mess with these structures commit 8d809854e2b19c2b7c27ab05e5d76b34e2a5cead Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 30 22:19:00 2008 +0100 Rename libusb_poll() to libusb_handle_events() commit 211f80c9f2a4a58cd2bbf5b7751f45089c8961e7 Author: Daniel Drake <dsd@gentoo.org> Date: Tue Mar 25 16:24:30 2008 +0000 Isochronous endpoint I/O Due to variable-sized structures, this involved changing allocation mechanism. All transfers must now be allocated and freed through libusb. A synchronous function is missing, and I could do with writing a few more helper functions to simplify things. commit b1ade6fca668d8aa156d5b5bf3a933f116144dc2 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 23 21:17:32 2008 +0000 distcheck fix for docs commit 62077b7fa5b222e1bb9dea3467585aed69d596e2 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 23 21:13:14 2008 +0000 Support for changing altsetting Will probably be suject to later consideration w.r.t. claiming of endpoints commit 0499e9f418607b5786ac0c3e97bc46737a609ca3 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 20 21:10:01 2008 +0000 it's called bmRequestType commit 88884ae4bbe721dac117d5190303cb67852fa5d3 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 20 21:07:00 2008 +0000 Save transfer flags before invoking callback The callback may free the transfer, in which case we can't read the flags after it has returned. commit ead09cde6895df0034a685516987ce253575e9a7 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Mar 15 16:35:12 2008 +0000 API documentation Hopefully mostly complete. Some constants were renamed and move into enums. commit 285724cc14ea5f993e2c4c92fe0aaf6c335bc139 Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Sat Mar 15 13:50:53 2008 +0200 Fix get_device_list for realloc case get_device_list can modify pointer passed to it with realloc, but this case wasn't handled and caused crash on my machine. Fixed Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> commit c0c9432d38b22784070dce3a7874c62c31786a27 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 13 12:36:56 2008 +0000 Beginnings of cross-platform abstraction This also includes a libusb_get_pollfds API change commit de4c5341d168697baa4c0901c406deb47e78aae7 Author: Daniel Drake <dsd@gentoo.org> Date: Mon Mar 10 18:38:15 2008 +0000 Add transfer flags commit aae05f688dc26a013166ab9436fd25018b49d76a Author: Daniel Drake <dsd@gentoo.org> Date: Mon Mar 10 11:32:15 2008 +0000 Simplify libusb_fill_control_transfer() Transfer length can be inferred from the setup packet. commit 7c5ea95297c2f3f6afc42f60c1bf1bef777bb1fb Author: Daniel Drake <dsd@gentoo.org> Date: Mon Mar 10 11:29:24 2008 +0000 get_device fixup Rename API away from "devh" and fix implementation to match header commit 9e89d1aa82cbe7e21672ee3e2e545238fffc5318 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 9 16:27:06 2008 +0000 Rename descriptor-getting functions Based on feedback from Tim Roberts commit 283ae96c3ccbcee1c3950fce18ae47093ae8200e Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 9 16:15:02 2008 +0000 Simplify cancellation API No need to provide the device here. commit ebad1c79688ba603ad017ed0fe2f3c0dc8edd1ad Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 9 16:12:08 2008 +0000 Rename libusb_dev_handle to libusb_device_handle commit 1ac0a7d88f282b6f293c456fac8edb143cbaca3d Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 9 01:01:57 2008 +0000 Move synchronous I/O implementation to its own file commit 66348c90ea4570bf999ac301089e006d0cce1926 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Mar 9 00:58:09 2008 +0000 Separate transfer allocation and submission Leads to some hefty API changes. Now we're much more similar to the Linux kernel model. Problems with dealing with asynchronous control transfers are passed on to the user, basically you must allocate a buffer, start with the setup, and put the data after. This won't make much sense until documented (soon...) commit d21ebe47ce578c93cd8969be1c933d503e32e5d4 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Mar 8 12:48:35 2008 +0000 Rework URB API naming Now refer to everything as "transfers" as consistent with the USB spec libusb_transfer is now a kind of transfer handle. To reduce confusion with libusb_bulk_transfer and libusb_control_transfer, those have been renamed to libusb_{control,bulk}_transfer_request. commit fd6fb3cc093ad47271353a0e468d16547f991382 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Mar 8 11:53:33 2008 +0000 Add fallback on /proc/bus/usb /dev/bus/usb is a relatively new thing probably not present on every system commit f3fdf447916289cd92b7190377681894e8ab611a Author: Daniel Drake <dsd@gentoo.org> Date: Sat Mar 8 00:10:16 2008 +0000 Persistent libusb_device storage Devices are now assigned a session ID (currently busnum:devaddr) which is used to distinguish unique devices. Now multiple callers of libusb_get_device_list will get the same libusb_device structure instances. commit 23f8fb8bafeeda93ce234cb40eb7219d2e36c19c Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 6 23:43:57 2008 +0000 Add convenience function to find and open a device by USB VID+PID Lots of libusb apps I write are simple test apps not intended to be real apps. Having a function available to quickly locate my device will be handy in such situations. commit 9cfdb494fccac53a4277da7c8b6d15f1a72a4959 Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 6 23:25:20 2008 +0000 Rework device discovery API libusb_find_devices and libusb_get_devices are no more libusb_get_device_list obtains a list of libusb_device structures for all known devices in the system. Each libusb_device now has a reference count, defaulting to 1 on instantiation. The reference count of 1 refers to the fact that it is present in the list in this scenario. Opening a device adds a pointer to the libusb_device structure in the handle, so that also adds a reference. Closing the device removes that reference. The function to free the device list can optionally unref all the devices inside. In future we will make the libusb_device instances all "global" so that if the app calls get_device_list twice it actually gets the same libusb_device structure references back. This way we can start to track disconnects, and we can investigate adding a unique "session ID" to each libusb_device, an identifier guaranteed to be unique to that device until reboot. commit 77cea822788e024c848c7f554915f771a2dc1e0f Author: Daniel Drake <dsd@gentoo.org> Date: Thu Mar 6 17:05:04 2008 +0000 Remove ctrl debug code This was unintentionally committed commit b873521a6f575628d535f89278bb67888004d0ca Author: Daniel Drake <dsd@gentoo.org> Date: Tue Feb 26 22:11:34 2008 +0000 Notifications for changes to the fd set Applications can now be notified when they should start and stop polling new file descriptors. commit ca66e16a370c828d08a5bc3f9f203db145c81a4c Author: Daniel Drake <dsd@gentoo.org> Date: Fri Feb 1 12:20:20 2008 +0000 Fix header installation path commit e583100a4086c411093eef5c450880b965df6b1b Author: Daniel Drake <dsd@gentoo.org> Date: Wed Jan 30 13:24:54 2008 +0000 TODO update commit 637a8d7ff8a11a23588925d9d3003a609bda8075 Author: Daniel Drake <dsd@gentoo.org> Date: Wed Jan 30 13:19:10 2008 +0000 Remove timers and signalfd Instead of timers, add a mechanism for informing the parent app when the next timeout is due to happen, so that it can call us at that time. As we no longer use signals, signalfd has also been removed. commit 8c56abe2e13ed4dd8c15737c21be7b6b1e5cf2ac Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jan 26 18:16:56 2008 +0000 Poll usbfs descriptors directly We don't need to use signalfd for this functionality because we can poll the file descriptors for write events. commit e3ce855acec33d37dd833bca5dad5e8c3773003a Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jan 26 17:26:40 2008 +0000 Fix dpfp example compilation commit 1d41a5cda2fefe826877ee4445199af30aa188b7 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jan 26 17:22:53 2008 +0000 C++ header safety Pointed out by JF commit 37b7f9a112eb1441d352467f661205b8872d0553 Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jan 26 14:03:43 2008 +0000 Only use -fgnu89-inline when supported J F pointed out that this option only works on gcc 4.3 and newer. commit e3a09ca0b9cb6f46d54a0130f678c6097240a2bd Author: Daniel Drake <dsd@gentoo.org> Date: Sat Jan 5 21:59:40 2008 +0000 Remove more fpusb remnants commit dcd5e0075fa84601d997d29bb60bc8370b97a375 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 01:19:07 2008 +0000 TODO update Start listing the things I want to discuss/reconsider before 1.0 API is final. commit de53d972ed9c1f21f86ffd585560520e986f212c Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 01:17:06 2008 +0000 Rename some _devh_ functions Decided against naming functions in this style based on advice from Tim Roberts. Still not really sure about devh naming in general. commit 132d84bf8ae34bd0892b3d8207a53d87cc0a9cba Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 01:13:25 2008 +0000 Use "transfer" instead of "msg" Based on a discussion with Tim Roberts. commit ea6af58a8643137eb01eeb7d2f65404e390feb1b Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 00:57:00 2008 +0000 Plural of bus is busses SF #1633043 commit dbb3fd871e3972b4e670f3161e7cd2f58f357600 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 00:54:57 2008 +0000 API renaming: remove fpi and usb_ stuff fpi changed to usbi. We should not expose structures with prefix "usb_" in the public namespace as it is quite likely there will be some conflict somewhere. Instead, using "libusb_" should be safer. commit e9364d72151ae1de9cce4175f330fe1529f02511 Author: Daniel Drake <dsd@gentoo.org> Date: Fri Jan 4 00:40:49 2008 +0000 Rename to libusb-1.0 I've taken over the libusb project, and what was previously known as fpusb will eventually be released as libusb-1.0. commit f4ed0b6a3e0a20555fdfc9e9b8be7e8a2c8ae192 Author: Daniel Drake <dsd@gentoo.org> Date: Sun Dec 30 22:09:50 2007 +0000 Compiler flags update Also fix some warnings commit d3d671efe27491baf1d2ceadbfeeb4e7428d6f9a Author: Daniel Drake <dsd@gentoo.org> Date: Sun Dec 30 22:05:17 2007 +0000 Fix signalfd structure size on x86 ptr is a 64-bit value commit dfac6756faad76071a92945e3e3a16b8a841a7ea Author: Daniel Drake <dsd@gentoo.org> Date: Wed Dec 12 23:32:54 2007 +0000 Don't pass ctrl_msg/bulk_msg structures through async paths These are easiest to construct on the stack, but in the async case it is likely that the submitting function returns (hence stack is destroyed) before URB completion. commit a8d2881eb7c273892acf2ff6e1f3f552631d1d11 Author: Daniel Drake <dsd@gentoo.org> Date: Mon Dec 3 23:29:22 2007 +0000 Add functionality to access device descriptors commit b5a7a411087b37a6bf56b4688a9e3290daaed153 Author: Daniel Drake <dsd@gentoo.org> Date: Mon Dec 3 22:27:21 2007 +0000 Rename fpusb_device_handle functions to devh Prevents confusion with functions that work on fpusb_dev structures. commit eacf4505a473df0f521d1b69d5b45448f0709e2d Author: Daniel Drake <dsd@gentoo.org> Date: Sun Dec 2 23:16:57 2007 +0000 Add API to access poll fd Almost forgot... :) commit 852bba4754ec57679c823f33e8feba6e4a564cbe Author: Daniel Drake <dsd@gentoo.org> Date: Wed Nov 28 13:48:45 2007 +0000 Initial commit Basic library structure which supports enumerating detected USB devices |