There is a race condition when port is closed while error recovery
is happening in driver. Fixed this by canceling the recovery threads
during port close.
Fixes:
df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);
static void bnxt_cancel_fw_health_check(struct bnxt *bp);
static int bnxt_restore_vlan_filters(struct bnxt *bp);
static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);
static void bnxt_cancel_fw_health_check(struct bnxt *bp);
static int bnxt_restore_vlan_filters(struct bnxt *bp);
+static void bnxt_dev_recover(void *arg);
int is_bnxt_in_error(struct bnxt *bp)
{
int is_bnxt_in_error(struct bnxt *bp)
{
{
struct bnxt *bp = eth_dev->data->dev_private;
{
struct bnxt *bp = eth_dev->data->dev_private;
+ /* cancel the recovery handler before remove dev */
+ rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
+ rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
+
if (eth_dev->data->dev_started)
bnxt_dev_stop_op(eth_dev);
if (eth_dev->data->dev_started)
bnxt_dev_stop_op(eth_dev);