goto error;
eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
+ eth_dev->data->dev_started = 1;
bnxt_link_update(eth_dev, 1, ETH_LINK_UP);
- bp->dev_stopped = 0;
if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
vlan_mask |= ETH_VLAN_FILTER_MASK;
eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
- eth_dev->data->dev_started = 1;
pthread_mutex_lock(&bp->def_cp_lock);
bnxt_schedule_fw_health_check(bp);
pthread_mutex_unlock(&bp->def_cp_lock);
bnxt_shutdown_nic(bp);
bnxt_free_tx_mbufs(bp);
bnxt_free_rx_mbufs(bp);
- bp->dev_stopped = 1;
+ eth_dev->data->dev_started = 0;
return rc;
}
bp->mark_table = NULL;
bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
- bp->dev_stopped = 1;
bp->rx_cosq_cnt = 0;
}
{
struct bnxt *bp = eth_dev->data->dev_private;
- if (bp->dev_stopped == 0)
+ if (eth_dev->data->dev_started)
bnxt_dev_stop_op(eth_dev);
bnxt_uninit_resources(bp, false);
return rc;
/* Filter settings will get applied when port is started */
- if (bp->dev_stopped == 1)
+ if (!eth_dev->data->dev_started)
return 0;
if (bp->vnic_info == NULL)
return rc;
/* Filter settings will get applied when port is started */
- if (bp->dev_stopped == 1)
+ if (!eth_dev->data->dev_started)
return 0;
if (bp->vnic_info == NULL)
return rc;
/* Filter settings will get applied when port is started */
- if (bp->dev_stopped == 1)
+ if (!eth_dev->data->dev_started)
return 0;
if (bp->vnic_info == NULL)
return rc;
/* Filter settings will get applied when port is started */
- if (bp->dev_stopped == 1)
+ if (!eth_dev->data->dev_started)
return 0;
if (bp->vnic_info == NULL)
return rc;
/* Filter settings will get applied when port is started */
- if (bp->dev_stopped == 1)
+ if (!dev->data->dev_started)
return 0;
if (mask & ETH_VLAN_FILTER_MASK) {
{
bnxt_set_hwrm_link_config(bp, false);
bp->link_info.link_up = 0;
- if (bp->dev_stopped == 0)
+ if (bp->eth_dev->data->dev_started)
bnxt_dev_stop_op(bp->eth_dev);
bnxt_uninit_resources(bp, true);
bp = eth_dev->data->dev_private;
- bp->dev_stopped = 1;
bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
if (bnxt_vf_pciid(pci_dev->id.device_id))