[v3,04/13] net/txgbe: fix driver load bit to inform firmware
Checks
Commit Message
Drv_load bit will be reset to default 0 after hardware LAN reset,
reconfigure it to inform firmware that driver is loaded. And set it to 0
when device is closed.
Fixes: b1f596677d8e ("net/txgbe: support device start")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -331,6 +331,8 @@ txgbe_pf_reset_hw(struct txgbe_hw *hw)
status = hw->mac.reset_hw(hw);
ctrl_ext = rd32(hw, TXGBE_PORTCTL);
+ /* let hardware know driver is loaded */
+ ctrl_ext |= TXGBE_PORTCTL_DRVLOAD;
/* Set PF Reset Done bit so PF/VF Mail Ops can work */
ctrl_ext |= TXGBE_PORTCTL_RSTDONE;
wr32(hw, TXGBE_PORTCTL, ctrl_ext);
@@ -2061,6 +2063,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
ret = txgbe_dev_stop(dev);
+ /* Let firmware take over control of hardware */
+ wr32m(hw, TXGBE_PORTCTL, TXGBE_PORTCTL_DRVLOAD, 0);
+
txgbe_dev_free_queues(dev);
txgbe_set_pcie_master(hw, false);