git: c097967b9af9 - main - mlx5en: add diagnostic in one more case of failed eeprom read preparation

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Mon, 06 May 2024 03:15:59 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c097967b9af946cf46246cce5adde53f7e955ecc

commit c097967b9af946cf46246cce5adde53f7e955ecc
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-05-05 07:09:07 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-05-06 03:15:35 +0000

    mlx5en: add diagnostic in one more case of failed eeprom read preparation
    
    Sponsored by:   Nvidia Networking
    MFC after:      1 week
---
 sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index e1dbd02fcf3a..962705e6d258 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -3674,6 +3674,9 @@ out:
 		/* Check if module is present before doing an access */
 		module_status = mlx5_query_module_status(priv->mdev, module_num);
 		if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) {
+			mlx5_en_err(ifp,
+			    "Query module %d status: not plugged (%d), eeprom reading is not supported\n",
+			    module_num, module_status);
 			error = EINVAL;
 			goto err_i2c;
 		}