usb: musb: da8xx: fix babble condition handling
authorBin Liu <b-liu@ti.com>
Tue, 5 Dec 2017 14:45:30 +0000 (08:45 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:38 +0000 (10:10 +0100)
commitbed6119aa21b28f096880342f9e2445f9ad47b25
treed0f5755bdc4d79c7af6ec65e88e8346dcfba7023
parentd094690cbed906ca96752cb94abed50fbf1cfaa3
usb: musb: da8xx: fix babble condition handling

commit bd3486ded7a0c313a6575343e6c2b21d14476645 upstream.

When babble condition happens, the musb controller might automatically
turns off VBUS. On DA8xx platform, the controller generates drvvbus
interrupt for turning off VBUS along with the babble interrupt.

In this case, we should handle the babble interrupt first and recover
from the babble condition.

This change ignores the drvvbus interrupt if babble interrupt is also
generated at the same time, so the babble recovery routine works
properly.

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/da8xx.c