[dpdk-dev,v2,2/2] net/ark: report hardware status during PMD init
diff mbox

Message ID 1491925310-19952-1-git-send-email-ed.czeck@atomicrules.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ed Czeck April 11, 2017, 3:41 p.m. UTC
Expose additional fpga status registers.
Report hardware status during PMD init.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c | 9 +++++++++
 drivers/net/ark/ark_rqp.c    | 6 ++++++
 drivers/net/ark/ark_rqp.h    | 4 +++-
 3 files changed, 18 insertions(+), 1 deletion(-)

Comments

john miller April 11, 2017, 6:06 p.m. UTC | #1
> On Apr 11, 2017, at 11:41 AM, Ed Czeck <ed.czeck@atomicrules.com> wrote:
> 
> Expose additional fpga status registers.
> Report hardware status during PMD init.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>

Acked-by: John Miller <john.miller@atomicrules.com <mailto:john.miller@atomicrules.com>>

Patch
diff mbox

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 93721a0..651dd26 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -297,6 +297,15 @@  eth_ark_dev_init(struct rte_eth_dev *dev)
 			    ark->sysctrl.t32[4], __func__);
 		return -1;
 	}
+	if (ark->sysctrl.t32[3] != 0) {
+		if (ark_rqp_lasped(ark->rqpacing)) {
+			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+				    "Timer has Expired\n");
+			return -1;
+		}
+		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+			    "Timer is Running\n");
+	}
 
 	PMD_DRV_LOG(INFO,
 		    "HW Sanity test has PASSED, expected constant"
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index 59d9b8a..41c497b 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -89,3 +89,9 @@  ark_rqp_dump(struct ark_rqpace_t *rqp)
 		      "cplh pending max", rqp->cplh_pending_max,
 		      "cpld pending max", rqp->cpld_pending_max);
 }
+
+int
+ark_rqp_lasped(struct ark_rqpace_t *rqp)
+{
+	return rqp->lasped;
+}
diff --git a/drivers/net/ark/ark_rqp.h b/drivers/net/ark/ark_rqp.h
index 995fc20..0c38007 100644
--- a/drivers/net/ark/ark_rqp.h
+++ b/drivers/net/ark/ark_rqp.h
@@ -76,9 +76,11 @@  struct ark_rqpace_t {
 	volatile uint32_t cplh_pending_max;
 	volatile uint32_t cpld_pending_max;
 	volatile uint32_t err_count_other;
+	char eval[4];
+	volatile int lasped;
 };
 
 void ark_rqp_dump(struct ark_rqpace_t *rqp);
 void ark_rqp_stats_reset(struct ark_rqpace_t *rqp);
-
+int ark_rqp_lasped(struct ark_rqpace_t *rqp);
 #endif