]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 28 Sep 2017 10:18:53 +0000 (11:18 +0100)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 14 Nov 2017 14:51:32 +0000 (20:21 +0530)
commit0096240398f325870ce3a143d2b1cef8512ecdef
treea281c7bb1f342188981b3e5e590cb0f5880cf47f
parent5c448b9a272048297850264baf6a15f7e26f09b4
mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready

Currently we rely on the first byte of the Rx buffer to check if there's
any data available to be read. If the first byte of the received buffer
is zero (i.e. null character), then we fail to signal that data is
available even when it's available.

Instead introduce a boolean variable to track the data availability and
update it in the channel receive callback as ready and clear it when the
data is read.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox-test.c