summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2017-11-03 12:24:59 -0700
committerJack Pham <jackp@codeaurora.org>2018-01-17 17:56:22 -0800
commit9f8d148622e4046522eded18f75f6ab363899f97 (patch)
tree3c4f4a1be317a9b31173a8b0ff4b71219ae84382 /lib/mpi/mpi-bit.c
parentf83e315016ed98567696797b7cb2168a61950a32 (diff)
usb: pd: ensure source hard reset is handled timely
When in source mode if a hard reset is received just before or while usbpd_sm() is in the middle of trying to send an outgoing message, the signal handling would get delayed due waiting for the PD PHY to complete retrying and failing both the message as well as the subsequent Soft_Reset message. Instead, treat the incoming hard reset with priority try to bail out of further attempts to send a message so that we can immeidately re-queue and process the hard reset on the next usbpd_sm() invocation. In case the TX attempt still manages to win the race, this will cause delay that affects our tPSHardReset (25-35ms) required time resulting in VBUS getting turned off too late. Handle this by keeping track of when the hard reset signal arrived so that we can schedule SRC_TRANSITION_TO_DEFAULT within this window. Also promote the error message when a hard reset is received from KERN_DEBUG to KERN_ERR, as this is abnormal enough to deserve printing to the kernel log with higher priority. Change-Id: Ie503f7b776022067ec3a4788d5229ec508b9c55f Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions