From 193f8ec5c681bd6da539926928a1ce97c9978ed1 Mon Sep 17 00:00:00 2001 From: Balachandra C S Date: Thu, 26 Apr 2018 18:10:44 +0530 Subject: [PATCH] drivers: net: can: ignore the data if command byte is 0xFF Ignore the data from spi if data read happens to be 0xFF. Change-Id: Ib1f28b70ee11e99f73a80166df56132371076f86 Signed-off-by: Balachandra C S --- drivers/net/can/spi/qti-can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/spi/qti-can.c b/drivers/net/can/spi/qti-can.c index 7db6ecf8f354..5934512b6e0e 100644 --- a/drivers/net/can/spi/qti-can.c +++ b/drivers/net/can/spi/qti-can.c @@ -445,8 +445,8 @@ static int qti_can_process_rx(struct qti_can *priv_data, char *rx_buf) } else { data = rx_buf + length_processed; resp = (struct spi_miso *)data; - if (resp->cmd == 0) { - /* special case. ignore cmd==0 */ + if (resp->cmd == 0x00 || resp->cmd == 0xFF) { + /* special case. ignore cmd==0x00, 0xFF */ length_processed += 1; continue; }