USB: cdc-acm: handle broken union descriptors
commitc9d1acc7a40deab93ae47ad493bbd8011ed11c70
authorJohan Hovold <johan@kernel.org>
Mon, 21 Sep 2020 13:59:49 +0000 (21 15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:05:44 +0000 (29 09:05 +0100)
treed26119a4f661dfeddccaea1a856f860bda92a9d8
parentfcfd1db12ceae563cfe0c58342ad27da5c9a589b
USB: cdc-acm: handle broken union descriptors

[ Upstream commit 960c7339de27c6d6fec13b54880501c3576bb08d ]

Handle broken union functional descriptors where the master-interface
doesn't exist or where its class is of neither Communication or Data
type (as required by the specification) by falling back to
"combined-interface" probing.

Note that this still allows for handling union descriptors with switched
interfaces.

This specifically makes the Whistler radio scanners TRX series devices
work with the driver without adding further quirks to the device-id
table.

Reported-by: Daniel Caujolle-Bert <f1rmb.daniel@gmail.com>
Tested-by: Daniel Caujolle-Bert <f1rmb.daniel@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200921135951.24045-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/class/cdc-acm.c