Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mlx5: shd: Gracefully avoid shared devlink creation when no usable SN is found

On some HW, not even fall-back "SERIALNO" is found in VPD data. Unify
the behavior with the case there are no VPD data at all and avoid
creation of shared devlink instance.

Fixes: 2a8c8a03f306 ("net/mlx5: Add a shared devlink instance for PFs on same chip")
Reported-by: Adam Young <admiyo@amperemail.onmicrosoft.com>
Closes: https://lore.kernel.org/all/bab5b6bc-aa42-4af1-80d1-e56bcef06bc2@amperemail.onmicrosoft.com/
Reported-by: Ben Copeland <ben.copeland@linaro.org>
Closes: https://lore.kernel.org/all/20260324151014.860376-1-ben.copeland@linaro.org/
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Tested-by: Ben Copeland <ben.copeland@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260325152801.236343-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jiri Pirko and committed by
Jakub Kicinski
b8f9410a d748047a

+1 -1
+1 -1
drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.c
··· 33 33 start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size, 34 34 PCI_VPD_RO_KEYWORD_SERIALNO, &kw_len); 35 35 if (start < 0) 36 - return -ENOENT; 36 + return 0; /* No usable serial number found, ignore. */ 37 37 } 38 38 sn = kstrndup(vpd_data + start, kw_len, GFP_KERNEL); 39 39 if (!sn)