Skip to content

Commit

Permalink
sfc: Add devlink dev info support for EF10
Browse files Browse the repository at this point in the history
Reuse the work done for EF100 to add devlink support for EF10.
There is no devlink port support for EF10.

Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Martin Habets authored and David S. Miller committed Jun 12, 2023
1 parent 26e3537 commit 998b85f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/sfc/efx.c
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
#include "io.h"
#include "selftest.h"
#include "sriov.h"
#include "efx_devlink.h"

#include "mcdi_port_common.h"
#include "mcdi_pcol.h"
@@ -877,6 +878,7 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
if (efx->type->sriov_fini)
efx->type->sriov_fini(efx);

efx_fini_devlink_lock(efx);
efx_unregister_netdev(efx);

efx_mtd_remove(efx);
@@ -886,6 +888,7 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
efx_fini_io(efx);
pci_dbg(efx->pci_dev, "shutdown successful\n");

efx_fini_devlink_and_unlock(efx);
efx_fini_struct(efx);
free_netdev(efx->net_dev);
probe_data = container_of(efx, struct efx_probe_data, efx);
@@ -1025,7 +1028,13 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)
NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_NDO_XMIT;

/* devlink creation, registration and lock */
rc = efx_probe_devlink_and_lock(efx);
if (rc)
pci_err(efx->pci_dev, "devlink registration failed");

rc = efx_register_netdev(efx);
efx_probe_devlink_unlock(efx);
if (!rc)
return 0;

0 comments on commit 998b85f

Please sign in to comment.