]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc: atmel: Fix vbus disconnect handling
authorCristian Birsan <cristian.birsan@microchip.com>
Fri, 10 Apr 2020 12:14:52 +0000 (15:14 +0300)
committerFelipe Balbi <balbi@kernel.org>
Fri, 17 Apr 2020 08:55:29 +0000 (11:55 +0300)
commit83da145f59292686a6c3e057d83a13136251f887
treecfca70a2335b15ce24b49d977d20364cd7e89a21
parentf56a605e368b12545b3d5c5c700b4ebbf200a0e7
usb: gadget: udc: atmel: Fix vbus disconnect handling

A DMA transfer can be in progress while vbus is lost due to a cable
disconnect. For endpoints that use DMA, this condition can lead to
peripheral hang. The patch ensures that endpoints are disabled before
the clocks are stopped to prevent this issue.

Fixes: 43d0c9db3111 ("usb: gadget: atmel_usba_udc: condition clocks to vbus state")
Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/atmel_usba_udc.c