Skip to contentSkip to conversation

raw/ifpga/base: fix spi transaction issue

PATCH Superseded Tianfei zhang 1 participant 1 message Jul 9, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 raw/ifpga/base: fix spi transaction issue

From: Tianfei Zhang <[email protected]>

0x4a means idle status on physical layer. when encounter 0x4a on raw data, it need insert a ESCAPE character for indication.

Fixes 96ebfcf8 ("raw/ifpga/base: add SPI and MAX10 device driver")
---
 drivers/raw/ifpga/base/opae_spi_transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/raw/ifpga/base/opae_spi_transaction.c +1 -1
index 013efee3e..d13d2fbc8 100644
@@ -166,7 +166,7 @@ static int byte_to_core_convert(struct spi_transaction_dev *dev,
 		current_byte = send_data[i];
 		switch (current_byte) {
 		case SPI_BYTE_IDLE:
-			*p++ = SPI_BYTE_IDLE;
+			*p++ = SPI_BYTE_ESC;
 			*p++ = xor_20(current_byte);
 			break;
 		case SPI_BYTE_ESC:
Signature · 1 line
2.17.1