VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Martin Habets <habetsm.xilinx@gmail.com> 2023-06-28 13:32:20 +0100 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:36:44 +0200 commit: 048b241b7f5f318e4eca6a42e64d650dbe6359c3 parent: 662d31232b2c9155e7b1b34a815ee33e3abeed23
Commit Summary:
sfc: support for devlink port requires MAE access
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx_devlink.c b/drivers/net/ethernet/sfc/efx_devlink.c
index ef9971cbb695..0384b134e124 100644
--- a/drivers/net/ethernet/sfc/efx_devlink.c
+++ b/drivers/net/ethernet/sfc/efx_devlink.c
@@ -622,6 +622,9 @@ static struct devlink_port *ef100_set_devlink_port(struct efx_nic *efx, u32 idx)
 	u32 id;
 	int rc;
 
+	if (!efx->mae)
+		return NULL;
+
 	if (efx_mae_lookup_mport(efx, idx, &id)) {
 		/* This should not happen. */
 		if (idx == MAE_MPORT_DESC_VF_IDX_NULL)