net/ark: report hardware status on init
authorEd Czeck <ed.czeck@atomicrules.com>
Tue, 11 Apr 2017 15:41:50 +0000 (11:41 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
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>
drivers/net/ark/ark_ethdev.c
drivers/net/ark/ark_rqp.c
drivers/net/ark/ark_rqp.h

index c6032bc..4caad98 100644 (file)
@@ -318,6 +318,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"
index 59d9b8a..41c497b 100644 (file)
@@ -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;
+}
index 995fc20..0c38007 100644 (file)
@@ -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