Commit 09699f19 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2023-11-06 (i40e)

This series contains updates to i40e driver only.

Ivan Vecera resolves a couple issues with devlink; removing a call to
devlink_port_type_clear() and ensuring devlink port is unregistered
after the net device.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  i40e: Fix devlink port unregistering
  i40e: Do not call devlink_port_type_clear()
====================

Link: https://lore.kernel.org/r/20231107003600.653796-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 31356547 aa54d846
...@@ -231,6 +231,5 @@ int i40e_devlink_create_port(struct i40e_pf *pf) ...@@ -231,6 +231,5 @@ int i40e_devlink_create_port(struct i40e_pf *pf)
**/ **/
void i40e_devlink_destroy_port(struct i40e_pf *pf) void i40e_devlink_destroy_port(struct i40e_pf *pf)
{ {
devlink_port_type_clear(&pf->devlink_port);
devlink_port_unregister(&pf->devlink_port); devlink_port_unregister(&pf->devlink_port);
} }
...@@ -14213,8 +14213,7 @@ int i40e_vsi_release(struct i40e_vsi *vsi) ...@@ -14213,8 +14213,7 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
} }
set_bit(__I40E_VSI_RELEASING, vsi->state); set_bit(__I40E_VSI_RELEASING, vsi->state);
uplink_seid = vsi->uplink_seid; uplink_seid = vsi->uplink_seid;
if (vsi->type == I40E_VSI_MAIN)
i40e_devlink_destroy_port(pf);
if (vsi->type != I40E_VSI_SRIOV) { if (vsi->type != I40E_VSI_SRIOV) {
if (vsi->netdev_registered) { if (vsi->netdev_registered) {
vsi->netdev_registered = false; vsi->netdev_registered = false;
...@@ -14228,6 +14227,9 @@ int i40e_vsi_release(struct i40e_vsi *vsi) ...@@ -14228,6 +14227,9 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
i40e_vsi_disable_irq(vsi); i40e_vsi_disable_irq(vsi);
} }
if (vsi->type == I40E_VSI_MAIN)
i40e_devlink_destroy_port(pf);
spin_lock_bh(&vsi->mac_filter_hash_lock); spin_lock_bh(&vsi->mac_filter_hash_lock);
/* clear the sync flag on all filters */ /* clear the sync flag on all filters */
...@@ -14402,14 +14404,14 @@ static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi) ...@@ -14402,14 +14404,14 @@ static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)
err_rings: err_rings:
i40e_vsi_free_q_vectors(vsi); i40e_vsi_free_q_vectors(vsi);
if (vsi->type == I40E_VSI_MAIN)
i40e_devlink_destroy_port(pf);
if (vsi->netdev_registered) { if (vsi->netdev_registered) {
vsi->netdev_registered = false; vsi->netdev_registered = false;
unregister_netdev(vsi->netdev); unregister_netdev(vsi->netdev);
free_netdev(vsi->netdev); free_netdev(vsi->netdev);
vsi->netdev = NULL; vsi->netdev = NULL;
} }
if (vsi->type == I40E_VSI_MAIN)
i40e_devlink_destroy_port(pf);
i40e_aq_delete_element(&pf->hw, vsi->seid, NULL); i40e_aq_delete_element(&pf->hw, vsi->seid, NULL);
err_vsi: err_vsi:
i40e_vsi_clear(vsi); i40e_vsi_clear(vsi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment