diff options
| author | Balachandra C S <balacs@codeaurora.org> | 2018-04-26 18:10:44 +0530 |
|---|---|---|
| committer | Balachandra C S <balacs@codeaurora.org> | 2018-07-13 12:49:41 +0530 |
| commit | 193f8ec5c681bd6da539926928a1ce97c9978ed1 (patch) | |
| tree | 65122612b1d5c18cc9868c282cf6e5db89105f6c | |
| parent | 348619f43fbc336b16006d83f192ded71355ee92 (diff) | |
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 <balacs@codeaurora.org>
| -rw-r--r-- | drivers/net/can/spi/qti-can.c | 4 |
1 files 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; } |
