POSIX: Move setting of pipes to non-blocking into usbi_pipe

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hotplug: Make use of HAVE_SYS_TYPES_H define

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Windows: Add new symbol for libusb_get_port_numbers to def file

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
WinCE: Add hotplug.c to projects

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
all: The next release will be 1.2.0 not 1.0.16

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
descriptor.c: AlternateSettings are related by InterfaceNumber

A block of AlternateSettings for a certain InterfaceNumber does not necessarily
start with AlternateSetting 0, so check Interface Descriptors belong to
each other by using InterfaceNumber, as specified in the spec.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
linux: Add a linux_netlink_read_message helper function

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
linux: rework hotplug lock handling

I could not find if libudev is completely threadsafe anywhere, so rework
the lock handling to serialize all libudev accesses. This is a preparation
patch for adding hotplug_poll support, see the next patch in this series.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
hotplug: Add a hotplug_poll backend function

Apps which were written before hotplug support, may listen for hotplug events
on their own and call libusb_get_device_list on device addition.

In this case libusb_get_device_list will likely return a list without the new
device in there, as the hotplug event thread will still be busy enumerating
the device, which may take a while, or may not even have seen the event yet.

To avoid this add a new hotplug_poll backend function and make
libusb_get_device_list call a this before copying ctx->usb_devs to the user.

In this function the backend should ensure any pending hotplug events are
fully processed before returning.

This patch implements hotplug_poll for linux, it should probably be also
implemented for darwin.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add superspeed endpoint companion descriptor support

Based on earlier work done on this by Maya Erez <merez@codeaurora.org>,
Nathan Hjelm <hjelmn@me.com> and Pete Batard <pete@akeo.ie>.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add BOS descriptor support

Based on earlier work done on this by Maya Erez <merez@codeaurora.org>,
Nathan Hjelm <hjelmn@me.com> and Pete Batard <pete@akeo.ie>.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
examples: Add sam3u_benchmark isochronous example by Harald Welte

Copied with the author's permission under LGPL-2.1 from
usb-benchmark-project/host/benchmark.c in
git://git.gnumonks.org/sam3u-tests.git commit
74959f7ee88f1597286cd435f312a8ff52c56b7e

http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=sam3u-tests.git;a=blob;f=usb-benchmark-project/host/benchmark.c;h=74959f7ee88f1597286cd435f312a8ff52c56b7e

An Atmel SAM3U test firmware is also available in the above repository.

Conflicts:
	.gitignore

Signed-off-by: Hans de Goede <hdegoede@redhat.com>