On 6/2/21 12:40 PM, Jiawen Wu wrote:
Initialize the hardware by resetting the hardware in base code.
Signed-off-by: Jiawen Wu <jiawe...@trustnetic.com>
[snip]
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index c2f92a8437..bb5923c485 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -109,6 +109,13 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void
*init_params __rte_unused)
return -EIO;
}
+ err = hw->mac.init_hw(hw);
+
+ if (err) {
Explicit comparison with 0 should be used.
+ PMD_INIT_LOG(ERR, "Hardware Initialization Failure: %d", err);
+ return -EIO;
+ }
+
return 0;
}