From: Tomas Tvaroha Date: Fri, 19 Aug 2016 09:21:52 +0000 (+0200) Subject: sllin: add single-response flag X-Git-Url: http://rtime.felk.cvut.cz/gitweb/linux-lin.git/commitdiff_plain/45653655d66c6631a7993781ae87d521cbff9e56 sllin: add single-response flag --- diff --git a/sllin/linux/lin_bus.h b/sllin/linux/lin_bus.h index dbd9a78..151d18f 100644 --- a/sllin/linux/lin_bus.h +++ b/sllin/linux/lin_bus.h @@ -11,6 +11,7 @@ #define LIN_CACHE_RESPONSE (1 << (LIN_CANFR_FLAGS_OFFS)) #define LIN_CHECKSUM_EXTENDED (1 << (LIN_CANFR_FLAGS_OFFS + 1)) +#define LIN_SINGLE_RESPONSE (1 << (LIN_CANFR_FLAGS_OFFS + 2)) /* Error flags */ diff --git a/sllin/sllin.c b/sllin/sllin.c index 908cce9..1febab2 100644 --- a/sllin/sllin.c +++ b/sllin/sllin.c @@ -1106,6 +1106,9 @@ static int sllin_kwthread(void *ptr) if ((sce->frame_fl & LIN_CACHE_RESPONSE) && (sce->dlc > 0)) { + if (sce->frame_fl & LIN_SINGLE_RESPONSE) + sce->frame_fl &= ~LIN_CACHE_RESPONSE; + netdev_dbg(sl->dev, "Sending LIN response from linfr_cache\n"); lin_data = sce->data; @@ -1256,6 +1259,9 @@ slstate_response_wait: if ((sce->frame_fl & LIN_CACHE_RESPONSE) && (sce->dlc > 0)) { + if (sce->frame_fl & LIN_SINGLE_RESPONSE) + sce->frame_fl &= ~LIN_CACHE_RESPONSE; + netdev_dbg(sl->dev, "Sending LIN response from linfr_cache\n"); lin_data = sce->data;