aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb20.c
Commit message (Collapse)AuthorAgeFilesLines
* libusb: remove use of COMPAT_32BITBrooks Davis2021-12-171-6/+6
| | | | | | | | This codepath used uint64_t's in place of pointers in structs and arrays to allow 32-bit code to use 64-bit version of ioctls. Now that we support 32-bit compat natively this is no longer needed. Reviewed by: hselasky, jrtc27 (prior version)
* Improve handling of USB device re-open in the LibUSB v1.x API.Hans Petter Selasky2021-06-111-0/+5
| | | | | | | | | | Make sure the "device_is_gone" flag is cleared after every successful open, so that the "device_is_gone" flag doesn't persist forever. Found by: sergii.dmytruk@3mdeb.com PR: 256296 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
* Implement new libusb v2.0 API function, libusb20_dev_get_stats().Hans Petter Selasky2019-12-271-0/+26
| | | | | | | | | | This function is useful when debugging USB device issues. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=356136
* Fix for reading the configuration descriptor in libusb. Catch invalidHans Petter Selasky2019-06-081-0/+8
| | | | | | | | | | | | configuration descriptor reads early on to avoid issues with devices that don't check for a valid USB configuration read request. Submitted by: takahiro.kurosawa@gmail.com PR: 238412 MFC after: 3 days Notes: svn path=/head/; revision=348797
* Improve the userspace USB string reading function in LibUSB.Hans Petter Selasky2018-06-261-9/+12
| | | | | | | | | | | Some USB devices does not allow a partial descriptor readout. Found by: bz @ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=335669
* Allow the libusb20_dev_get_port_path() function to be called when theHans Petter Selasky2018-03-231-2/+20
| | | | | | | | | | | USB device is closed. This fixes a compatibility issue with upstream libusb. Found by: romain@ MFC after: 1 week Notes: svn path=/head/; revision=331419
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-261-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326219
* Fix array size issue when using the pre-scaling feature forHans Petter Selasky2016-09-021-2/+13
| | | | | | | | | | | ISOCHRONOUS USB transfers. Make sure enough length and buffer pointers are allocated when setting up the libusb transfer structure to support the maximum number of frames the kernel can handle. MFC after: 1 week Notes: svn path=/head/; revision=305284
* Add support for libusb_set_auto_detach_kernel_driver() to the LibUSB v1.0 API.Hans Petter Selasky2016-06-161-0/+6
| | | | | | | | | Approved by: re (kostikbel) Requested by: swills MFC after: 1 week Notes: svn path=/head/; revision=301966
* USB: replace 0 with NULL for pointers.Pedro F. Giffuni2016-04-091-2/+2
| | | | | | | | | Found with devel/coccinelle. Reviewed by: hselasky Notes: svn path=/head/; revision=297764
* Add some missing definitions to build a working FreeBSD's libusb under Linux.Hans Petter Selasky2013-07-141-16/+4
| | | | Notes: svn path=/head/; revision=253339
* Add new USB API to get the port path of a USB device.Hans Petter Selasky2013-05-031-0/+7
| | | | | | | | MFC after: 2 weeks Requested by: emaste @ Notes: svn path=/head/; revision=250201
* - Make the FreeBSD's USB library compile under Linux.Hans Petter Selasky2013-03-131-2/+6
| | | | | | | | | | - Fix a compile warning where the return value of a call to a write() function was ignored. - Remove redundant include files from userland USB header files. - Add some now needed include files to various C-files. Notes: svn path=/head/; revision=248236
* Add USB API to read power draw on USB devices.Hans Petter Selasky2013-02-141-0/+13
| | | | | | | | | | Update usbconfig to print power draw on USB devices. MFC after: 2 weeks Submitted by: Matt Burke @ icritical.com Notes: svn path=/head/; revision=246789
* Add support for streams to LibUSB v2.0.Hans Petter Selasky2012-08-131-1/+8
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=239239
* Fix some compile warnings.Hans Petter Selasky2012-04-201-3/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=234491
* Implement missing USB debug information functions.Hans Petter Selasky2011-09-191-0/+74
| | | | | | | | Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=225659
* - Add two missing functions to the LibUSB v0.1 API.Hans Petter Selasky2011-07-161-0/+2
| | | | | | | | | | | | - Clamp the string length to 255 bytes when getting the interface description. - Clamp data request length to 65535 bytes when doing control requests. MFC after: 3 days Notes: svn path=/head/; revision=224085
* - Add two new API's to libusb20 which can be used to retrive informationHans Petter Selasky2011-06-241-0/+12
| | | | | | | | | | | | | about the parent USB device: - libusb20_dev_get_parent_address - libusb20_dev_get_parent_port - Rename libusb20_compat01.c into libusb01.c MFC after: 3 days Notes: svn path=/head/; revision=223495
* - Add support for software pre-scaling of ISOCHRONOUS transfers.Hans Petter Selasky2011-02-281-4/+10
| | | | | | | | MFC after: 14 days Approved by: thompsa (mentor) Notes: svn path=/head/; revision=219100
* - Add support for LibUSB in 32-bit compatibility mode.Hans Petter Selasky2010-10-141-7/+7
| | | | | | | Approved by: thompsa (mentor) Notes: svn path=/head/; revision=213852
* Resort includes to match style(9) a bit more. No functional changeWojciech A. Koszek2010-02-131-3/+4
| | | | | | | | | | is expected after this commit. Tested by: make buildworld Reviewed by: hps (patch without .h changes) Notes: svn path=/head/; revision=203815
* Add a function to check if the usb devices is still connected.Andrew Thompson2010-01-291-0/+10
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=203147
* Reset variable fields in case the transfer is opened againAndrew Thompson2010-01-101-1/+12
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=202025
* Sync to P4Andrew Thompson2009-11-201-1/+90
| | | | | | | | | | | | - fix a transfer cancelling bug/segfault [1] - correct a return code in the transfer cancel function. - add new API function, libusb20_tr_bulk_intr_sync(). Submitted by: HPS Reported by: Robert Jenssen [1] Notes: svn path=/head/; revision=199575
* - fix refcounting error during data transferAndrew Thompson2009-11-081-3/+5
| | | | | | | | | | | | | | | | - fix a memory leak on the USB backend - fix invalid pointer computations (in one case memory outside the allocated area was written in LibUSB v1.0) - make sure memory is always initialised, also in failing cases - add missing functions from v1.0.4 PR: usb/140325 Reported by: Robert Jenssen Submitted by: Hans Petter Selasky MFC After: 3 days Notes: svn path=/head/; revision=199055
* Cleanup claim/release interface code, which is specific to libusb v0.1. RemoveAndrew Thompson2009-06-121-39/+5
| | | | | | | | | claim and release interface support from libusb v2.0, because it is not useful. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=194069
* Add libusb20_tr_get_length to get the transfer length.Andrew Thompson2009-06-021-0/+6
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=193313
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-1/+1
| | | | Notes: svn path=/head/; revision=192984
* libusb20 is now installed as libusb, remove the version number from theAndrew Thompson2009-03-091-0/+1141
directory name. Notes: svn path=/head/; revision=189587