[v3,1/2] raw/ifpga/base: fix spi transaction issue
diff mbox series

Message ID 20200714213509.13650-1-tianfei.zhang@intel.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • [v3,1/2] raw/ifpga/base: fix spi transaction issue
Related show

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Tianfei zhang July 14, 2020, 9:35 p.m. UTC
From: Tianfei Zhang <tianfei.zhang@intel.com>

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")
Cc: stable@dpdk.org

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>

---
v3: resend with threaded option for git send-email
---
 drivers/raw/ifpga/base/opae_spi_transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xu, Rosen July 15, 2020, 11:21 a.m. UTC | #1
-----Original Message-----
From: Zhang, Tianfei <tianfei.zhang@intel.com> 
Sent: Wednesday, July 15, 2020 5:35 AM
To: dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>
Cc: Zhang, Tianfei <tianfei.zhang@intel.com>; stable@dpdk.org
Subject: [PATCH v3 1/2] raw/ifpga/base: fix spi transaction issue

From: Tianfei Zhang <tianfei.zhang@intel.com>

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")
Cc: stable@dpdk.org

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>

---
v3: resend with threaded option for git send-email
---
 drivers/raw/ifpga/base/opae_spi_transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 013efee3e..d13d2fbc8 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -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:
--
2.17.1

Acked-by: Rosen Xu <rosen.xu@intel.com>

Patch
diff mbox series

diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 013efee3e..d13d2fbc8 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -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: