usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
authorVijayavardhan Vennapusa <vvreddy@codeaurora.org>
Wed, 13 Apr 2022 21:10:38 +0000 (16:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:29 +0000 (09:14 +0200)
commit9f051e510cd2a8192c91743d4a2f57227ee86246
tree4c67b15d0488073156c2ed1e59b4d49027315d35
parentf9b2660d9c10ddab94ff84aea1000a737bacd19f
usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()

commit bf95c4d4630c7a2c16e7b424fdea5177d9ce0864 upstream.

If any function like UVC is deactivating gadget as part of composition
switch which results in not calling pullup enablement, it is not getting
enabled after switch to new composition due to this deactivation flag
not cleared. This results in USB enumeration not happening after switch
to new USB composition. Hence clear deactivation flag inside gadget
structure in configfs_composite_unbind() before switch to new USB
composition.

Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Dan Vacura <w36195@motorola.com>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20220413211038.72797-1-w36195@motorola.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c