mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
bnxt_en: Fix firmware signaled resource change logic in open.
When the driver detects that resources have changed during open, it
should reset the rx and tx rings to 0. This will properly setup the
init sequence to initialize the default rings again. We also need
to signal the RDMA driver to stop and clear its interrupts. We then
call the RoCE driver to restart if a new set of default rings is
successfully reserved.
Fixes: 25e1acd6b9
("bnxt_en: Notify firmware about IF state changes.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6570aa1d10
commit
6b95c3e969
@ -6684,6 +6684,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
|
||||
hw_resc->resv_rx_rings = 0;
|
||||
hw_resc->resv_hw_ring_grps = 0;
|
||||
hw_resc->resv_vnics = 0;
|
||||
bp->tx_nr_rings = 0;
|
||||
bp->rx_nr_rings = 0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
@ -8769,20 +8771,25 @@ static int bnxt_init_dflt_ring_mode(struct bnxt *bp)
|
||||
if (bp->tx_nr_rings)
|
||||
return 0;
|
||||
|
||||
bnxt_ulp_irq_stop(bp);
|
||||
bnxt_clear_int_mode(bp);
|
||||
rc = bnxt_set_dflt_rings(bp, true);
|
||||
if (rc) {
|
||||
netdev_err(bp->dev, "Not enough rings available.\n");
|
||||
return rc;
|
||||
goto init_dflt_ring_err;
|
||||
}
|
||||
rc = bnxt_init_int_mode(bp);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto init_dflt_ring_err;
|
||||
|
||||
bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
|
||||
if (bnxt_rfs_supported(bp) && bnxt_rfs_capable(bp)) {
|
||||
bp->flags |= BNXT_FLAG_RFS;
|
||||
bp->dev->features |= NETIF_F_NTUPLE;
|
||||
}
|
||||
return 0;
|
||||
init_dflt_ring_err:
|
||||
bnxt_ulp_irq_restart(bp, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int bnxt_restore_pf_fw_resources(struct bnxt *bp)
|
||||
|
Loading…
Reference in New Issue
Block a user