Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Thompson
4b56fe67b6 MFC r199575
- 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]
2009-12-09 21:34:38 +00:00
Andrew Thompson
1110a4604f MFC r199055
- fix refcounting error during data transfer
 - 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
2009-11-11 01:27:58 +00:00
Andrew Thompson
de411f4cd2 MFC r198376
Prevent wraparound of the timeout variable.

Submitted by:	HPS
Approved by:	re (kib)
2009-10-23 12:02:01 +00:00
Alfred Perlstein
390065b18e LibUSB v1.0:
- Significantly improve libusb10 support.
        - Many minor issues fixed.
        - P4 ID: 166189, 165853, 165991, 166052, 166069

Submitted by:	hps
Approved by:	re
2009-07-30 00:11:41 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
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)
2009-07-19 17:25:24 +00:00
Andrew Thompson
c500e4dd03 Sync the libusb 1.0 exported api to the latest GSoC code.
- 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)
2009-07-10 14:15:53 +00:00
Andrew Thompson
ed6d949afd - Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just   usb.h and usbdi.h
2009-06-23 02:19:59 +00:00
Andrew Thompson
8c8fff3177 Add files missed in r194674.
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
2009-06-23 01:04:58 +00:00
Andrew Thompson
a5118bdfe9 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
2009-06-23 01:00:26 +00:00
Andrew Thompson
4315b3c95d Cleanup claim/release interface code, which is specific to libusb v0.1. Remove
claim and release interface support from libusb v2.0, because it is not useful.

Submitted by:	Hans Petter Selasky
2009-06-12 16:07:06 +00:00
Andrew Thompson
545b01ad3a Add libusb20_tr_get_length to get the transfer length.
Submitted by:	Hans Petter Selasky
2009-06-02 17:27:51 +00:00
Andrew Thompson
760bc48e7e s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
Andrew Thompson
c54c1f7c08 Fix libusb20_dev_get_device_desc and defunt xref.
Submitted by:	Hans Petter Selasky
2009-05-21 17:16:35 +00:00
Andrew Thompson
dc8f21bc49 MFp4 //depot/projects/usb@159934
Update libusb function descriptions.

Submitted by:	Chuck Robey
2009-04-05 18:30:24 +00:00
Xin LI
38d3e5fecf Add prototypes for libusb20_be_[gs]et_template. 2009-03-17 21:20:39 +00:00
Andrew Thompson
4eaae44dbf Update libusb.3 name and add mlinks for usb.3 and libusb20.3 2009-03-10 15:49:43 +00:00
Andrew Thompson
0b6e7271f0 Be compatible with LibUSB from sourceforge and close the handle after reset
Submitted by:	Hans Petter Selasky
2009-03-10 14:29:34 +00:00
Andrew Thompson
df4b8c2a2d libusb20 is now installed as libusb, remove the version number from the
directory name.
2009-03-09 17:09:46 +00:00
Josef Karthauser
a6402160b1 Follow NetBSD and rename libusb to libusbhid.
MFC after:	7 days
2002-03-27 16:07:20 +00:00
David E. O'Brien
69160b1eb7 Remove __P() usage. 2002-03-21 23:54:04 +00:00
Alfred Perlstein
5bcd0580d7 Prefix structure members to protect them against clashes with eg.
c++ keywords.

This keeps us in sync with NetBSD because they actually committed
my delta first.

Ok'd by: lennard
2002-02-20 20:47:21 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Matthew Dillon
209040d8b0 Add __FBSDID()s to libusb 2001-09-30 22:30:55 +00:00
Ruslan Ermilov
265c01df49 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Bruce Evans
1a7d8d0695 Fixed prototypes. About half of them were wrong (mainly due to const
poisoning having not reached here).
2001-02-06 01:02:59 +00:00
Bruce Evans
ea81d4327f Added used include of <sys/cdefs.h>.
Declare all the interfaces documented in usb.3 (2 were missing).
2001-02-06 00:54:00 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Ben Smithurst
cb17760de7 Remove fullstops from the end of .Xr lines in SEE ALSO section. 2000-11-15 14:40:14 +00:00
Nick Hibma
b425e31947 Sync with NetBSD:
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.
2000-10-16 18:13:59 +00:00
Nick Hibma
25d1d43d78 Sync with NetBSD:
Print unknown usages with 4 digits.
Mask in page extraction.
2000-08-26 13:53:27 +00:00
Nick Hibma
96102cae1a Remove DIAGASSERT 2000-07-07 08:15:19 +00:00
Nick Hibma
9e2046dfec The USB library from NetBSD by Lennart Augustsson <lennart@augustsson.net>. 2000-06-11 18:19:14 +00:00