linux_usbfs: Add support for kernels that can reap after disconnect
authorChris Dickens <christopher.a.dickens@gmail.com>
Fri, 18 Sep 2015 05:27:22 +0000 (22:27 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sun, 20 Sep 2015 21:52:49 +0000 (14:52 -0700)
commite9a52c03ae3fecb51b882a807c427f4b4dfa2d1e
treed8daf2f08166e8265939ecbdba0f2d1891c90560
parent3dbf0a9c5e772ffc8bbab499bcc0a81f5ccd96e3
linux_usbfs: Add support for kernels that can reap after disconnect

For kernels that support the REAP_AFTER_DISCONNECT capability, it is
no longer necessary to use the nasty workaround that is the
usbi_handle_disconnect() function. All transfers can be properly
reaped as one would expect and will have an appropriate URB status.

Note that moving usbi_handle_disconnect() after the hotplug section
is fine because the hotplug disconnect message simply gets added to
the hotplug_msgs list to be processed the next time handle_events()
is called.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/linux_usbfs.c
libusb/os/linux_usbfs.h
libusb/version_nano.h