]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve handling of alternate settings in the USB stack.
authorhselasky <hselasky@FreeBSD.org>
Tue, 15 Dec 2020 12:05:07 +0000 (12:05 +0000)
committerhselasky <hselasky@FreeBSD.org>
Tue, 15 Dec 2020 12:05:07 +0000 (12:05 +0000)
commit600f140311b82fe184e8345d799542025721a372
tree1f5c014aeb2abb8fcb9e40518cbfe85b257e92fd
parent72933cc12f5a75913bae7aff528251fc5a5cd5ab
Improve handling of alternate settings in the USB stack.

Allow setting the alternate interface number to fail when there is only
one alternate setting present, to comply with the USB specification.

Refactor how iface->num_altsetting is computed.

Bump the __FreeBSD_version due to change of core USB structure.

PR: 251856
MFC after: 1 week
Submitted by: Ma, Horse <Shichun.Ma@dell.com>
Sponsored by: Mellanox Technologies // NVIDIA Networking
sys/compat/linuxkpi/common/src/linux_usb.c
sys/dev/usb/usb_device.c
sys/dev/usb/usb_request.c
sys/dev/usb/usbdi.h
sys/sys/param.h