Hans Petter Selasky
4177236d20
MFC r305284:
...
Fix array size issue when using the pre-scaling feature for
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.
2016-09-09 06:27:25 +00:00
Hans Petter Selasky
86d8f82e99
MFC r301956, r301957, r301964, r301966, r301968, r301969, r302080,
...
r302125 and r302171:
Added multiple new LibUSB v1.0 API functions.
Refer to the individual commits for more details.
2016-06-29 10:58:36 +00:00
Hans Petter Selasky
a8c3c81fdc
MFC r301842:
...
Implement code to stop all USB endpoints before executing a USB device
reset command, alternate setting command or set configuration
command. Else LibUSB v1.0 will not re-open the endpoints which the
kernel closes and the USB application might wait infinitely for
transfers to complete.
2016-06-29 10:43:31 +00:00
Bryan Drewery
bf8746a675
MFC r273756,r287980:
...
r273756:
only install .pc files when we are not installing 32bit compat libs...
r287980:
Replace beforeinstall: handling with FILES.
2015-10-03 16:21:53 +00:00
Pedro F. Giffuni
f5b6167b6d
MFC r285720:
...
libusb: Fix minor warning.
Fix a warning triggered by the gcc + FORTIFY_SOURCE patches:
In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141:
warning: passing argument 1 of 'memcpy' discards qualifiers from pointer
target type
Submitted by: hselansky
2015-08-05 18:52:40 +00:00
Hans Petter Selasky
6ce3819dfe
MFC r277245:
...
Add more USB request definitions. The values are described in section
9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification"
2015-01-28 19:49:53 +00:00
Hans Petter Selasky
568d8c6c0e
MFC r270133:
...
Add more USB class codes.
2014-08-27 14:17:15 +00:00
Hans Petter Selasky
fae542a6e4
MFC r263191:
...
Add libusb_log_level enum.
2014-06-13 07:33:43 +00:00
Hans Petter Selasky
096e3f1371
MFC r266664:
...
Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API
from sourceforge.
PR: usb/190204
2014-06-04 10:40:43 +00:00
Hans Petter Selasky
1c035c3590
MFC r264344:
...
Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0
APIs to increase the maximum bandwidth limit.
2014-04-18 07:50:25 +00:00
Hans Petter Selasky
8afaf3ad9c
MFC r260315:
...
Implement two new libusb API functions.
PR: usb/185454
2014-02-04 10:18:29 +00:00
Hans Petter Selasky
09ce2dedde
MFC r261224:
...
Comply to the official LibUSB v1.0 API:
"It is legal to attempt to claim an already-claimed interface."
2014-02-04 08:59:42 +00:00
Hans Petter Selasky
5122043efe
Correct two comments.
2013-09-05 12:21:11 +00:00
Rui Paulo
041d3f3f09
Add pkgconf files for libusb.
...
Reviewed by: hselasky
2013-07-25 03:54:08 +00:00
Hans Petter Selasky
99cd1f32af
Add some missing definitions to build a working FreeBSD's libusb under Linux.
2013-07-14 10:22:00 +00:00
Ed Maste
a9205626a7
Add libusb_get_port_numbers
...
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.
2013-06-07 13:45:58 +00:00
Joel Dahl
2710751bc3
mdoc sweep.
2013-05-12 22:22:12 +00:00
Ed Maste
5906bf4984
Add libusb_get_port_path wrapper
...
This follows the libusbx API reference at
http://libusbx.sourceforge.net/api-1.0/group__dev.html
Reviewed by: hselasky@
2013-05-08 00:55:29 +00:00
Ed Maste
22a962c9fe
Constify libusb_get_pollfds return
...
The correct return type, per our libusb(3) man page and the libusb.org
and libusbx projects (whose interface we intend to follow for our libusb),
is const struct libusb_pollfd **.
Unfortunately the doxygen-generated libusbx API documentation[1] omits[2]
the const for some reason.
[1] http://libusbx.sourceforge.net/api-1.0/group__poll.html#gab1a72869a926552b27a6c667695df3a2
[2] http://sourceforge.net/mailarchive/forum.php?thread_name=497D10BE.8090007%40n-dimensional.de&forum_name=libusb-devel
Reviewed by: hselasky@
2013-05-07 20:35:47 +00:00
Hans Petter Selasky
c77a24c24a
Add new USB API to get the port path of a USB device.
...
MFC after: 2 weeks
Requested by: emaste @
2013-05-03 07:44:58 +00:00
Hans Petter Selasky
6619413096
- Make the FreeBSD's USB library compile under Linux.
...
- 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.
2013-03-13 12:23:14 +00:00
Hans Petter Selasky
aafcb73207
Add USB API to read power draw on USB devices.
...
Update usbconfig to print power draw on USB devices.
MFC after: 2 weeks
Submitted by: Matt Burke @ icritical.com
2013-02-14 12:22:40 +00:00
Hans Petter Selasky
07b6ce3ba9
Add support for streams to LibUSB v2.0.
...
MFC after: 2 weeks
2012-08-13 18:10:52 +00:00
Hans Petter Selasky
f7287225df
LibUSB v1.0 API compiliance and bugfixes.
...
- 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
2012-06-12 07:28:25 +00:00
Joel Dahl
9ee2158b55
mdoc: minor Bl improvements.
2012-06-02 08:47:26 +00:00
Glen Barber
a3fb6da9ba
General mdoc(7) and typo fixes.
...
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
2012-05-11 20:06:46 +00:00
Hans Petter Selasky
78ed0e49ff
Add missing LibUSB 1.0 API function: libusb_get_string_descriptor().
...
Reported by: Xiaofan Chen
2012-05-07 14:07:13 +00:00
Hans Petter Selasky
cb0df9e86e
Fix typo.
2012-04-25 21:59:56 +00:00
Hans Petter Selasky
93fab61dfa
Bump the libusb major version due to the last commit, which
...
changes the libusb 1.0 API. While at it, correct a manual
page symlink.
Suggested by: kib @
2012-04-25 21:50:20 +00:00
Hans Petter Selasky
85ff9a0313
Fix binary compatibility to the official LibUSB 1.0.
...
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 @
2012-04-25 17:54:26 +00:00
Hans Petter Selasky
d81535d1f9
Fix some compile warnings.
...
MFC after: 1 week
2012-04-20 14:29:45 +00:00
Hans Petter Selasky
748205a370
Add missing LibUSB 1.0 API function.
...
Reported by: lme @
MFC after: 1 week
2012-04-12 18:06:30 +00:00
Joel Dahl
1844d4fe2d
Remove superfluous paragraph macro.
2012-03-29 16:07:22 +00:00
Eitan Adler
50d675f7a9
Remove trailing whitespace per mdoc lint warning
...
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
d284271a53
Minor mdoc fixes.
2012-03-24 15:17:18 +00:00
Glen Barber
3102cfe2e2
Fix various typos in manual pages.
...
Submitted by: amdmi3
PR: 165431
MFC after: 1 week
2012-02-25 14:31:25 +00:00
Hans Petter Selasky
3f709d07c5
Simplify libusb_open_device_with_vid_pid(): Only set
...
pdev to non-NULL on success instead of unconditonally
setting it and maybe resetting it later.
Submitted by: Christoph Mallon
MFC after: 3 days
2011-12-03 16:30:47 +00:00
Hans Petter Selasky
dc93480306
libusb_open() sets the given device handle to NULL if it
...
fails, so there is no need to do it again after returning.
Submitted by: Christoph Mallon
MFC after: 3 days
2011-12-03 16:19:07 +00:00
Hans Petter Selasky
4c0392e6fd
Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
...
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
2011-11-09 19:03:26 +00:00
Hans Petter Selasky
4d2472aa7b
Fix how libusb20_dev_kernel_driver_active() and
...
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
2011-10-10 16:13:33 +00:00
Hans Petter Selasky
c61f25617c
Implement missing USB debug information functions.
...
Approved by: re (kib)
MFC after: 1 week
2011-09-19 08:52:06 +00:00
Hans Petter Selasky
11867070c6
Spelling corrections for LibUSB manual page (2/2).
...
MFC after: 1 week
Approved by: re (kib)
PR: docs/159898
2011-08-22 21:10:50 +00:00
Hans Petter Selasky
c8c1f2ec4d
Whitespace corrections for LibUSB manual page (1/2).
...
MFC after: 1 week
Approved by: re (kib)
PR: docs/159898
2011-08-22 21:05:39 +00:00
Hans Petter Selasky
33ec9f0cb0
Use correct enum instead of constant value.
...
MFC after: 1 week
Spotted by: scf @
Approved by: re (kib)
2011-08-20 14:04:16 +00:00
Hans Petter Selasky
ca96e26a71
Update LibUSB v1.0 manual page:
...
- fix some minor spelling
- fix some style
- add description of new function
MFC after: 1 week
Approved by: re (kib)
2011-08-16 21:04:04 +00:00
Hans Petter Selasky
9a46d4678d
Add missing function to get device speed to the LibUSB v1.0 API.
...
MFC after: 1 week
Approved by: re (kib)
2011-08-16 08:34:16 +00:00
Hans Petter Selasky
4eb5923d1a
- Add two missing functions to the LibUSB v0.1 API.
...
- 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
2011-07-16 08:29:12 +00:00
Hans Petter Selasky
a7e048a23f
LibUSB v1.0: Need at least one frame when doing the dummy open
...
else clear stall won't work in that case.
2011-06-28 14:07:28 +00:00
Hans Petter Selasky
2485d8a793
- Add two new API's to libusb20 which can be used to retrive information
...
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
2011-06-24 11:14:09 +00:00
Hans Petter Selasky
892f48069d
- Add missing MLINKS for libusb and some manpage fixes.
...
MFC after: 14 days
Approved by: thompsa (mentor)
2011-02-28 18:53:06 +00:00