]> git.baikalelectronics.ru Git - kernel.git/commit
bdc: Fix bug causing crash after multiple disconnects
authorSasi Kumar <sasi.kumar@broadcom.com>
Wed, 22 Jul 2020 17:07:42 +0000 (13:07 -0400)
committerFelipe Balbi <balbi@kernel.org>
Fri, 24 Jul 2020 13:45:14 +0000 (16:45 +0300)
commitb98cfc99737255bda10cf51438b527baada87a68
treebc47bd6e94098848c39ff755273d7d18d93b4ab4
parentfaf03d470399b629537bec676ff16833140fcf5b
bdc: Fix bug causing crash after multiple disconnects

Multiple connects/disconnects can cause a crash on the second
disconnect. The driver had a problem where it would try to send
endpoint commands after it was disconnected which is not allowed
by the hardware. The fix is to only allow the endpoint commands
when the endpoint is connected. This will also fix issues that
showed up when using configfs to create gadgets.

Signed-off-by: Sasi Kumar <sasi.kumar@broadcom.com>
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/bdc/bdc_core.c
drivers/usb/gadget/udc/bdc/bdc_ep.c