]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 4 Sep 2020 19:29:03 +0000 (16:29 -0300)
commitccf31702b14955a2ad838aff4a3b68206290ad4e
treeda74788cf08270487f9ded8190b9a98ec3ff7022
parent8d743aa3d53724c9563cfb1a605b0497f6ac47ee
bdc: Fix bug causing crash after multiple disconnects

BugLink: https://bugs.launchpad.net/bugs/1892417
[ Upstream commit a95bdfd22076497288868c028619bc5995f5cc7f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/usb/gadget/udc/bdc/bdc_core.c
drivers/usb/gadget/udc/bdc/bdc_ep.c