usb: misc: ehset: Workaround for "special" hubs
authorRazvan Heghedus <heghedus.razvan@gmail.com>
Wed, 15 Sep 2021 12:16:13 +0000 (15:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 10:39:46 +0000 (12:39 +0200)
commitce3e90d5a0cdbcb2ddebbf9e4363e59fa779ad3a
tree01622631c73ca66205b1c74166f35f2e70dfabfe
parentae9a6149884e04b3460bd9d7ffe29c5ec8d223d8
usb: misc: ehset: Workaround for "special" hubs

The USB2.0 spec chapter 11.24.2.13 says that the USB port which is going
under test needs to be put in suspend state before sending the test
command. Many hubs, don't enforce this precondition and they work fine
without this step. But there are some "special" hubs, which requires to
disable the port power before sending the test command.

Because the USB spec mention that the port should be suspended, also
do this step before sending the test command. This could rise the
problem with other hubs which are not compliant with the spec and the
test command will not work if the port is suspend. If such hubs are
found, a similar workaround like the disable part could be implemented
to skip the suspend port command.

Signed-off-by: Razvan Heghedus <heghedus.razvan@gmail.com>
Link: https://lore.kernel.org/r/20210915121615.3790-1-heghedus.razvan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/ehset.c