libusbx deprecated libusb_get_port_path and replaced it with
libusb_get_port_numbers. The latter omits an extra parameter which was
unused in the FreeBSD implementation anyway.
- 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.
- Use CLOCK_MONOTONIC instead of CLOCK_REALTIME, because CLOCK_MONOTONIC
does not wrap into negative in near future. This fixes any potential
problems using "pthread_cond_timedwait()".
- Fix a bug where the "libusb_wait_for_event()" function computes an
absolute timeout instead of a relative timeout. USB transfers do
not depend on this timeout value.
- Add dependency towards LibPthread to Makefile, because LibUSB v1.0
needs this library to function correctly.
MFC after: 1 week
This is useful for GNU/kFreeBSD and the libusb2debian port.
Applications using the asynchronous API of LibUSB 1.0 needs
to be recompiled after this update.
Found by: lme @
Some header file parts of this patch were taken from a patch submitted
by Maya Erez <merez@codeaurora.org> to the LibUSB developers list.
MFC after: 1 week
libusb_dev_kernel_driver_active() works. In case of
libusb20 the manpage was wrong and in case of
libusb10 the implementation was wrong.
Submitted by: Kai Wang
MFC after: 3 days
- 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
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
1) We need to allow the USB callback to free the USB transfer itself.
2) The USB transfer buffer should only be automatically freed when
freeing the USB transfer.
Fixed by: hselasky
Submitted by: Gustau Perez i Querol
Approved by: thompsa (mentor)
* libusb_strerror()
* libusb_get_driver[_np]()
* libusb_detach_kernel_driver[_np]()
- Factor out setting of non-blocking flag inside libusb.
- Add missing NULL check after libusb_get_device() call.
- Correct some wrong error codes due to copy and paste error.
PR: usb/150546
Submitted by: Robert Jenssen, Alexander Leidinger
Approved by: thompsa (mentor)
This makes libusb porting a bit easier.
There shouldn't by any negative change in behaviour after this commit.
Remove redundant headers.
Reviewed by: hps@
however, are possitive and seem to be reverse sorted in the list.
Conform device numbering and bring a result that is consistent with the
libusb 0.1 API. It is now possible to distinguish a device based on its
(bus, dev) numbers.
There shouldn't be any negative change in behavior after this commit.
Tested with: scanimage (sane)
http://freebsd.czest.pl/~wkoszek/qemu/l.c
Reviewed by: hps@
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
- 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]
- 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
preparation for 8.0-RELEASE. Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.
Reviewed by: kib
Approved by: re (rwatson)
- Fix possible uninitialised variables and null derefs
- Support big transfers
- Various bug fixes and style changes
Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Approved by: re (kib)
Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O. Many applications have already started using
the interfaces.
This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0
Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by: Hans Petter Selasky
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O. Many applications have already started using
the interfaces.
This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0
Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by: Hans Petter Selasky
K&R -> ANSI
Bugfix: 'Keep the bit position even when the report descriptor says POP.'
Add hid_use_report_desc, hid_parse_usage_page, hid_parse_usage_in_page.
Changed iface for hid_report_size.