android_kernel_oneplus_msm8998/drivers/mailbox
Sudeep Holla 21ab579fba mailbox: skip complete wait event if timer expired
commit cc6eeaa3029a6dbcb4ad41b1f92876483bd88965 upstream.

If a wait_for_completion_timeout() call returns due to a timeout,
complete() can get called after returning from the wait which is
incorrect and can cause subsequent transmissions on a channel to fail.
Since the wait_for_completion_timeout() sees the completion variable
is non-zero caused by the erroneous/spurious complete() call, and
it immediately returns without waiting for the time as expected by the
client.

This patch fixes the issue by skipping complete() call for the timer
expiry.

Fixes: 2b6d83e2b8 ("mailbox: Introduce framework for mailbox")
Reported-by: Alexey Klimov <alexey.klimov@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-06 19:19:41 -07:00
..
arm_mhu.c Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-09-05 18:11:04 -07:00
bcm2835-mailbox.c mailbox: Drop owner assignment from platform_driver 2015-08-05 17:20:53 +05:30
Kconfig mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
mailbox-altera.c
mailbox-sti.c mailbox: Fix a couple of trivial static checker issues 2015-10-17 10:36:56 +05:30
mailbox-test.c mailbox: mailbox-test: avoid reading iomem twice 2015-11-04 14:03:04 +05:30
mailbox.c mailbox: skip complete wait event if timer expired 2017-08-06 19:19:41 -07:00
mailbox.h
Makefile mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
omap-mailbox.c mailbox/omap: Add ti,mbox-send-noirq quirk to fix AM33xx CPU Idle 2015-10-23 11:19:27 +05:30
pcc.c PCC: fix dereference of ERR_PTR 2015-10-16 10:46:07 +05:30
pl320-ipc.c