stm class: Use driver's packet callback return value
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Mon, 15 Feb 2016 17:12:01 +0000 (19:12 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 1 Jun 2016 21:28:43 +0000 (15:28 -0600)
commita22a7d13aa3875912aa74cc0ba1624fa5fb9990f
treebe37d043e324be57afff3f9bab5f94b15b7a007a
parent1caf1d3016fcf51a9cb67ac0b750ac90cbc32bbe
stm class: Use driver's packet callback return value

STM drivers provide a callback to generate/send individual STP packets;
it also tells the stm core how many bytes of payload it has consumed.
However, we would also need to use the negative space of this return
value to communicate errors that occur during the packet generation,
in which case the stm core will have to take appropriate action.

For now, we need to account for the possibility that the stm driver may
not support certain combinations of packet type/flags, in which case
it is expected to signal an error.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f8560a9bc76b2cd5c06fa412cb7b5481d70fcf34)
drivers/hwtracing/stm/core.c
include/linux/stm.h