Currently, `adapter_stopped` is cleared during device startup but is not
restored to true if startup fails partway through. Reset `adapter_stopped`
to true on the device startup error path to accurately reflect device state
after a failed start.

Fixes: 437dbd2fd428 ("net/ice: support 1PPS")
Cc: [email protected]

Signed-off-by: Ciara Loftus <[email protected]>
---
 drivers/net/intel/ice/ice_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/intel/ice/ice_ethdev.c 
b/drivers/net/intel/ice/ice_ethdev.c
index 8db5168b88..76b8ff0a72 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -4582,6 +4582,8 @@ ice_dev_start(struct rte_eth_dev *dev)
        for (i = 0; i < nb_txq; i++)
                ice_tx_queue_stop(dev, i);
 
+       pf->adapter_stopped = true;
+
        return -EIO;
 }
 
-- 
2.43.0

Reply via email to