Skip to contentSkip to conversation

fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

PATCH Superseded [email protected] 2 participants 6 messages May 9, 2022 – Jun 1, 2022 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK and BUSY status.

---
 drivers/fpga/intel_sdm_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/intel_sdm_mb.c +2 -1
index f5fd9a14c2..5e0b2777e0 100644
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t rbf_size)
 			debug("wr_ret = %d, rbf_data = %p, buf_size = %08lx\n",
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+				wr_ret != INTEL_SIP_SMC_STATUS_BUSY)
 				continue;
 
 			rbf_size -= buf_size;

--
2.26.2

#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Maniyam, Dinesh <[email protected]>
Sent: Monday, 9 May, 2022 3:43 PM
To: [email protected]
Cc: Michal Simek <[email protected]>; Chee, Tien Fong <[email protected]>; Hea, Kok Kiang <[email protected]>; Gan, Yau Wai <[email protected]>; Kho, Sin Hui <[email protected]>; Lokanathan, Raaj <[email protected]>; Maniyam, Dinesh <[email protected]>; Ley Foon Tan <[email protected]>
Subject: [PATCH] fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

Quoted 5 lines

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK and BUSY status.

Can you help to improve the commit message? That is not possible wr_ret would return with two results(OK and BUSY) in status at the same time. Please change to "OK or Busy status".

Please extend the years of copyright to "2018-2022"

Quoted 12 lines
---
 drivers/fpga/intel_sdm_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/intel_sdm_mb.c +0 -0
index f5fd9a14c2..5e0b2777e0 100644

drivers/fpga/intel_sdm_mb.c static int send_bitstream(const void *rbf_data, size_t · line 76

Quoted 8 lines
drivers/fpga/intel_sdm_mb.c +2 -1
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t
 rbf_size)
 			debug("wr_ret = %d, rbf_data = %p, buf_size
 = %08lx\n",
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+				wr_ret != INTEL_SIP_SMC_STATUS_BUSY)

Alignment issue after "(" above, please run the checkpatch.pl

Quoted 5 lines
drivers/fpga/intel_sdm_mb.c +0 -0
 				continue;

rbf_size -= buf_size;
--
2.26.2

#2 lore raw
Quoted 54 lines

-----Original Message-----
From: Chee, Tien Fong <[email protected]>
Sent: Tuesday, 24 May 2022 6:29 pm
To: Maniyam, Dinesh <[email protected]>; [email protected]
Cc: Michal Simek <[email protected]>; Hea, Kok Kiang <[email protected]>; Gan, Yau Wai <[email protected]>; Kho, Sin Hui <[email protected]>; Lokanathan, Raaj <[email protected]>; Ley Foon Tan <[email protected]>
Subject: RE: [PATCH] fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

Quoted 13 lines

-----Original Message-----
From: Maniyam, Dinesh <[email protected]>
Sent: Monday, 9 May, 2022 3:43 PM
To: [email protected]
Cc: Michal Simek <[email protected]>; Chee, Tien Fong <[email protected]>; Hea, Kok Kiang <[email protected]>; Gan, Yau Wai <[email protected]>; Kho, Sin Hui <[email protected]>; Lokanathan, Raaj <[email protected]>; Maniyam, Dinesh <[email protected]>; Ley Foon Tan <[email protected]>
Subject: [PATCH] fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

Quoted 5 lines

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK and BUSY status.

Can you help to improve the commit message? That is not possible wr_ret would return with two results(OK and BUSY) in status at the same time. Please change to "OK or Busy status".

Please extend the years of copyright to "2018-2022"

Quoted 12 lines
---
 drivers/fpga/intel_sdm_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/intel_sdm_mb.c +0 -0
index f5fd9a14c2..5e0b2777e0 100644
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data,
Quoted 3 lines

size_t
rbf_size)
debug("wr_ret = %d, rbf_data = %p, buf_size =

%08lx\n",

Quoted 13 lines

drivers/fpga/intel_sdm_mb.c static int send_bitstream(const void *rbf_data, size_t rbf_size) · line 74

Quoted 5 lines
drivers/fpga/intel_sdm_mb.c +2 -1
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+				wr_ret != INTEL_SIP_SMC_STATUS_BUSY)

Alignment issue after "(" above, please run the checkpatch.pl

Quoted 5 lines
drivers/fpga/intel_sdm_mb.c +0 -1
 				continue;
 
 			rbf_size -= buf_size;
--

2.26.2

Thanks for the review.
V3 patch will have the update for the copyright year, commit message and proper alignment.

#3 lore raw

PATCH v2 1/1 fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

In reply to [email protected]

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK or BUSY status.

---

v1 -> v2
- change to "OK or Busy status in commit message and fix allignment error.

---
 drivers/fpga/intel_sdm_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/intel_sdm_mb.c +2 -1
index f5fd9a14c2..5e0b2777e0 100644
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t rbf_size)
 			debug("wr_ret = %d, rbf_data = %p, buf_size = %08lx\n",
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+				wr_ret != INTEL_SIP_SMC_STATUS_BUSY)
 				continue;
 
 			rbf_size -= buf_size;

--
2.25.1

#4 lore raw

PATCH v3 1/1 fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK or BUSY status.

---

v2->v3
-Copyright year updated and alignment adjusted.

---
 drivers/fpga/intel_sdm_mb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/fpga/intel_sdm_mb.c +3 -2
index f5fd9a14c2..44ef7717d0 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (C) 2018 Intel Corporation <www.intel.com>
+ * Copyright (C) 2018-2022 Intel Corporation <www.intel.com>
  */
 
 #include <common.h>
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t rbf_size)
 			debug("wr_ret = %d, rbf_data = %p, buf_size = %08lx\n",
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+			    wr_ret != INTEL_SIP_SMC_STATUS_BUSY)
 				continue;
 
 			rbf_size -= buf_size;
Signature · 1 line
2.25.1
Reviewed-by on v3 1/1
#5 lore raw
Quoted 53 lines

-----Original Message-----
From: Maniyam, Dinesh <[email protected]>
Sent: Tuesday, 31 May, 2022 3:51 PM
To: [email protected]
Cc: Michal Simek <[email protected]>; Chee, Tien Fong <[email protected]>; Hea, Kok Kiang <[email protected]>; Gan, Yau Wai <[email protected]>; Kho, Sin Hui <[email protected]>; Lokanathan, Raaj <[email protected]>; Maniyam, Dinesh <[email protected]>
Subject: [PATCH v3] fpga: intel_sdm_mb: Add checking for INTEL_SIP_SMC_STATUS_BUSY (1)

From: Dinesh Maniyam <[email protected]>

Status busy means transfer is accepted but SDM does not have more freed buffer. It is not an error. Continue process the data if receive OK or BUSY status.

---

v2->v3

(quoted diff) +0 -2
-Copyright year updated and alignment adjusted.
---
 drivers/fpga/intel_sdm_mb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/fpga/intel_sdm_mb.c +3 -2
index f5fd9a14c2..44ef7717d0 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (C) 2018 Intel Corporation <www.intel.com>
+ * Copyright (C) 2018-2022 Intel Corporation <www.intel.com>
  */
 
 #include <common.h>
@@ -70,7 +70,8 @@ static int send_bitstream(const void *rbf_data, size_t
 rbf_size)
 			debug("wr_ret = %d, rbf_data = %p, buf_size
 = %08lx\n",
 			      wr_ret, rbf_data, buf_size);
 
-			if (wr_ret)
+			if (wr_ret != INTEL_SIP_SMC_STATUS_OK &&
+			    wr_ret != INTEL_SIP_SMC_STATUS_BUSY)
 				continue;
Quoted 3 lines

rbf_size -= buf_size;
--
2.25.1

Regards
Tien Fong